This repository was archived by the owner on Jun 19, 2023. It is now read-only.
This repository was archived by the owner on Jun 19, 2023. It is now read-only.
Dialling webrtc peers over webrtc-direct relay connection #171
Closed
Description
It's currently not possible to dial a peer over a relayed connection established with the /webrtc-direct
transport.
For example, dialing a peer with the following multiaddr results in CodeError: webrtc protocol was not present in multiaddr
/ip4/127.0.0.1/udp/9090/webrtc-direct/certhash/uEiBUr89tH2P9paTCPn-AcfVZcgvIvkwns96t4h55IpxFtA/p2p/12D3KooWB64sJqc3T3VCaubQCrfCvvfummrAA9z1vEXHJT77ZNJh/p2p-circuit/webrtc/p2p/12D3KooWFNBgv86tcpcYUHQz9FWGTrTmpMgr8feZwQXQySVTo3A7
The problem lies in the splitAddr function which breaks the addr up using /webrtc
which incorrectly matches both /webrtc-direct
and /webrtc
transports.