iroh-http-discovery
Optional local-network peer discovery for iroh-http.
Implements standard DNS-SD over
mDNS (via mdns-sd), publishing PTR + SRV
TXT+A/AAAArecords so nodes find each other on the same local network without relay servers. Because it speaks the same wire format as Apple's mDNSResponder (NWBrowser) and Android'sNsdManager, desktop nodes are discoverable from mobile.
Note: This crate is included automatically when you use the platform adapters with default features. You only need to depend on it directly if you are building a custom Rust integration on top of
iroh-http-core.
- Node.js →
@momics/iroh-http-node- Deno →
@momics/iroh-http-deno- Tauri →
@momics/iroh-http-tauri
When to use
- Desktop apps (macOS, Linux, Windows) that need local peer discovery
- Node.js servers on a LAN
Platform architecture
- Desktop uses this crate's
mdns-sdtransport. - iOS/Android use
NWBrowser/NetServiceandNsdManageras transport adapters, then reuse this crate's platform-neutral session engine and peer projection through the Tauri plugin. - Environments with only relay/DNS discovery do not need local DNS-SD.
Usage
This crate is typically not used directly. Enable the mdns feature in your platform adapter or pass it to iroh-http-core via NodeOptions:
const node = await createNode({
discovery: { mdns: true, serviceName: "my-app" }
});
License
MIT OR Apache-2.0