Expand description
Iroh’s relay is a feature within iroh, a peer-to-peer networking system designed to facilitate direct, encrypted connections between devices. Iroh aims to simplify decentralized communication by automatically handling connections through “relays” when direct connections aren’t immediately possible. The relay server helps establish connections by temporarily routing encrypted traffic until a direct, P2P connection is feasible. Once this direct path is set up, the relay server steps back, and the data flows directly between devices. This approach allows Iroh to maintain a secure, low-latency connection, even in challenging network situations.
This crate provides a complete setup for creating and interacting with iroh relays, including:
-
protos::relay
: The protocol used to communicate between relay servers and clients. It’s a revised version of the Designated Encrypted Relay for Packets (DERP) protocol written by Tailscale. -
server
: A fully-fledged iroh-relay server over HTTP or HTTPS.Optionally will also expose a stun endpoint and metrics. (requires the feature flag
server
) -
client
: A client for establishing connections to the relay. -
Server Binary: A CLI for running your own relay server. It can be configured to also offer STUN support and expose metrics.
Re-exports§
pub use protos::relay::MAX_PACKET_SIZE;
Modules§
- client
- Exposes
Client
, which allows to establish connections to a relay server. - defaults
- Default values used in the relay.
- dns
Non- wasm_browser
- DNS resolver
- http
- HTTP-specific constants for the relay server and client.
- node_
info - Support for handling DNS resource records for dialing by
NodeId
. - protos
- Protocols used by the iroh-relay
- quic
- Create a QUIC server that accepts connections for QUIC address discovery.
- server
server
- A fully-fledged iroh-relay server over HTTP or HTTPS.
Structs§
- Ping
Tracker - Tracks pings on a single relay connection.
- Relay
Map - Configuration of all the relay servers that can be used.
- Relay
Node - Information on a specific relay server.
- Relay
Quic Config - Configuration for speaking to the QUIC endpoint on the relay server to do QUIC address discovery.