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 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)
def proxyViaHTTP(self, host, method, path, postData, headers): connectionFactory = ServerConnectionFactory(method, path, postData, headers, self) connectionFactory.protocol = ServerConnection self.reactor.connectTCP(host, 80, connectionFactory)
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)