internal Socks5Client(Socket clientSocket, DestroyDelegate destroy, AuthenticationList authList, ref LogMain log) { _ClientSocket = clientSocket; _Destroyer = destroy; _AuthList = authList; Log = log; }
public HttpClient(Socket clientSocket, DestroyDelegate destroyer) { ClientSocket = clientSocket; _destroyer = destroyer; RequestedPath = null; HeaderFields = null; }
protected Client(Socket clientSocket, DestroyDelegate destroyer) { _mBuffer = new byte[0x1000]; _mRemoteBuffer = new byte[0x400]; ClientSocket = clientSocket; _destroyer = destroyer; }
public RelayThread(SocketConnection ClientConnection, SocketConnection RemoteConnection, DestroyDelegate Destroyer, Client client) { this.ClientConnection = ClientConnection; this.RemoteConnection = RemoteConnection; this.Destroyer = Destroyer; this.client = client; }
protected Client() { _mBuffer = new byte[0x1000]; _mRemoteBuffer = new byte[0x400]; ClientSocket = null; _destroyer = null; }
///<summary>Initializes a new instance of the SocksClient class.</summary> ///<param name="ClientSocket">The Socket connection between this proxy server and the local client.</param> ///<param name="Destroyer">The method to be called when this SocksClient object disconnects from the local client and the remote server.</param> ///<param name="AuthList">The list with valid username/password combinations.</param> ///<remarks>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.</remarks> public SocksClient(Socket ClientSocket, DestroyDelegate Destroyer, AuthenticationList AuthList) : base(ClientSocket, Destroyer) { this.AuthList = AuthList; if (AuthList != null && AuthList.Count > 0) { MustAuthenticate = true; } }
public GFWPressDecryptAsyncForwarder(Socket ClientSocket, DestroyDelegate Destroyer, Socket DestinationSocket, SecretKey key) : base(ClientSocket, Destroyer) { this.DestinationSocket = DestinationSocket; this._key = key; _sendingQueue = new ConcurrentList <byte>(); this.ClientSocket.ReceiveBufferSize = 16 * 1024; this.ClientSocket.SendBufferSize = 16 * 1024; this.DestinationSocket.ReceiveBufferSize = 16 * 1024; this.DestinationSocket.SendBufferSize = 16 * 1024; }
public GFWPressEncryptAsyncForwarder(Socket ClientSocket, DestroyDelegate Destroyer, Socket DestinationSocket, SecretKey key) : base(ClientSocket, Destroyer) { //this.MapTo = MapTo; this.DestinationSocket = DestinationSocket; this._key = key; this.ClientSocket.ReceiveBufferSize = 16 * 1024; this.ClientSocket.SendBufferSize = 16 * 1024; this.DestinationSocket.ReceiveBufferSize = 16 * 1024; this.DestinationSocket.SendBufferSize = 16 * 1024; }
public static void InitializeDelegates() { delCreate = Create; delReceive = Receive; delDestroy = Destroy; delStart = Start; InitializeDelegatesOnNative(Marshal.GetFunctionPointerForDelegate(delCreate), Marshal.GetFunctionPointerForDelegate(delReceive), Marshal.GetFunctionPointerForDelegate(delDestroy), Marshal.GetFunctionPointerForDelegate(delStart)); }
///<summary>Initializes a new instance of the Client class.</summary> ///<param name="ClientSocket">The <see cref ="Socket">Socket</see> connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> public Client(Socket ClientSocket, DestroyDelegate Destroyer) { lock (_idLock) { _id++; InstanceID = _id; } _cacheClientBufferHeaders = true; _cacheRemoteBufferHeaders = true; _cachedClientBuffer = new List <byte>(); _cachedRemoteBuffer = new List <byte>(); this.ClientSocket = ClientSocket; this.Destroyer = Destroyer; }
///<summary>Initializes a new instance of the Client object.</summary> ///<remarks>Both the ClientSocket property and the DestroyDelegate are initialized to null.</remarks> public Client() { lock (_idLock) { _id++; InstanceID = _id; } _cacheClientBufferHeaders = true; _cacheRemoteBufferHeaders = true; _cachedClientBuffer = new List <byte>(); _cachedRemoteBuffer = new List <byte>(); ClientSocket = null; Destroyer = null; }
protected CustomBioDescription(string name) { var index = BIO_get_new_index(); _methodPointer = BIO_meth_new(index, name); _write = new WriteDelegate(Write); _read = new ReadDelegate(Read); _create = new CreateDelegate(Create); _destroy = new DestroyDelegate(Destroy); _control = new ControlDelegate(Control); BIO_meth_set_write(_methodPointer, _write); BIO_meth_set_read(_methodPointer, _read); BIO_meth_set_ctrl(_methodPointer, _control); BIO_meth_set_create(_methodPointer, _create); BIO_meth_set_destroy(_methodPointer, _destroy); }
/// <summary> /// Initializes a new instance of the <see cref="WafNative"/> class. /// </summary> /// <param name="handle">Can't be a null pointer. Waf library must be loaded by now</param> internal WafNative(IntPtr handle) { _initField = GetDelegateForNativeFunction <InitDelegate>(handle, "ddwaf_init"); _destroyField = GetDelegateForNativeFunction <DestroyDelegate>(handle, "ddwaf_destroy"); _initContextField = GetDelegateForNativeFunction <InitContextDelegate>(handle, "ddwaf_context_init"); _runField = GetDelegateForNativeFunction <RunDelegate>(handle, "ddwaf_run"); _contextDestroyField = GetDelegateForNativeFunction <ContextDestroyDelegate>(handle, "ddwaf_context_destroy"); _resultFreeField = GetDelegateForNativeFunction <ResultFreeDelegate>(handle, "ddwaf_result_free"); _objectInvalidField = GetDelegateForNativeFunction <ObjectInvalidDelegate>(handle, "ddwaf_object_invalid"); _objectStringLengthFieldX64 = Environment.Is64BitProcess ? GetDelegateForNativeFunction <ObjectStringLengthDelegateX64>(handle, "ddwaf_object_stringl") : null; _objectStringLengthFieldX86 = Environment.Is64BitProcess ? null : GetDelegateForNativeFunction <ObjectStringLengthDelegateX86>(handle, "ddwaf_object_stringl"); _objectSignedField = GetDelegateForNativeFunction <ObjectSignedDelegate>(handle, "ddwaf_object_signed"); _objectUnsignField = GetDelegateForNativeFunction <ObjectUnsignedDelegate>(handle, "ddwaf_object_unsigned"); _objectArrayField = GetDelegateForNativeFunction <ObjectArrayDelegate>(handle, "ddwaf_object_array"); _objectMapField = GetDelegateForNativeFunction <ObjectMapDelegate>(handle, "ddwaf_object_map"); _objectArrayAddField = GetDelegateForNativeFunction <ObjectArrayAddDelegate>(handle, "ddwaf_object_array_add"); _objectMapAddFieldX64 = Environment.Is64BitProcess ? GetDelegateForNativeFunction <ObjectMapAddDelegateX64>(handle, "ddwaf_object_map_addl") : null; _objectMapAddFieldX86 = Environment.Is64BitProcess ? null : GetDelegateForNativeFunction <ObjectMapAddDelegateX86>(handle, "ddwaf_object_map_addl"); _objectFreeField = GetDelegateForNativeFunction <ObjectFreeDelegate>(handle, "ddwaf_object_free", out _objectFreeFuncPtrField); _getVersionField = GetDelegateForNativeFunction <GetVersionDelegate>(handle, "ddwaf_get_version"); // setup logging var setupLogging = GetDelegateForNativeFunction <SetupLoggingDelegate>(handle, "ddwaf_set_log_cb"); // convert to a delegate and attempt to pin it by assigning it to field setupLogCallbackField = LoggingCallback; // set the log level and setup the logger var level = GlobalSettings.Source.DebugEnabled ? DDWAF_LOG_LEVEL.DDWAF_DEBUG : DDWAF_LOG_LEVEL.DDWAF_INFO; setupLogging(Marshal.GetFunctionPointerForDelegate(setupLogCallbackField), level); }
///<summary>Initializes a new instance of the HttpClient class.</summary> ///<param name="ClientSocket">The <see cref ="Socket">Socket</see> connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> public HttpClient(Socket ClientSocket, DestroyDelegate Destroyer) : base(ClientSocket, Destroyer) { this.OnClientHeadersParsed += new ClientHeadersParsed(HttpClient_OnClientHeadersParsed); this.OnRemoteHeadersParsed += new RemoteHeadersParsed(HttpClient_OnRemoteHeadersParsed); }
///<summary>Initializes a new instance of the PortMapClient class.</summary> ///<param name="ClientSocket">The <see cref ="Socket">Socket</see> connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> ///<param name="MapTo">The IP EndPoint to send the incoming data to.</param> public PortMapClient(Socket ClientSocket, DestroyDelegate Destroyer, IPEndPoint MapTo) : base(ClientSocket, Destroyer) { this.MapTo = MapTo; }
///<summary>Initializes a new instance of the SocksClient class.</summary> ///<param name="ClientSocket">The Socket connection between this proxy server and the local client.</param> ///<param name="Destroyer">The method to be called when this SocksClient object disconnects from the local client and the remote server.</param> ///<param name="AuthList">The list with valid username/password combinations.</param> ///<remarks>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.</remarks> public SocksClient(Socket ClientSocket, DestroyDelegate Destroyer, AuthenticationList AuthList) : base(ClientSocket, Destroyer) { this.AuthList = AuthList; }
///<summary>Initializes a new instance of the Client class.</summary> ///<param name="ClientSocket">The <see cref ="Socket">Socket</see> connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> public Client(Socket ClientSocket, DestroyDelegate Destroyer) { this.ClientSocket = ClientSocket; this.Destroyer = Destroyer; }
private static extern int Internal_BIO_meth_set_destroy(BIO_METHOD biom, DestroyDelegate method);
///<summary>Initializes a new instance of the FtpClient class.</summary> ///<param name="ClientSocket">The Socket connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> public FtpClient(SecureSocket ClientSocket, DestroyDelegate Destroyer) : base(ClientSocket, Destroyer) {}
public GFWPressEncryptForwarder(Socket ClientSocket, DestroyDelegate Destroyer, Socket DestinationSocket, SecretKey key) : base(ClientSocket, Destroyer) { ClientSocket.Blocking = false; this.DestinationSocket = DestinationSocket; this._key = key; }
public HttpClient(Socket ClientSocket, DestroyDelegate Destroyer, IValidator validator) : base(ClientSocket, Destroyer) { UserValidator = validator; }
///<summary>Initializes a new instance of the HttpClient class.</summary> ///<param name="ClientSocket">The <see cref ="Socket">Socket</see> connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> public HttpClient(Socket ClientSocket, DestroyDelegate Destroyer) : base(ClientSocket, Destroyer) { m_bIsFtpConn = false; m_bIsValidUser = false; }
///<summary>Initializes a new instance of the Client object.</summary> ///<remarks>Both the ClientSocket property and the DestroyDelegate are initialized to null.</remarks> public Client() { this.ClientSocket = null; this.Destroyer = null; }
///<summary>Initializes a new instance of the FtpClient class.</summary> ///<param name="ClientSocket">The Socket connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> public FtpClient(SecureSocket ClientSocket, DestroyDelegate Destroyer) : base(ClientSocket, Destroyer) { }
public HttpRequest(Socket clientSocket, DestroyDelegate destroyer, UpdateRequestDelegate updateRequest) { _clientSocket = clientSocket; _destroyer = destroyer; _updateRequest = updateRequest; }
public HttpClient(Socket clientSocket, DestroyDelegate destroyer, UpdataUrlLog updataUrlLog) : base(clientSocket, destroyer) { _updataUrlLog = updataUrlLog; }
//private IPEndPoint m_MapTo; public TransparentForwarder(Socket ClientSocket, DestroyDelegate Destroyer, Socket DestinationSocket) : base(ClientSocket, Destroyer) { //this.MapTo = MapTo; this.DestinationSocket = DestinationSocket; }
///<summary>Initializes a new instance of the Client object.</summary> ///<remarks>Both the ClientSocket property and the DestroyDelegate are initialized to null.</remarks> public Forwarder() { this.ClientSocket = null; this.Destroyer = null; _buffer = new byte[32 * 1024]; }
public ProxyClient(ProxyConfig config, Socket ClientSocket, DestroyDelegate Destroyer) : base(ClientSocket, Destroyer) { Config = config; }
/// <summary>Holds the value of the Buffer property.</summary> //private byte[] m_Buffer = new byte[64*1024]; //0<->4095 = 4096 ///<summary>Initializes a new instance of the Client class.</summary> ///<param name="ClientSocket">The <see cref ="Socket">Socket</see> connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> public Forwarder(Socket ClientSocket, DestroyDelegate Destroyer) { this.ClientSocket = ClientSocket; this.Destroyer = Destroyer; _buffer = new byte[32 * 1024]; }
public static void BIO_meth_set_destroy(BIO_METHOD biom, DestroyDelegate method) { var returnCode = Internal_BIO_meth_set_destroy(biom, method); ThrowOnErrorReturnCode(returnCode); }
///<summary>Initializes a new instance of the HttpClient class.</summary> ///<param name="ClientSocket">The <see cref ="Socket">Socket</see> connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> public HttpClient(Socket ClientSocket, DestroyDelegate Destroyer) : base(ClientSocket, Destroyer) { }
public HttpClient(Socket ClientSocket, DestroyDelegate Destroyer) : base(ClientSocket, Destroyer) { }
///<summary>Initializes a new instance of the HttpClient class.</summary> ///<param name="ClientSocket">The <see cref ="Socket">Socket</see> connection between this proxy server and the local client.</param> ///<param name="Destroyer">The callback method to be called when this Client object disconnects from the local client and the remote server.</param> public HttpClient(Socket ClientSocket, DestroyDelegate Destroyer) : base(ClientSocket, Destroyer) { BlackList = LoadBlacklist(); }