def __init__(self, my_peer, endpoint, network): super(MultiProxy, self).__init__(my_peer, endpoint, network) self.peers_dict = {} self.be_server = True self.socks5_factory = Socks5Factory(self) self.forward_factory = ForwardFactory(self) self.server_factory = ServerFactory(self) self.open_socks5_server() self.settings = TunnelSettings() self.settings.become_exitnode = False self.port = self.endpoint.get_address()[1] if not self.be_server: reactor.listenTCP(self.port, self.forward_factory) self.logger.debug("Forwarder is listening on port: {}".format( self.port)) else: reactor.listenTCP(self.port, self.server_factory) self.logger.debug("Server is listening on port: {}".format( self.port))
def __init__(self, my_peer, endpoint, network): super(MultiProxyClient, self).__init__(my_peer, endpoint, network) self.settings = TunnelSettings() self.settings.become_exitnode = False self.forward_factory = ForwardFactory(self) reactor.listenTCP(self.port, self.forward_factory)
def __init__(self, my_peer, endpoint, network): super(MyCommunity, self).__init__(my_peer, endpoint, network) self.settings = TunnelSettings() self.settings.become_exitnode = False self.nodes = {}