admin管理员组文章数量:1418081
In the Substratum Initial Coin Offering (ICO), the White Paper talks about solving problems of the current Internet, by allowing hosts to bee 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:
- Providing access to uPnP that can tell routers to do port forwarding?
- 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)
In the Substratum Initial Coin Offering (ICO), the White Paper talks about solving problems of the current Internet, by allowing hosts to bee 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:
- Providing access to uPnP that can tell routers to do port forwarding?
- 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)
Share Improve this question asked Aug 13, 2017 at 13:39 chuacwchuacw 1,8631 gold badge26 silver badges36 bronze badges 5- 2 Check out the Beaker Browser project. – Pointy Commented Aug 13, 2017 at 13:44
- Interesting, i know that chrome and some other browsers can do peer to peer and read and write files – user7951676 Commented Aug 13, 2017 at 13:58
- 1 Yes, the requirement is possible. There are several options available. There is an extension that is a web server at Chrome, Chromium. Opera is shipped with a built in web server. Have been mulling around a similar concept for a while Using requestFileSystem to mirror local directories at server – guest271314 Commented Aug 13, 2017 at 14:10
- What have you tried to resolve own inquiry? Have you created a proof of concept for an implementation of requirement? – guest271314 Commented Aug 13, 2017 at 14:34
- See stackoverflow./questions/18088586/…, stackoverflow./questions/35899536/… – guest271314 Commented Aug 13, 2017 at 14:51
1 Answer
Reset to default 7A web browser normally cannot receive HTTP requests like a web server, but it can send and receive messages from other browsers via WebRTC. The PeerServer project simulates a web server in a browser in this way, using one browser as the "client" and the other as the "server."
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 even be possible to run a Linux server in a browser in an x86 emulator in JavaScript, but I don't know if this has been done yet. Since browsers cannot directly receive HTTP requests, the server would need to use a reverse proxy tunnel in order to connect to a client.
本文标签:
版权声明:本文标题:javascript - Is it possible to write a web server running in a modern browser such as Chrome, Firefox, IE, Safari? - Stack Overf 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745282545a2651507.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论