From 37a3cafda5d4e3b574fdc4df1cd55438f64159ba Mon Sep 17 00:00:00 2001 From: Roland Sherwin Date: Thu, 14 Nov 2024 02:40:06 +0530 Subject: [PATCH] fix: do not use tcp/ws for relay connections --- sn_networking/src/relay_manager.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sn_networking/src/relay_manager.rs b/sn_networking/src/relay_manager.rs index 8628b08151..4221fd7bdd 100644 --- a/sn_networking/src/relay_manager.rs +++ b/sn_networking/src/relay_manager.rs @@ -238,6 +238,14 @@ impl RelayManager { /// The listen addr should be something like /ip4/198.51.100.0/tcp/55555/p2p/QmRelay/p2p-circuit/ fn craft_relay_address(addr: &Multiaddr, peer_id: Option) -> Option { + // skip tcp/ws addrs + if addr + .iter() + .any(|protocol| matches!(protocol, Protocol::Ws(_))) + { + return None; + } + let mut output_addr = Multiaddr::empty(); let ip = addr