This project is read-only.

VB.Net implementation for Proxy?

Aug 10, 2014 at 8:34 PM
Edited Aug 10, 2014 at 8:38 PM
Hello,

I'm using WebSocket4Net, which works great!

Now, I'm trying to add a proxy, which doesn't implement a standard WebProxy (why?) and instead implements a IProxyConnector. Now, this is where all the problems arise. I kinda know the syntax of implementing SuperSocket.ClientEngine.Proxy.Socks5Connector, although I can not do it for the life of me. Right now, I have the WebSocket4Net.dll, SuperSocket.ClientEngine.Proxy.dll and SuperSocket.ClientEngine.Proxy.dll referenced in my project. The problem arises after I declared my Proxy Object.
Dim ws As WebSocket = New WebSocket(WebSocketServer)
Dim proxy As New SuperSocket.ClientEngine.Proxy.Socks5Connector(New Net.IPEndPoint(Net.IPAddress.Parse(ProxyIP), ProxyPort))
ws.Proxy = DirectCast(proxy, SuperSocket.ClientEngine.IProxyConnector)
This will not compile because of the error: 'IProxyConnector' is ambiguous in the namespace 'SuperSocket.ClientEngine'.
There are no other errors, or warnings or messages.

I also tried doing what the guy in this post did that worked for him: http://stackoverflow.com/questions/23024121/how-to-use-proxies-with-the-websocket4net-library
To no avail, it did not work.

Also, I did try it with a SuperSocket.ClientEngine.Proxy.Socks4Connector and a SuperSocket.ClientEngine.Proxy.Socks4aConnector objects, which didnt' change anything other than specifying the "UserID"? So I just set that string to the name of the client that is connecting to the server via their username. The same error still shows up and still prevents the project from being built. Without the proxy, the project builds fine, and everything runs as smooth as glass. However I NEED the proxy to work with the WebSocket.