diff options
| author | tv <tv@krebsco.de> | 2026-10-27 02:22:24 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-27 02:22:24 +0100 |
| commit | d1926800dfdbfba213a0b5060777055d8b1dbae4 (patch) | |
| tree | 90193cc6589200d2d6363bebd183dbb96ee90698 /src/config | |
| parent | ab0a8f5782d11a264a63f2fc1c2ffa292759df4e (diff) | |
add libp2p transport
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/mod.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs index 21a8733..dd025a2 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -243,6 +243,20 @@ pub(crate) const OPTIONS: &[OptionSpec] = &[ "The transports this node uses, in order of preference: mycelium, libp2p (in builds with the libp2p feature). A peer is reached on the first one both have; nodes on several carry the traffic between nodes that share none.", ), option( + "libp2p-listen", + Kind::List, + "MULTIADDR,[MULTIADDR...]", + 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-key-file", + Kind::Text, + "PATH", + None, + "With the libp2p transport: its key (Ed25519, 32 raw bytes), which makes its peer ID; a new one each start if absent (the node ID stays the same either way).", + ), + option( "mycelium-rest-url", Kind::Text, "SCHEME://HOSTNAME:PORT", @@ -351,6 +365,11 @@ pub(crate) struct Settings { pub(crate) blob_chunk: u64, #[serde(default = "default_transports")] pub(crate) transports: Vec<String>, + #[serde(default)] + #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] + pub(crate) libp2p_listen: Vec<String>, + #[cfg_attr(not(feature = "libp2p"), allow(dead_code))] + pub(crate) libp2p_key_file: Option<PathBuf>, pub(crate) mycelium_rest_url: Option<String>, pub(crate) mycelium_key_file: Option<PathBuf>, pub(crate) mycelium_network_key_file: Option<PathBuf>, |
