chen19890425 / SocksSharp

SocksSharp provides support for Socks4/4a/5 proxy servers to HttpClient

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SocksSharp

SocksSharp AppVeyor NuGet Codacy License

SocksSharp provides support for Socks4/4a/5 proxy servers to HttpClient

Installation

Install as NuGet package:

Install-Package SocksSharp

.NET CLI:

dotnet add package SocksSharp

Note about .NET Core

For .NET Core build-time support, you must use the .NET Core 2 SDK. You can target any supported platform in your library, long as the 2.0+ SDK is used at build-time.

Basic Usage

var settings = new ProxySettings()
{
	Host = "127.0.0.1",
	Port = 1080
};

using (var proxyClientHandler = new ProxyClientHandler<Socks5>(settings))
{
	using (var httpClient = new HttpClient(proxyClientHandler))
	{
		var response = await httpClient.GetAsync("http://example.com/");
	}
}

Interesting? See more

Contributing

Feel free to open an issue or submit a pull request. To make sure your pull request doesn't go in vain (gets declined), open an issue first discussing it (before actually implementing it).

About

SocksSharp provides support for Socks4/4a/5 proxy servers to HttpClient

License:MIT License


Languages

Language:C# 100.0%