From 87694f6715bb97fc25ad335d15a1dcdd8b35ed6f Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Mon, 3 Aug 2026 09:33:49 -0400 Subject: [PATCH] Scope LAN discovery to Appa --- src/iroh.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/iroh.rs b/src/iroh.rs index 192d67c..9c504a5 100644 --- a/src/iroh.rs +++ b/src/iroh.rs @@ -36,6 +36,7 @@ mod handler; use handler::AppaProtocol; /// ALPN for Appa's Iroh control streams. A new value is wire-incompatible. pub const APPA_ALPN: &[u8] = b"appa/sync/4"; +const APPA_MDNS_SERVICE_NAME: &str = "appa"; const MAX_CONTROL_MESSAGE_BYTES: usize = 16 * 1024 * 1024; pub(crate) const MAX_AUDIT_EVENTS_PER_RESPONSE: usize = 256; const MAX_CONCURRENT_ANNOUNCEMENTS: usize = 4; @@ -580,7 +581,9 @@ async fn start_lan_discovery( endpoint: &Endpoint, discovered_peers: Arc>>, ) -> anyhow::Result> { - let discovery = MdnsAddressLookup::builder().build(endpoint.id())?; + let discovery = MdnsAddressLookup::builder() + .service_name(APPA_MDNS_SERVICE_NAME) + .build(endpoint.id())?; endpoint.address_lookup()?.add(discovery.clone()); let mut events = discovery.subscribe().await; Ok(tokio::spawn(async move { -- 2.51.2