3.0.ipv8.dht.provider
Classes
Module Contents
- class 3.0.ipv8.dht.provider.DHTIntroPointPayload
Bases:
3.0.ipv8.messaging.lazy_payload.VariablePayloadPayload to pack an introduction point’s address, most recent time of response, public key and associated seeder public key.
- names = ['address', 'last_seen', 'intro_pk', 'seeder_pk']
- format_list = ['ip_address', 'I', 'varlenH', 'varlenH']
- address: 3.0.ipv8.types.Address
- class 3.0.ipv8.dht.provider.DHTCommunityProvider(dht_community: 3.0.ipv8.dht.discovery.DHTDiscoveryCommunity, port: int)
This class is a wrapper around the DHTDiscoveryCommunity and is used to discover introduction points for hidden services.
- dht_community
- port
- logger
- async peer_lookup(mid: bytes, peer: 3.0.ipv8.peer.Peer | None = None) None
Attempt to find and connect to the given mid.
If provided, the given peer will be pinged first to potentially avoid an expensive lookup.
- async lookup(info_hash: bytes) tuple[bytes, list[3.0.ipv8.messaging.anonymization.tunnel.IntroductionPoint]] | None
Attempt to find introduction points for the given info hash (SHA-1 hash).
- async announce(info_hash: bytes, intro_point: 3.0.ipv8.messaging.anonymization.tunnel.IntroductionPoint) None
Annonce the given introduction point to server the given info hash (SHA-1).