예제 #1
0
    def buildProtocol(self, addr):
        log.info("%s: New connection." % self.name)

        circuit = network.Circuit(self.transport)
        self.circuits.append(circuit)

        return SOCKSv4Protocol(circuit)
예제 #2
0
    def buildProtocol(self, addr):
        log.debug("%s: New connection from %s:%d." % (self.name, log.safe_addr_str(addr.host), addr.port))

        circuit = network.Circuit(self.transport_class())

        # XXX instantiates a new factory for each client
        clientFactory = ExtORPortClientFactory(circuit, self.cookie_file, addr, self.transport_name)
        reactor.connectTCP(self.ext_or_host, self.ext_or_port, clientFactory)

        return network.StaticDestinationProtocol(circuit, 'server', addr)
예제 #3
0
    def buildProtocol(self, addr):
        log.debug("%s: New connection." % self.name)

        circuit = network.Circuit(self.transport_class())

        return OBFSSOCKSv5Protocol(circuit)