Skip to content

Commit

Permalink
fix: do not use tcp/ws for relay connections
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin committed Nov 13, 2024
1 parent a2f30d7 commit 37a3caf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sn_networking/src/relay_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PeerId>) -> Option<Multiaddr> {
// skip tcp/ws addrs
if addr
.iter()
.any(|protocol| matches!(protocol, Protocol::Ws(_)))
{
return None;
}

let mut output_addr = Multiaddr::empty();

let ip = addr
Expand Down

0 comments on commit 37a3caf

Please sign in to comment.