Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.
/ SocksSharp Public archive

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

License

Notifications You must be signed in to change notification settings

extremecodetv/SocksSharp

Repository files navigation

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