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

extremecodetv/SocksSharp

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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