def dataReceived(self, data):
     if self.connectedRemote is None:
         Proxy.dataReceived(self, data)
     else:
         # Once proxy is connected, forward all bytes received
         # from the original client to the remote server.
         self.connectedRemote.transport.write(data)
Beispiel #2
0
 def dataReceived(self, data):
     if self.connectedRemote is None:
         Proxy.dataReceived(self, data)
     else:
         # Once proxy is connected, forward all bytes received
         # from the original client to the remote server.
         self.connectedRemote.transport.write(data)
Beispiel #3
0
 def dataReceived(self, data):
     if self._tunnelproto:
         self._tunnelproto.dataReceived(data)
     elif self._sadface:
         self._sadface.transport.write(data)
     else:
         Proxy.dataReceived(self, data)
Beispiel #4
0
 def dataReceived(self, data):
     # 数据收到后,如果代理服务器自己的请求,自己接收,
     if self.connectedRemote is None:
         Proxy.dataReceived(self, data)
     else:
         # Once proxy is connected, forward all bytes received
         # from the original client to the remote server.
         # 如果是远程客户端的请求,则将数据传给远程客户端
         self.connectedRemote.transport.write(data)
 def dataReceived(self, data):
     if self.connectedRemote is None:
         log.msg('%d bytes received from origin (client)' % (len(data)))
         Proxy.dataReceived(self, data)
     else:
         # Once proxy is connected, forward all bytes received
         # from the original client to the remote server.
         self.connectedRemote.transport.write(data)
         log.msg('%d bytes transferred to destination (remote)' % (len(data)))
Beispiel #6
0
 def dataReceived(self, data): 
     """ 
     If there is a tunnel connection, forward the stream; otherwise 
     behave just like Proxy. 
     """ 
     if self._tunnelproto is None: 
         Proxy.dataReceived(self, data) 
     else: 
         self._tunnelproto.transport.write(data) 
Beispiel #7
0
 def dataReceived(self, data):
     """ 
     If there is a tunnel connection, forward the stream; otherwise 
     behave just like Proxy. 
     """
     if self._tunnelproto is None:
         Proxy.dataReceived(self, data)
     else:
         self._tunnelproto.transport.write(data)
Beispiel #8
0
 def dataReceived(self, data):
     # 数据收到后,如果代理服务器自己的请求,自己接收,
     if self.connectedRemote is None:
         Proxy.dataReceived(self, data)
     else:
         # Once proxy is connected, forward all bytes received
         # from the original client to the remote server.
         # 如果是远程客户端的请求,则将数据传给远程客户端
         self.connectedRemote.transport.write(data)
Beispiel #9
0
 def dataReceived(self, data):
     """Fires when data is received from the remote. If a CONNECT 
     request was issued, the data is sent directly to the client, 
     else it will be processed by the Proxy class from Twisted.
     
     @param data: Data received from the remote
     """
     if self.connectedRemote is None:
         Proxy.dataReceived(self, data)
     else:
         # Once proxy is connected, forward all bytes received
         # from the original client to the remote server.
         self.connectedRemote.transport.write(data)
Beispiel #10
0
 def dataReceived(self, data):
     if self._tunnel:
         self._tunnel.transport.write(data)
     else:
         Proxy.dataReceived(self, data)