From c54270bdfda6dd3dcc3107693a93bd224bb65c7c Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Oct 2026 03:11:44 +0100 Subject: use libp2p identify protocol & announce alt addrs --- src/config/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/config') diff --git a/src/config/mod.rs b/src/config/mod.rs index dd025a2..9e63362 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -249,6 +249,13 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ None, "With the libp2p transport: where to listen, e.g. /ip4/0.0.0.0/tcp/9661 and /ip4/0.0.0.0/udp/9661/quic-v1. Without, the node only connects out. The addresses it listens on are published in the member list.", ), + option( + "libp2p-announce", + Kind::List, + "MULTIADDR,[MULTIADDR...]", + None, + "With the libp2p transport: the addresses to publish in the member list instead of those listened on, e.g. a public address forwarded to this node's listen port. Without, the listen addresses are published, loopback and link-local ones left out.", + ), option( "libp2p-key-file", Kind::Text, @@ -368,6 +375,9 @@ pub(crate) struct Settings { #[serde(default)] #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] pub(crate) libp2p_listen: Vec, + #[serde(default)] + #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] + pub(crate) libp2p_announce: Vec, #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] pub(crate) libp2p_key_file: Option, pub(crate) mycelium_rest_url: Option, -- cgit v1.3.1