Mar 27, 2016 09:56 AM
(This post was last modified: Mar 28, 2016 09:24 AM by Ninja.)
This is a project I made originally so I could send webrequests over socks proxies so I am no longer bound to only using HTTP proxies in my programs. And since it is not something that important to me I decided to release it here. Yes, it does work with Tor. Right now it only has Socks 5 support as the protocol for 4/4a is different and I really cant be bothered to add support for it as socks 4 proxies are basically dead. It supports target hosts in domain, IPv4, and IPv6 format.
The methods are static, meaning you dont have to instantiate the class, you can just do it like this:
If something goes wrong, like a dead proxy, it will throw an error, so it is up to you to handle the errors. If something goes wrong and it does not throw an error, then it will return null, so you have to take that into account as well. You can use this to send webrequests by writing a simple wrapper for it, that just uses a stringbuilder to make the request and then encode that to UTF8 and write it to the networkstream.
Github:
https://github.com/GekkeVent/SocksTcpClient
Don't take credit for making this and don't attempt to sell this code. Give credit where credit is due.
Credits:
Aeonhack - giving me the idea.
LaPanthere - emotional support and inappropriate pictures at 10pm.
Odus - literally nothing.
The methods are static, meaning you dont have to instantiate the class, you can just do it like this:
Code
TcpClient client = SocksTcpClient.Connect(string proxyHost, int proxyPort, string targetHost, int targetPort)If something goes wrong, like a dead proxy, it will throw an error, so it is up to you to handle the errors. If something goes wrong and it does not throw an error, then it will return null, so you have to take that into account as well. You can use this to send webrequests by writing a simple wrapper for it, that just uses a stringbuilder to make the request and then encode that to UTF8 and write it to the networkstream.
Github:
https://github.com/GekkeVent/SocksTcpClient
Don't take credit for making this and don't attempt to sell this code. Give credit where credit is due.
Credits:
Aeonhack - giving me the idea.
LaPanthere - emotional support and inappropriate pictures at 10pm.
Odus - literally nothing.

