Reputation: 1
I have written a winforms client, that connects to a Windows service establishing a connection with XSockets.Net. This is working fine for a direct connection to the internet. But when there is a proxy server, it will fail. As I checked the XSockets API I have not found any settings, that allows me to use a proxy server. Also for the websockets protocol I have not found a sufficient answer.
Any ideas?
Upvotes: 0
Views: 348
Reputation: 35925
Use WSS:// for connection, that is the equivalent to HTTPS in WebSocket.
The WebSocket protocol handshake sends the HTTP headers "Upgrade:websocket" and "Connection:Upgrade", meaning that the proxy will probably remove the "Upgrade" header because is set as a "Connection" header. By using a secure protocol, the proxy won't be able of intercept the request and will just let it pass.
Cheers.
Upvotes: 1