Unable to use socket.io behind a proxy

I'm unable to connect to a node js server which is hosted online from behind my corporate proxy.

var sock = io.connect("http://example.com/");

My proxy settings is

proxy server = proxy

proxy port = 8080

It works when I bypass the proxy.

How do i make the request through the proxy ?

Thanks.

This is probably due to that your proxy does not handle websockets. Try to disable websockets in your socket.io configuration (Documentation to be found here)

Set

io.set('transports', ['xhr-polling']);

and try again. Good Luck!