What needs to happen to enable the browser to act as a functioning web server?
If you'd like to access a server from another tab / iframe of the same browser, that's almost possible already, just some UX work would be required.
If you'd like users of the same page (or a separate specialized page) to connect, that could be possible with WebRTC.
If you'd like arbitrary hosts to connect, that would require a server side proxy, there is no client-side only solution that I can see,