Expand description
iroh-http-discovery — local mDNS peer discovery for iroh-http.
Implements standard DNS-SD (RFC 6763) mDNS so nodes on the same local network can find each other without a relay server.
Use browse_peers and advertise_peer to start discovery sessions.
§Wire format
Discovery speaks standard DNS-SD: advertising publishes PTR + SRV +
TXT + A/AAAA records under _<service_name>._udp.local, with the
service instance name set to the node’s base32 endpoint id and a pk TXT
property carrying the same id. This is what Apple’s mDNSResponder (iOS
NWBrowser) and Android’s NsdManager expect, so desktop nodes are
discoverable from mobile — the previous swarm-discovery backend omitted the
PTR record and was invisible to those browsers (issue #329).
§Platform notes
- Desktop (macOS, Linux, Windows): enabled with the
mdnsfeature (default). - iOS / Android (Tauri mobile): use the platform’s native service discovery.
Re-exports§
pub use engine::BrowseConfig;pub use engine::Protocol;pub use engine::ServiceConfig;pub use engine::ServiceRecord;pub use dns_sd::advertise;pub use dns_sd::browse;pub use dns_sd::AdvertiseSession;pub use dns_sd::BrowseSession as ServiceBrowseSession;
Modules§
- dns_sd
- Generic DNS-SD (RFC 6763) advertise/browse engine.
- engine
- Platform-independent DNS-SD engine contracts.
Structs§
- Browse
Session - Peer
Discovery Event - A discovery event suitable for FFI transport.
Enums§
- Discovery
Error - Structured error returned by
browse_peersandadvertise_peer.
Constants§
- TXT_
ADDRESS - TXT property carrying direct
ip:portaddresses, if any. - TXT_PK
- TXT property carrying the peer’s base32 endpoint id.
- TXT_
RELAY - TXT property carrying the peer’s home relay URL, if any.
Functions§
- advertise_
peer - Start advertising this node on the local network via DNS-SD.
- browse_
peers - Start a browse session: discover iroh-http peers on the local network.
- browse_
peers_ with_ engine - Project an already-started DNS-SD engine browse into an iroh endpoint.
- peer_
direct_ addresses - Select every dialable direct candidate for an iroh peer.
- peer_
service_ config_ with_ ips - Build the canonical DNS-SD advertisement for an iroh endpoint.