From 6bab0c4af15988e3c0d4e38de3ee9c1f8c4a8be2 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2026 05:22:38 +0100 Subject: libp2p: autoignore unroutable address ranges --- 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 c45f1d0..ea323e1 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -302,6 +302,13 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ None, "With the libp2p transport: address ranges that matter most, best first, e.g. the LAN's 10.23.0.0/16: of the many addresses a node listening everywhere has, those there are published first, and of a peer's, kept first and dialled with the others. Without, public addresses come first.", ), + option( + "libp2p-internet-hosts", + Kind::List, + "HOST,[HOST...]", + None, + "With the libp2p transport: hosts on the internet (names or addresses, e.g. one.one.one.one), only to tell whether this node has a route to the internet, per IPv4 and IPv6 (asked of the routing table every 30 s; nothing is sent to them). Where it has none, its own public addresses of that family aren't published. Without, or for a family none of them has, it isn't asked.", + ), option( "libp2p-relay", Kind::Flag, @@ -517,6 +524,9 @@ pub(crate) struct Settings { pub(crate) libp2p_prefer: Vec, #[serde(default)] #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] + pub(crate) libp2p_internet_hosts: Vec, + #[serde(default)] + #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] pub(crate) libp2p_public: bool, #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] pub(crate) libp2p_key_file: Option, -- cgit v1.3.1