Class SocksProxy

SocksProxy class

SOCKS proxy client. Supported versions of the protocol are SOCKS4 and SOCKS5.

public class SocksProxy : Proxy

Constructors

NameDescription
SocksProxy(string, int)Initializes a new instance of the SocksProxy class to connect to SOCKS4 server without authentication.
SocksProxy(string, int, SocksVersion)Initializes a new instance of the SocksProxy class to connect to SOCKS4 or SOCKS5 server without authentication.
SocksProxy(string, int, string)Initializes a new instance of the SocksProxy class to connect to SOCKS4 server without authentication.
SocksProxy(string, int, string, string)Initializes a new instance of the SocksProxy class to connect to SOCKS5 server with defined username and password.

Properties

NameDescription
Address { get; set; }The domain name or IP address of the proxy server
Password { get; set; }Password for proxy authentication
Port { get; set; }The port number for the proxy server
SupportedAuthenticationMethods { get; set; }The supported authentication methods to connect to SOCKS server
Username { get; set; }Username for proxy authentication
Version { get; set; }Required SOCKS server version.

Methods

NameDescription
virtual Dispose()Disposes this instance and requests that the underlying TCP connection be closed.
GetStream(string, int)Returns configured network stream to transport data to the required host through the proxy server.
override SetUpStream(Stream, string, int)Configures proxy-server to transport data to the target host.

See Also