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 | 6f0634115f7669d8077fbdaf72fb412799a99f10 (patch) | |
| tree | c06a65865348c5f1961403a2c2233fc6350d2190 /src/config | |
| parent | 4dc662f81a288a2c214a731708329b7b76bea108 (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>, |
