예제 #1
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)
예제 #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)
예제 #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)
예제 #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)
예제 #5
0
 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)))
예제 #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) 
예제 #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)
예제 #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)
예제 #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)
예제 #10
0
파일: proxy.py 프로젝트: JonAder/mhqs
 def dataReceived(self, data):
     if self._tunnel:
         self._tunnel.transport.write(data)
     else:
         Proxy.dataReceived(self, data)