You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue for a spec-aligned /webrtc-direct listener that demuxes concurrent inbound dials on one advertised UDP port via STUN (no HTTP /sdp harness), including WebRTC-Direct v1 and v2 version-prefix dispatch per libp2p/specs#715.
This is the next step after the ICE-mux primitive in #1397 / spike #1352. Umbrella: #546. Scaffolding from #1309 remains v1 / experimental and still uses the HTTP SDP harness for node-to-node.
Background
WebRTC-Direct v1 and v2 are no-signaling transports. The listener reconstructs the dialer's offer from the inbound STUN connectivity check:
Read USERNAME = server_ufrag:client_ufrag
Dispatch on version prefix (libp2p+webrtc+v1/ vs libp2p+webrtc+v2/)
For v2: recover client_pwd by stripping libp2p+webrtc+v2/ from server_ufrag, then set the server's own ICE ufrag/pwd to server_ufrag before answering (critical for ICE)
Summary
Tracking issue for a spec-aligned
/webrtc-directlistener that demuxes concurrent inbound dials on one advertised UDP port via STUN (no HTTP/sdpharness), including WebRTC-Direct v1 and v2 version-prefix dispatch per libp2p/specs#715.This is the next step after the ICE-mux primitive in #1397 / spike #1352. Umbrella: #546. Scaffolding from #1309 remains v1 / experimental and still uses the HTTP SDP harness for node-to-node.
Background
WebRTC-Direct v1 and v2 are no-signaling transports. The listener reconstructs the dialer's offer from the inbound STUN connectivity check:
USERNAME=server_ufrag:client_ufraglibp2p+webrtc+v1/vslibp2p+webrtc+v2/)client_pwdby strippinglibp2p+webrtc+v2/fromserver_ufrag, then set the server's own ICE ufrag/pwd toserver_ufragbefore answering (critical for ICE)v2 exists because Chromium is removing SDP ICE-credential munging (libp2p/specs#672). Spec PR libp2p/specs#715 is approved but not yet merged; Go reference support has landed (go-libp2p#3520); JS is in progress (js-libp2p#3480).
Internal note / roadmap compiled from the spec:
downloads/AI-PR-REVIEWS/1309/WebRTC_NewSpecs.md(local maintainer doc).Prerequisites
UdpMuxshared-port demux — #1397 (merge when CI is green)UdpMuxto aioice / pin tested aioice versionsScope (checklist)
Listener (server) — primary
UdpMuxintolistener.py(replace HTTP/sdpharness for the spec path; keep harness only if still useful for py↔py experiments, clearly marked)set_unknown_stun_handler: parseUSERNAME, validate both ufrag halves (RFC 8839ice-char/ length), reject malformed inputserver_ufragprefix:libp2p+webrtc+v1/→ v1 flowlibp2p+webrtc+v2/→ v2 flow (recoverclient_pwd, set local ICE creds toserver_ufragbefore answer)c=line — IP only, not port, fingerprint handling per spec)setup:passive)register_addrafter ICE nomination; teardown unregister order documented and testedDialer / SDP seam
_apply_ice_credentials()into explicit v1 vs v2 behavior (v2: no local offer munging; embedclient_pwdin synthetic answer ufrag/pwd)Interop and docs
masterNon-goals (for this issue)
/webrtcvia relay) polish — see #773 / umbrella #546References
Suggested sequencing
UdpMux).UdpMux(v1 acceptance + v2 path).