top | item 25357702

.NET TcpClient library to connect through proxy server

1 points| Ace__ | 5 years ago | reply

Hi.

We have implemented a .NET's TcpClient that can connect through a proxy server.

It is a helper method that creates a new Socket and connects it to a destination Uri through a given Proxy.

Based on that socket a new TcpClient is created.

It takes one line to use it:

TcpClient client = Filemail.ProxiedTcpClient.ProxiedTcpClient.Create(proxyUri,destinationUri);

It is capable of detecting system proxy settings and handles proxies configured with *.pac script files

TcpClient client = Filemail.ProxiedTcpClient.ProxiedTcpClient.Create(destinationUri);

Code is hosted on github: https://github.com/filemail/ProxiedTcpClient Nuget package can be found here: https://www.nuget.org/packages/Filemail.ProxiedTcpClient/

Feel free to give it a try. Any comments, suggestions, etc, please do let me know.

Cheers, Ace.

discuss

order

No comments yet.