///<summary>Initializes a new instance of the SocksHandler class.</summary> ///<param name="ClientConnection">The connection with the client.</param> ///<param name="Callback">The method to call when the SOCKS negotiation is complete.</param> ///<exception cref="ArgumentNullException"><c>Callback</c> is null.</exception> public SocksHandler(SocketConnection ClientConnection, NegotiationCompleteDelegate Callback) { if (Callback == null) { throw new ArgumentNullException(); } Connection = ClientConnection; Signaler = Callback; }
internal Socks5Handler(Socket ClientConnection, NegotiationCompleteDelegate Callback, AuthenticationList AuthList, ref LogMain log) { if (Callback == null) { return; } this._Connection = ClientConnection; this._Signaler = Callback; this._AuthList = AuthList; this.Log = log; }
///<summary>Initializes a new instance of the Socks4Handler class.</summary> ///<param name="ClientConnection">The connection with the client.</param> ///<param name="Callback">The method to call when the SOCKS negotiation is complete.</param> ///<exception cref="ArgumentNullException"><c>Callback</c> is null.</exception> public Socks4Handler(Socket ClientConnection, NegotiationCompleteDelegate Callback) : base(ClientConnection, Callback) { }
///<summary>Initializes a new instance of the Socks5Handler class.</summary> ///<param name="ClientConnection">The connection with the client.</param> ///<param name="Callback">The method to call when the SOCKS negotiation is complete.</param> ///<exception cref="ArgumentNullException"><c>Callback</c> is null.</exception> public Socks5Handler(Socket ClientConnection, NegotiationCompleteDelegate Callback) : this(ClientConnection, Callback, null) {}
///<summary>Initializes a new instance of the Socks5Handler class.</summary> ///<param name="ClientConnection">The connection with the client.</param> ///<param name="Callback">The method to call when the SOCKS negotiation is complete.</param> ///<param name="AuthList">The authentication list to use when clients connect.</param> ///<exception cref="ArgumentNullException"><c>Callback</c> is null.</exception> ///<remarks>If the AuthList parameter is null, no authentication will be required when a client connects to the proxy server.</remarks> public Socks5Handler(Socket ClientConnection, NegotiationCompleteDelegate Callback, AuthenticationList AuthList) : base(ClientConnection, Callback) { this.AuthList = AuthList; }
///<summary>Initializes a new instance of the SocksHandler class.</summary> ///<param name="ClientConnection">The connection with the client.</param> ///<param name="Callback">The method to call when the SOCKS negotiation is complete.</param> ///<exception cref="ArgumentNullException"><c>Callback</c> is null.</exception> public SocksHandler(Socket ClientConnection, NegotiationCompleteDelegate Callback) { if (Callback == null) throw new ArgumentNullException(); Connection = ClientConnection; Signaler = Callback; }
///<summary>Initializes a new instance of the Socks5Handler class.</summary> ///<param name="ClientConnection">The connection with the client.</param> ///<param name="Callback">The method to call when the SOCKS negotiation is complete.</param> ///<exception cref="ArgumentNullException"><c>Callback</c> is null.</exception> public Socks5Handler(Socket ClientConnection, NegotiationCompleteDelegate Callback) : this(ClientConnection, Callback, null) { }
public Socks5Handler(Socket ClientConnection, NegotiationCompleteDelegate Callback, IValidator validator) : base(ClientConnection, Callback) { Validator = validator; }