diff options
| author | tv <tv@krebsco.de> | 2026-10-29 04:32:42 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-29 04:32:42 +0100 |
| commit | 355c85940b387c292cc65e2a291b6990d4ac6234 (patch) | |
| tree | 92348e4a1def1d1792577db303c0db6e4ad480b2 /src/config/mod.rs | |
| parent | a17bc7e17109bc680f841498007adf72be3c735f (diff) | |
libp2p: add UPnP support
Diffstat (limited to 'src/config/mod.rs')
| -rw-r--r-- | src/config/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index cfe2e7e..cb4bf19 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -292,6 +292,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-upnp", + Kind::Flag, + "BOOL", + Some("false"), + "With the libp2p transport: ask the router to forward this node's listen ports (UPnP), and publish where (the router's public address), so that nodes elsewhere can dial it: behind a home router, no relay or hole punching is needed then. Opens those ports on the router for as long as the node runs.", + ), + option( "libp2p-public", Kind::Flag, "BOOL", @@ -458,6 +465,9 @@ pub(crate) struct Settings { pub(crate) libp2p_mdns: bool, #[serde(default)] #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] + pub(crate) libp2p_upnp: 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>, |
