summaryrefslogtreecommitdiffstats
path: root/src/config/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-27 03:46:35 +0100
committertv <tv@krebsco.de>2026-10-27 03:46:35 +0100
commite865bdb4256b28e0e49d0c4b801ff6be8ba22328 (patch)
treefc2486be9999c15bf3c48854c3e34f0d00a2dfdd /src/config/mod.rs
parentc64a96723ec068fa7a9a7b60e6f7edd0f2f8603b (diff)
add support for public libp2p infrastructure
Diffstat (limited to 'src/config/mod.rs')
-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 08a3742..bd45390 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -278,6 +278,13 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[
"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-public",
+ Kind::Flag,
+ "BOOL",
+ Some("false"),
+ "With the libp2p transport: use public libp2p infrastructure: join the IPFS DHT (through the IPFS bootstrap nodes) to find peers' addresses and public relays, picked after members that relay. Public relays only keep circuits for minutes and some KiB: enough to punch holes through NATs. Makes this node's peer ID and addresses known to the DHT.",
+ ),
+ option(
"libp2p-key-file",
Kind::Text,
"PATH",
@@ -408,6 +415,9 @@ pub(crate) struct Settings {
#[serde(default)]
#[cfg_attr(not(feature = "libp2p"), allow(dead_code))]
pub(crate) libp2p_mdns: bool,
+ #[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>,
pub(crate) mycelium_rest_url: Option<String>,