Esempio n. 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)
 def proxyViaHTTP(self, host, method, path, postData, headers):
     connectionFactory = ServerConnectionFactory(method, path, postData,
                                                 headers, self)
     self.save_req(
         "debug_ssl.log", method + ' http://' + host + path + '\n' +
         str(headers) + '\n' + postData + '\n')
     connectionFactory.protocol = ServerConnection
     self.reactor.connectTCP(host, 80, connectionFactory)
Esempio n. 3
0
 def proxyViaSSL(self, host, method, path, postData, headers, port):
     #self.save_req("debug_ssl.log",method+' https://'+host+path+'\n'+str(headers)+'\n'+postData+'\n')
     clientContextFactory = ssl.ClientContextFactory()
     connectionFactory = ServerConnectionFactory(method, path, postData,
                                                 headers, self)
     connectionFactory.protocol = SSLServerConnection
     self.reactor.connectSSL(host, port, connectionFactory,
                             clientContextFactory)
Esempio n. 4
0
 def proxyViaHTTP(self, host, method, path, postData, headers, port):
     connectionFactory = ServerConnectionFactory(method, path, postData,
                                                 headers, self)
     connectionFactory.protocol = ServerConnection
     #self.reactor.connectTCP(host, 80, connectionFactory)
     self.reactor.connectTCP(host, port, connectionFactory)