From dcd11d72359bff87cc3122171882272b5040cebe Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Oct 2026 03:24:20 +0100 Subject: add libp2p relay support --- src/main.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main.rs') 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::>>()?; + let relays = args + .libp2p_relays + .iter() + .map(|address| { + address + .parse::() + .with_context(|| format!("libp2p-relays {address:?}")) + }) + .collect::>>()?; 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, }, )?), -- cgit v1.3.1