go-libp2p icon indicating copy to clipboard operation
go-libp2p copied to clipboard

webrtc: reuse port when dialing

Open sukunrt opened this issue 2 years ago • 1 comments

depends on #2586

fixes: #2592

The fix turned out much simpler that I'd expected. Reusing the udp mux for dialing is straightforward.

Here we only reuse the listening udpmux. If not listening, a new mux is created everytime we dial.

Adds certhashes to discovered /webrtc-direct addresses. Unfortunately this is impossible to unit test currently. I'll manually verify this for now. The situation is the same for webtransport.

sukunrt avatar Oct 03 '23 17:10 sukunrt

This is not useful without further work. Even if we reuse port when dialing, we will not dial anyone with a /webrtc-direct address as we will always prefer QUIC to webrtc-direct. This means, it'll not help us much with address discovery.

sukunrt avatar May 08 '24 10:05 sukunrt