Crate iroh_net

source ·
Expand description

iroh-net provides connectivity for iroh.

This crate is a collection of tools to establish connectivity between peers. At the high level MagicEndpoint is used to establish a QUIC connection with authenticated peers, relaying and holepunching support.

The “relay-only” feature forces all traffic to send over the relays. We still receive traffic over udp and relay. This feature should only be used for testing.

Re-exports§

Modules§

  • Configuration types.
  • Default values used in iroh-net
  • A dialer to dial nodes
  • Trait and utils for the node discovery mechanism.
  • This module exports a DNS resolver, which is also the default resolver used in the crate::MagicEndpoint if no custom resolver is configured.
  • Cryptographic key handling for iroh-net.
  • An endpoint that leverages a quinn::Endpoint and transparently routes packages via direct conenctions or a relay when necessary, optimizing the path to target nodes to ensure maximum connectivity.
  • Co-locating all of the iroh-net metrics structs
  • Networking related utilities
  • Checks the network conditions from the current host.
  • Allows sending ICMP echo requests to a host in order to determine network latency.
  • Port mapping client and service.
  • Package relay implements a revised version of the Designated Encrypted Relay for Packets (DERP) protocol written by Tailscale. The relay routes packets to clients using curve25519 keys as addresses. The relay is used to proxy encrypted QUIC packets through the relay servers when a direct path cannot be found or opened. The relay is a last resort. If both sides have very aggressive NATs, or firewalls, or no IPv6, we use the relay connection. Based on tailscale/derp/derp.go
  • STUN packets sending and receiving.
  • Tickets supported by iroh-net
  • TLS configuration based on libp2p TLS specs.
  • Utilities used in iroh-net

Structs§

  • Addressing information to connect to a peer.
  • A peer and it’s addressing information.

Type Aliases§

  • The identifier for a node in the (iroh) network.