aboutsummaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-01 05:22:38 +0100
committertv <tv@krebsco.de>2026-11-01 05:22:38 +0100
commit6bab0c4af15988e3c0d4e38de3ee9c1f8c4a8be2 (patch)
tree088b1c5156ce237f0be885f620b28a7d1252b333 /src/config
parent35eade856a9b445920ec07eacdeaf153239d8ec9 (diff)
libp2p: autoignore unroutable address ranges
Diffstat (limited to 'src/config')
-rw-r--r--src/config/mod.rs10
1 files changed, 10 insertions, 0 deletions
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
@@ -303,6 +303,13 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[
"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,
"BOOL",
@@ -517,6 +524,9 @@ pub(crate) struct Settings {
pub(crate) libp2p_prefer: Vec<String>,
#[serde(default)]
#[cfg_attr(not(feature = "libp2p"), allow(dead_code))]
+ pub(crate) libp2p_internet_hosts: Vec<String>,
+ #[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<PathBuf>,