-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: WebRTC reuse QUIC conn #2889
Conversation
We should infer the address from the quic address like we do for webtransport. It'll work seamlessly once we have the same logic as inferWebtransportAddrsFromQuic This is more useful for webrtc than for other transports as a server will never dial |
switches to version from libp2p/go-libp2p#2889
switches to version from libp2p/go-libp2p#2889
switches to version from libp2p/go-libp2p#2889
switches to version from libp2p/go-libp2p#2889
switches to version from libp2p/go-libp2p#2889
Discussed out of band about changes to make this order agnostic with the QUIC transport, since, as it is implemented in this PR, the QUIC listener starts first. Sukun and I agreed the existing logic is good enough. Which is to sort the listeners and start the QUIC listener first (if there is one). Summary of the points we discussed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for pushing this forward, reusing same port has big impact for DX/UX, allowing us faster rollout with less hiccups.
Took it for a spin in ipfs/kubo#10463 and fx
seems to have issue with libp2pwebrtc.ListenUDPFn
.
To reproduce, rebase this PR on top of #2887, to ensure WebRTC Direct is enabled by default, then run go test ./...
: fx
errors with missing type: libp2pwebrtc.ListenUDPFn
(same error as in https://github.com/ipfs/kubo/pull/10463/files#r1697532128).
I don't think we actually need this anymore. I've made a PR to remove that function here #2892. |
That was my mistake sorry. I think it was complaining that it couldn't create the WebRTC transport for the AutoNAT host because I didn't provide it to it (only for the basic host). |
b3e96ef
to
dfd9ec8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks @MarcoPolo 🎉
This lets users listen on the same port for WebRTC and QUIC. Kubo folks asked for this as it would be very beneficial to their deployment.
One open question for me is: