I'd like my .NET app to use a proxy which I know how to do except .net doesn't support sock4a/sock5. I know how to setup my app but, how do I setup socat to listen at as a TCP proxy on port 1234 and use the socks5 server at 127.0.0.1:5678?
It must forward all TCP connect. I had luck with privoxy earlier but that only supports http connections.
PS: I am on windows but the commands should be the same as linux
You didn't specify the destination host which you want to connect to through the SOCKS server. I've used
google.com
on port 80 in this example.The
TCP-LISTEN
address is the port to listen on for connections from the .NET application.1234
is obviously the port number, and thefork
option allows multiple connections to be made. TheSOCKS4A
address is the SOCKS server and destination host to connect to. (If you don't want the SOCKS server to do DNS resolution changeSOCKS4A
toSOCKS4
.)127.0.0.1
is the address of the SOCKS server, and thesocksport
option specifies the port of the SOCKS server.google.com:80
is the destination host and port to ask the SOCKS server to connect to.