diff options
| author | tv <tv@krebsco.de> | 2026-10-27 03:24:20 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-27 03:24:20 +0100 |
| commit | e9964a7bde6e8b1f83b0721c47b0e4b2b35961cb (patch) | |
| tree | 38dc2de092de82a1a02f972ccb4441b085d71620 /src/main.rs | |
| parent | 3455b1ddb2f2ea95a1fb770882b5230d45a7d3de (diff) | |
add libp2p relay support
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 6168bc9..c933497 100644 --- a/src/main.rs +++ b/src/main.rs @@ -196,6 +196,15 @@ async fn main() -> Result<()> { .with_context(|| format!("libp2p-announce {address:?}")) }) .collect::<Result<Vec<_>>>()?; + let relays = args + .libp2p_relays + .iter() + .map(|address| { + address + .parse::<libp2p::Multiaddr>() + .with_context(|| format!("libp2p-relays {address:?}")) + }) + .collect::<Result<Vec<_>>>()?; let key = transport::p2p::Libp2pConfig::load_key(args.libp2p_key_file.as_deref())?; ( "libp2p", @@ -204,6 +213,8 @@ async fn main() -> Result<()> { key, listen, announce, + relays, + relay: args.libp2p_relay, memory: false, }, )?), |
