Answered by:

StreamSocket with proxy

Question

I'm writing an app that uses StreamSocket to communicate with servers. It works ok when the network has no proxy, but when the network requires a proxy and it is set in IE10 (and i guess that's the system proxy?) the app is not able to connect to the server
anymore. Does anyone know how to solve this issue?

Thanks!

Anthony

Wednesday, December 12, 2012 11:28 PM

Answers

It turns out that Windows 8 sockets, much like the socket libraries from other vendors, don’t include any mechanisms for getting through HTTP proxies. Looking at that, you have the following options -
1. Attempt to get the proxy on their own. However, it’s difficult to get it to work.
2. Use WebSockets, but only if the server on the other side also supports web sockets. A web socket is a new technology that enables socket-like communication that will traverse proxies and firewalls. However, it’s not compatible (on the wire) with
normal sockets; the server should be able to support this. Since web sockets are new technology, not many existing servers do this.

Your network administrators have chosen to block socket communication; see if they have a way to allow socket communication on the network.

It turns out that Windows 8 sockets, much like the socket libraries from other vendors, don’t include any mechanisms for getting through HTTP proxies. Looking at that, you have the following options -
1. Attempt to get the proxy on their own. However, it’s difficult to get it to work.
2. Use WebSockets, but only if the server on the other side also supports web sockets. A web socket is a new technology that enables socket-like communication that will traverse proxies and firewalls. However, it’s not compatible (on the wire) with
normal sockets; the server should be able to support this. Since web sockets are new technology, not many existing servers do this.

Your network administrators have chosen to block socket communication; see if they have a way to allow socket communication on the network.