How to use WebSockex through a http proxy
I need to open a websocket connection through a http proxy. The proxy does support websockets when I use a web browser as client.
Is there a way to configure WebSockex to use an http proxy?
Looks like supporting a proxy is not that difficult.
You have to redirect the TCP socket, send a request to the proxy and parse its response. After this additional step everything else is the same as before.
I hacked it into your library, the result is here: https://github.com/tht/websockex
It seems to work nicely but it's far from being ready for a pull request. SSL is not supported when using a proxy and there are no tests.
Awesome, thanks for the heads up and working code sample.
I'll look into getting this integrated or if nothing else at least a way to make a request through an existing proxy connection.