MihaZupan / HttpToSocks5Proxy

C# Http to Socks5 proxy implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stand With Ukraine

HttpToSocks5Proxy

As of .NET 6, SocketsHttpHandler supports connecting to Socks4, Socks4a and Socks5 proxies!

This project is now archived and no longer maintained. You can use this library on older versions of .NET. See the archived branch.

var client = new HttpClient(new SocketsHttpHandler()
{
    Proxy = new WebProxy("socks5://127.0.0.1:9050")
});

var content = await client.GetStringAsync("https://check.torproject.org/");
Console.WriteLine(content);

About

C# Http to Socks5 proxy implementation