latest.ipv8.dht.provider

Module Contents

Classes

DHTIntroPointPayload

Payload to pack an introduction point's address, most recent time of response, public key and associated

DHTCommunityProvider

This class is a wrapper around the DHTDiscoveryCommunity and is used to discover introduction points

class latest.ipv8.dht.provider.DHTIntroPointPayload

Bases: latest.ipv8.messaging.lazy_payload.VariablePayload

Payload 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: latest.ipv8.types.Address
last_seen: int
intro_pk: bytes
seeder_pk: bytes
class latest.ipv8.dht.provider.DHTCommunityProvider(dht_community: latest.ipv8.dht.discovery.DHTDiscoveryCommunity, port: int)

This class is a wrapper around the DHTDiscoveryCommunity and is used to discover introduction points for hidden services.

async peer_lookup(mid: bytes, peer: latest.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[latest.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: latest.ipv8.messaging.anonymization.tunnel.IntroductionPoint) None

Annonce the given introduction point to server the given info hash (SHA-1).