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 | dcd11d72359bff87cc3122171882272b5040cebe (patch) | |
| tree | 5016c71aac25399c05ebe14215b27e47d1508c0d /src/main.rs | |
| parent | c54270bdfda6dd3dcc3107693a93bd224bb65c7c (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, }, )?), |
