Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Latest commit

 

History

History
17 lines (12 loc) · 780 Bytes

README.md

File metadata and controls

17 lines (12 loc) · 780 Bytes

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);