From c64a96723ec068fa7a9a7b60e6f7edd0f2f8603b Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Oct 2026 03:44:03 +0100 Subject: use libp2p mDNS --- src/config/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/config/mod.rs') diff --git a/src/config/mod.rs b/src/config/mod.rs index 2646e73..08a3742 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -270,6 +270,13 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ None, "With the libp2p transport: relays to be reachable through always (multiaddrs, with or without the relay's peer ID). Without, a node that can't be dialled picks members that relay (libp2p-relay) by itself. Never public ones.", ), + option( + "libp2p-mdns", + Kind::Flag, + "BOOL", + Some("false"), + "With the libp2p transport: find nodes on the LAN (multicast DNS, IPv4). Those that speak continuum are seeds while joining, so nodes on one LAN find each other without configured seeds; a swarm key keeps a new node from joining another swarm on the same LAN.", + ), option( "libp2p-key-file", Kind::Text, @@ -398,6 +405,9 @@ pub(crate) struct Settings { #[serde(default)] #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] pub(crate) libp2p_relays: Vec, + #[serde(default)] + #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] + pub(crate) libp2p_mdns: bool, #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] pub(crate) libp2p_key_file: Option, pub(crate) mycelium_rest_url: Option, -- cgit v1.3.1