C# Class Org.Mentalis.Proxy.Socks.SocksClient

Relays data between a remote host and a local client, using the SOCKS protocols.
This class implements the SOCKS4, SOCKS4a and SOCKS5 protocols. If the MustAuthenticate property is set, only SOCKS5 connections are allowed and the AuthList parameter of the constructor should not be null.
Inheritance: Org.Mentalis.Proxy.Client
Show file Open project: paratechnical/Seringa Class Usage Examples

Private Properties

Property Type Description
OnEndSocksProtocol void
OnStartSocksProtocol void

Public Methods

Method Description
SocksClient ( Socket ClientSocket, DestroyDelegate Destroyer, Org.Mentalis.Proxy.Socks.Authentication.AuthenticationList AuthList ) : System

Initializes a new instance of the SocksClient class.

If the AuthList is non-null, every client has to authenticate before he can use this proxy server to relay data. If it is null, the clients don't have to authenticate.

StartHandshake ( ) : void

Starts communication with the client.

ToString ( ) : string

Returns text information about this SocksClient object.

Private Methods

Method Description
OnEndSocksProtocol ( bool Success, Socket Remote ) : void

Called when the SOCKS protocol has ended. We can no start relaying data, if the SOCKS authentication was successful.

OnStartSocksProtocol ( IAsyncResult ar ) : void

Called when we have received some data from the client.

Method Details

SocksClient() public method

Initializes a new instance of the SocksClient class.
If the AuthList is non-null, every client has to authenticate before he can use this proxy server to relay data. If it is null, the clients don't have to authenticate.
public SocksClient ( Socket ClientSocket, DestroyDelegate Destroyer, Org.Mentalis.Proxy.Socks.Authentication.AuthenticationList AuthList ) : System
ClientSocket Socket The Socket connection between this proxy server and the local client.
Destroyer DestroyDelegate The method to be called when this SocksClient object disconnects from the local client and the remote server.
AuthList Org.Mentalis.Proxy.Socks.Authentication.AuthenticationList The list with valid username/password combinations.
return System

StartHandshake() public method

Starts communication with the client.
public StartHandshake ( ) : void
return void

ToString() public method

Returns text information about this SocksClient object.
public ToString ( ) : string
return string