latest.ipv8.messaging.anonymization.endpoint

Module Contents

Classes

TunnelEndpoint

Endpoint implementation that routes all data through a TunnelCommunity.

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

Endpoint implementation that routes all data through a TunnelCommunity.

set_tunnel_community(tunnel_community: latest.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: latest.ipv8.types.Address, packet: bytes) None

Send the given packet to a certain address.

notify_listeners(packet: tuple[latest.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.