SimpleSockets icon indicating copy to clipboard operation
SimpleSockets copied to clipboard

Adding proxy support

Open NaolShow opened this issue 4 years ago • 4 comments

Hello Cloet, I'm creating this issue not because I have a problem with your library (which is awesome by the way, and even the most complete one ^^), but because I have a request for an addition

I wanted to ask you if it was possible to add a small option, which would be the support of proxies. I don't know much about networking, so I don't know if it's possible with TCP/UDP. But if it's possible it would be great if it could be implemented! :)

And thanks again for your library, with the rewrite it will be even better :) Goodbye! ^^

NaolShow avatar Apr 25 '20 11:04 NaolShow

Hello, Thanks for the kind words ! I'm not sure about the use of a proxy, care to elaborate what a use would be ?

Couldn't you achieve the same effect with a reverse proxy using nginx (not sure) ? But you could achieve the same effect by using another client at the first destination and relay it to another server?

Cloet avatar Apr 25 '20 14:04 Cloet

Hello, A proxy would allow, for example, all client traffic to pass through the Tor proxy, or any other proxy. This would be a plus with AES/SSL encryption.

I don't know if we can do this with NGinx, I didn't even know the term "reverse proxy" ^^

As I told you I don't know much about networking... :p

NaolShow avatar Apr 25 '20 18:04 NaolShow

Hi Cloet,

Maybe I can help a little bit: The reverse proxy is not what is meant. I think NaolShow is looking for InternetProxy. A lot of companies use a proxy server as the central way to the internet for clients. This makes it very easy to apply company rules for usage and do a lot of caching locally.

A proxy server can be configured for the whole system (win: internet options -> Connections -> LAN Settings) or for each program individually if it is supported. For programming you have to provide something like described here: https://stackoverflow.com/questions/3127127/how-to-open-socket-thru-proxy-server-in-net-c/3127176#3127176

I hope this will help you, Best regards

ABlueCasket avatar Apr 27 '20 18:04 ABlueCasket

Hi,

All trafic would be routed through a http proxy. Something like this post https://stackoverflow.com/questions/35066981/how-to-use-proxy-with-tcpclient-connectasync/35090558

I’ll look into it a bit more and see if I can implement it.

Cloet avatar Apr 27 '20 19:04 Cloet