0

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?

freh
  • 1
  • 1
  • 3

1 Answers1

1

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.

vtortola
  • 34,709
  • 29
  • 161
  • 263
  • Thanks for your answer! I have read about that and it seems clear for me so far. But there is one issue, that our customer noticed, that the ws Request is not using the proxy. So one solution should be to retreive the proxy settings of the system an tell XSockets.Net to send the request over the proxy. But that I was not able to find. I've read about port forwarding, but this is just for the server part. – freh Mar 07 '14 at 09:09