From 4dd3b0758f6ace7a9092329b0355c0c83d585898 Mon Sep 17 00:00:00 2001 From: Adin Schmahmann Date: Wed, 8 Jun 2022 23:02:28 -0400 Subject: [PATCH] feat: allow dialing wss peers using DNS multiaddrs --- p2p/transport/websocket/websocket.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p/transport/websocket/websocket.go b/p2p/transport/websocket/websocket.go index a65fcdccf1..851da9ed1e 100644 --- a/p2p/transport/websocket/websocket.go +++ b/p2p/transport/websocket/websocket.go @@ -23,7 +23,7 @@ var WsFmt = mafmt.And(mafmt.TCP, mafmt.Base(ma.P_WS)) // This is _not_ WsFmt because we want the transport to stick to dialing fully // resolved addresses. -var dialMatcher = mafmt.And(mafmt.IP, mafmt.Base(ma.P_TCP), mafmt.Or(mafmt.Base(ma.P_WS), mafmt.Base(ma.P_WSS))) +var dialMatcher = mafmt.And(mafmt.Or(mafmt.IP, mafmt.DNS), mafmt.Base(ma.P_TCP), mafmt.Or(mafmt.Base(ma.P_WS), mafmt.Base(ma.P_WSS))) func init() { manet.RegisterFromNetAddr(ParseWebsocketNetAddr, "websocket")