Пример #1
0
 def proxyViaSSL(self, host, method, path, postData, headers, port):
     clientContextFactory = ssl.ClientContextFactory()
     connectionFactory = ServerConnectionFactory(method, path, postData,
                                                 headers, self)
     connectionFactory.protocol = SSLServerConnection
     self.reactor.connectSSL(host, port, connectionFactory,
                             clientContextFactory)
Пример #2
0
 def proxyViaSSL(self, host, method, path, postData, headers, port):
     host, method, path, postData, headers, port=self.pmgr.onProxy(self.getClientIP(),host, method, path, postData, headers, port, True)
     clientContextFactory       = ssl.ClientContextFactory()
     connectionFactory          = ServerConnectionFactory(method, path, postData, headers, self)
     connectionFactory.protocol = S1SSLServerConnection
     self.reactor.connectSSL(host, port, connectionFactory, clientContextFactory)
Пример #3
0
 def proxyViaHTTP(self, host, method, path, postData, headers):
     connectionFactory = ServerConnectionFactory(method, path, postData,
                                                 headers, self)
     connectionFactory.protocol = ServerConnection
     self.reactor.connectTCP(host, 80, connectionFactory)
Пример #4
0
 def proxyViaHTTP(self, host, method, path, postData, headers):
     port=80
     host, method, path, postData, headers, port=self.pmgr.onProxy(self.getClientIP(),host, method, path, postData, headers, port, False)
     connectionFactory          = ServerConnectionFactory(method, path, postData, headers, self)
     connectionFactory.protocol = S1ServerConnection
     self.reactor.connectTCP(host, port, connectionFactory)