def buildProtocol(self, addr): log.info("%s: New connection." % self.name) circuit = network.Circuit(self.transport) self.circuits.append(circuit) return SOCKSv4Protocol(circuit)
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)
def buildProtocol(self, addr): log.debug("%s: New connection." % self.name) circuit = network.Circuit(self.transport_class()) return OBFSSOCKSv5Protocol(circuit)