A simple SOCKS v4a proxy server written in .NET Standard 2.0 which forwards all traffic to a SOCKS v5 server. The proxy server does not support authentication however it can connect to a SOCKS v5 server using username and password. UDP and Bind commands are not supported. It also provides an interface for custom DNS resolving and a default DNS resolver as well. It can also use the upstream proxy for resolving the hostnames.
You can easily install this package to your project using NuGet.
See the NuGet page
You can find detailed usage examples in the tests/SocksRelayServerTests.csproj
project.
All you need to do is implement the IDnsResolver
interface and pass your implementation to the SocksRelayServer
instance using it's DnsResolver
property. You can see a working example in the tests/SocksRelayServerTests.cs
file.
See the LICENSE file in this repository.