I've searched high and low trying to figure this out, but everything I've seen so far, people are just telling me to use other methods.
With that out of the way, my issue is that I'm trying to connect to a server through a TcpClient using a socks 5 proxy
My current setup is:
Client = new TcpClient();
Client.Connect(EndPoint);
NetworkStream = Client.GetStream();
Stream = new new BufferedStream(NetworkStream);
Stream.Write...//Write Packet information etc
I'm not sure if I've missed any information out so if I have I'll happily update this.
I don't really think .Net comes equipped with Socks5 support, or proxied TCP.
There are a couple of third-party implementations (google knows more), of course, but it's also pretty easy to implement (part of) RFC 1928 yourself.
Here is an example Socks5 client I just hacked together. You will really want to clean it up :p. Just does the auth negotiation, connection setup and finally a simple http request.
I use starksoft-aspen. It's free and open-source.
In the example below the TcpClient initialized within "CreateConnection()" method, but you can also initialize the client by yourself, as well as do it all async.