3.0.ipv8.messaging.anonymization.endpoint

Classes

Module Contents

class 3.0.ipv8.messaging.anonymization.endpoint.TunnelEndpoint(endpoint: 3.0.ipv8.messaging.interfaces.endpoint.Endpoint)

Endpoint implementation that routes all data through a TunnelCommunity.

endpoint
hops = 0
tunnel_community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity | None = None
settings: dict[bytes, bool]
send_queue: collections.deque[tuple[3.0.ipv8.types.Address, bytes]]
set_tunnel_community(tunnel_community: 3.0.ipv8.messaging.anonymization.community.TunnelCommunity | None, hops: int = 1) None

Configure this endpoint to create tunnels of a given number of hops over the given community.

set_anonymity(prefix: bytes, enable: bool) None

Enable or disable tunneling for the given community id.

send(address: 3.0.ipv8.types.Address, packet: bytes) None

Send the given packet to a certain address.

notify_listeners(packet: tuple[3.0.ipv8.types.Address, bytes], from_tunnel: bool = False) None

Ensure packets are only delivered if they follow they are properly encrypted.

__getattribute__(item: str) Any

Forward anything that is not inside of this class to our wrapped endpoint.