Hello people!
I think someone once mentioned the idea to me, to have unhosted web
apps speak non-http protocols (such as SMTP, IMAP, IRC, XMPP, ...) and
then simply tunnel their connection through a websocket.
Yesterday I thought about it and decided to give it a try.
The result can be found here:
http://remotesocket-experiment.unread.it/
It works like this:
* The client (browser) opens a websocket connection. The path of that
websocket looks like /:host/:port?options, so for example
/
imap.google.com/993?ssl=true would open an SSL connection to google's
IMAP server.
* The server end of the websocket is a small nodejs app, that opens
the connection and forwards all data from and to the client and
remoteserver respectively.
Code is on github:
https://github.com/nilclass/remotesocket-client
https://github.com/nilclass/remotesocket-node
Have fun!
-- Niklas