How thuan-hyp-1605/iroh works
Iroh is a Rust workspace for authenticated peer-to-peer QUIC connectivity, with relay and DNS/Pkarr discovery services. An application binds an endpoint, dials a peer by identity and address information, and uses QUIC streams; iroh discovers addresses and prefers direct connectivity, using relays as a fallback and attempting hole punching. The workspace also includes signed DNS address publication/resolution and standalone relay and DNS servers. The README and sampled excerpts support these principal roles; some internal wiring is omitted where source excerpts do not establish it.
Main entry points: endpoint.rs Endpoint API · address_lookup.rs Address Lookup · transports.rs Transport Selection · client.rs Relay Client
Components 24
Peer Connectivity
- Endpoint API
iroh/src/endpoint.rs - Address Lookup
iroh/src/address_lookup.rs - DNS Lookup
iroh/src/address_lookup/dns.rs - Pkarr Lookup
iroh/src/address_lookup/pkarr.rs - QUIC Connection
iroh/src/endpoint/connection.rs - Transport Selection
iroh/src/socket/transports.rs - IP Transport
iroh/src/socket/transports/ip.rs - Relay Transport
iroh/src/socket/transports/relay.rs - Network Probes
iroh/src/net_report.rs
Relay Service
- Relay Client
iroh-relay/src/client.rs - Relay Server
iroh-relay/src/server.rs - Client Registry
iroh-relay/src/server/clients.rs - Client Forwarding
iroh-relay/src/server/client.rs
DNS Discovery
- DNS Types
iroh-dns/src/lib.rs - Signed Packets
iroh-dns/src/pkarr.rs - DNS Server
iroh-dns-server/src/server.rs - HTTP Services
iroh-dns-server/src/http.rs - DNS Handler
iroh-dns-server/src/dns/node_zone_handler.rs - Zone Store
iroh-dns-server/src/store.rs
Shared Types
- Identity Types
iroh-base/src/lib.rs
Other components
- Application
- Remote Peer
- Relay Service
- DNS Service
Connections 25
- Application → Endpoint API: binds and dials
- Endpoint API → Address Lookup: resolves addresses
- Address Lookup → DNS Lookup: uses DNS
- Address Lookup → Pkarr Lookup: uses Pkarr
- Endpoint API → QUIC Connection: establishes QUIC
- QUIC Connection → Transport Selection: selects transport
- Transport Selection → IP Transport: tries direct
- Transport Selection → Relay Transport: falls back
- Endpoint API → Network Probes: measures paths
- Relay Transport → Relay Client: sends relay traffic
- Relay Client → Relay Service: connects to
- Remote Peer → Relay Service: sends encrypted traffic
- Relay Service → Remote Peer: forwards traffic
- Relay Server → Client Registry: registers clients
- Client Forwarding → Client Registry: forwards packets
- DNS Lookup → DNS Service: queries records
- Pkarr Lookup → DNS Service: resolves records
- DNS Server → DNS Handler: serves DNS
- DNS Server → HTTP Services: starts HTTP services
- DNS Handler → Zone Store: resolves zones
- DNS Types → Signed Packets: defines packet format
- Zone Store → Signed Packets: stores packets
- DNS Service → DNS Server: hosts lookup service
- Endpoint API → Identity Types: uses identities
- Relay Client → Identity Types: uses relay identity types