def connection_made(self, connection): """Called when TCP connection has finished opening, but before BitTorrent protocol has begun.""" connector = Connector(self, connection, None, False, log_prefix=self.log_prefix) self.connectors.add(connector)
def _make_connector(self, s): addr = (s.ip, s.port) self.parent.cache_complete_peer(addr, self.id, type(self), encrypt=self.encrypt, urgent=self.urgent, lan=self.lan) return Connector(self.parent, s, self.id, True, obfuscate_outgoing=self.encrypt, log_prefix=self.log_prefix, lan=self.lan)
def connection_made(self, connection): """Called when TCP connection has finished opening, but before BitTorrent protocol has begun.""" if ONLY_LOCAL and connection.ip != '127.0.0.1' and not connection.ip.startswith("192.168") : return if GLOBAL_FILTER and not GLOBAL_FILTER(connection.ip, connection.port, "in"): return connector = Connector(self, connection, None, False, log_prefix=self.log_prefix) self.connectors.add(connector)