latest.ipv8.messaging.anonymization.tunnel
Module Contents
Classes
Hop contains all information needed to add/remove a single layer of |
|
Statistics for a tunnel to a peer over a circuit (base class for circuits, exit sockets, and relay routes). |
|
A peer-to-peer encrypted communication channel, consisting of 0 or more hops (intermediate peers). |
|
Relay object containing the destination circuit, socket address and whether it is online or not. |
|
Rendezvous for circuits to link up. |
|
A point of introduction, available for linking up. |
|
A group of circuit exits that organizes around an SHA-1. |
Attributes
- latest.ipv8.messaging.anonymization.tunnel.FORWARD = 0
- latest.ipv8.messaging.anonymization.tunnel.BACKWARD = 1
- latest.ipv8.messaging.anonymization.tunnel.PEER_SOURCE_UNKNOWN = 0
- latest.ipv8.messaging.anonymization.tunnel.PEER_SOURCE_DHT = 1
- latest.ipv8.messaging.anonymization.tunnel.PEER_SOURCE_PEX = 2
- latest.ipv8.messaging.anonymization.tunnel.PEER_FLAG_RELAY = 1
- latest.ipv8.messaging.anonymization.tunnel.PEER_FLAG_EXIT_BT = 2
- latest.ipv8.messaging.anonymization.tunnel.PEER_FLAG_EXIT_IPV8 = 4
- latest.ipv8.messaging.anonymization.tunnel.PEER_FLAG_SPEED_TEST = 8
- latest.ipv8.messaging.anonymization.tunnel.CIRCUIT_TYPE_DATA = 'DATA'
- latest.ipv8.messaging.anonymization.tunnel.CIRCUIT_TYPE_IP_SEEDER = 'IP_SEEDER'
- latest.ipv8.messaging.anonymization.tunnel.CIRCUIT_TYPE_RP_SEEDER = 'RP_SEEDER'
- latest.ipv8.messaging.anonymization.tunnel.CIRCUIT_TYPE_RP_DOWNLOADER = 'RP_DOWNLOADER'
- latest.ipv8.messaging.anonymization.tunnel.CIRCUIT_STATE_READY = 'READY'
- latest.ipv8.messaging.anonymization.tunnel.CIRCUIT_STATE_EXTENDING = 'EXTENDING'
- latest.ipv8.messaging.anonymization.tunnel.CIRCUIT_STATE_CLOSING = 'CLOSING'
- latest.ipv8.messaging.anonymization.tunnel.CIRCUIT_ID_PORT = 1024
- latest.ipv8.messaging.anonymization.tunnel.PING_INTERVAL = 7.5
- latest.ipv8.messaging.anonymization.tunnel.DESTROY_REASON_UNKNOWN = 1
- latest.ipv8.messaging.anonymization.tunnel.DESTROY_REASON_SHUTDOWN = 2
- latest.ipv8.messaging.anonymization.tunnel.DESTROY_REASON_UNNEEDED = 4
- class latest.ipv8.messaging.anonymization.tunnel.Hop
Hop contains all information needed to add/remove a single layer of onion encryption and send it to the next target.
- property address: latest.ipv8.types.Address
Get the address of this hop.
- property public_key: latest.ipv8.keyvault.public.libnaclkey.LibNaCLPK
Get the public key instance of the hop.
- peer: latest.ipv8.peer.Peer
- dh_first_part: latest.ipv8.keyvault.public.libnaclkey.LibNaCLPK | None
- dh_secret: latest.ipv8.keyvault.private.libnaclkey.LibNaCLSK | None
- class latest.ipv8.messaging.anonymization.tunnel.RoutingObject(circuit_id: int)
Statistics for a tunnel to a peer over a circuit (base class for circuits, exit sockets, and relay routes).
- class latest.ipv8.messaging.anonymization.tunnel.Circuit(circuit_id: int, goal_hops: int = 0, ctype: str = CIRCUIT_TYPE_DATA, required_exit: latest.ipv8.peer.Peer | None = None, info_hash: bytes | None = None)
Bases:
RoutingObject
A peer-to-peer encrypted communication channel, consisting of 0 or more hops (intermediate peers).
- property hs_session_keys: latest.ipv8.messaging.anonymization.crypto.SessionKeys | None
Get the session keys for hidden services (if any).
- class latest.ipv8.messaging.anonymization.tunnel.RelayRoute(circuit_id: int, hop: Hop, direction: int, rendezvous_relay: bool = False)
Bases:
RoutingObject
Relay object containing the destination circuit, socket address and whether it is online or not.
- class latest.ipv8.messaging.anonymization.tunnel.RendezvousPoint(circuit: Circuit, cookie: bytes)
Rendezvous for circuits to link up.
- class latest.ipv8.messaging.anonymization.tunnel.IntroductionPoint(peer: latest.ipv8.peer.Peer, seeder_pk: bytes, source: int = PEER_SOURCE_UNKNOWN, last_seen: float | None = None)
A point of introduction, available for linking up.
- class latest.ipv8.messaging.anonymization.tunnel.Swarm(info_hash: bytes, hops: int, lookup_func: Callable[[bytes, IntroductionPoint | None, int], asyncio.Future[list[IntroductionPoint]]], seeder_sk: latest.ipv8.keyvault.private.libnaclkey.LibNaCLSK | None = None, max_ip_age: float = 180.0, min_dht_lookup_interval: float = 300.0, max_dht_lookup_interval: float = 120.0)
A group of circuit exits that organizes around an SHA-1.
- add_connection(rp_circuit: Circuit, intro_point_used: IntroductionPoint) None
Add a newly known circuit to this swarm.
- remove_connection(rp_circuit: Circuit) bool
Remove the given circuit from this swarm, if we manage it.
This does not close the circuit.
- get_num_connections_incomplete() int
Get the number of circuits we don’t have yet, but know of, in this swarm.
- add_intro_point(ip: IntroductionPoint) IntroductionPoint
Add an available introduction point to this swarm.
Returns the introduction point we should use (not necessarily the one we just added).
- remove_intro_point(ip: IntroductionPoint) None
Remove the given introduction point from this swarm.
- async lookup(target: IntroductionPoint | None = None) list[IntroductionPoint] | None
Lookup introduction points, possibly those that match the given introduction point.