Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to write a web server running in a modern browser such as Chrome, Firefox, IE, Safari?

In the Substratum Initial Coin Offering (ICO), the White Paper talks about solving problems of the current Internet, by allowing hosts to become web hosts.

Based on reading of the White Paper, the team looks like they're intending to write Javascript that runs on any modern browser (IE, Safari, Chrome, Firefox) on any platform (Windows, Linux, etc) to turn it into a web server.

As the White Paper is very general, I'm not sure if the team's Javascript is also having some form of access to uPnP technology that tells the nearest router to forward port 80 into the (supposed) web browser that's running on the web server.

Does anyone familiar with current web browsers know if browsers are capable of:

  1. Providing access to uPnP that can tell routers to do port forwarding?
  2. Running a web server using Javascript?

Thank you. (I'm familiar with general programming, just not capabilities of current web browsers. Please limit responses to capabilities of web browsers)

like image 905
chuacw Avatar asked Oct 18 '22 07:10

chuacw


1 Answers

There are some JavaScript libraries such as nohost that use Service Workers to mimic a file server on the client-side. This is apparently possible because service workers are able to send custom responses to HTTP requests.

It might also be possible to run a server in a browser in an x86 emulator in JavaScript, though I don't know if this has been done yet.

like image 189
Anderson Green Avatar answered Nov 09 '22 13:11

Anderson Green