Skip to content

docs(webrtc): STUN listener vs /sdp harness, and v1/v2 dial guidance - #1513

Merged
acul71 merged 2 commits into
libp2p:mainfrom
yashksaini-coder:docs/webrtc-direct-v1-v2-and-harness
Sep 9, 2026
Merged

acul71 merged 2 commits into
libp2p:mainfrom
yashksaini-coder:docs/webrtc-direct-v1-v2-and-harness

Conversation

@yashksaini-coder

@yashksaini-coder yashksaini-coder commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

@acul71 Closes #1511. Part of the #1437 track (acul71's docs follow-up).

WebRTC-Direct had no user-facing guidance on two easy-to-confuse choices. This clarifies both, in the libp2p.transport.webrtc package docstring and the README:

  • Signalling path: the spec STUN listener (default, the only path that interoperates with go/js/browsers) vs the experimental POST /sdp harness (enable_sdp_http_harness, py↔py debugging only, not interoperable — leave off in production).
  • Dial version: the listener accepts both; the dialer picks via webrtc_direct_dial_version. v1 is the migration default while specs#715 is unmerged; v2 is recommended (no SDP munging) and is what browser dialling needs once NoSdpMangleUfrag is widespread. Default flips to v2 once specs#715 lands.

Docs-only — no code change. Package still imports; ruff clean on the touched module.

Separate the two WebRTC-Direct signalling paths — the spec STUN listener
(default, the only interoperable path) vs the dev-only POST /sdp harness — and
add v1-vs-v2 dial guidance: v1 as the migration default while specs#715 is
unmerged, v2 recommended and required for browser dialling once NoSdpMangleUfrag
is widespread. Package docstring + README.

Closes libp2p#1511

@acul71 acul71 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Docs-only follow-up for #1511 / the #1437 track — LGTM.

  • Clearly separates the spec STUN listener (interop default) from the experimental POST /sdp harness.
  • v1 migration default vs recommended v2 (specs#715 / browser dial once NoSdpMangleUfrag is widespread) matches the transport behaviour.
  • newsfragments/1511.docs.rst is present and correctly typed; branch is merge-clean and CI is green.

Optional polish (non-blocking): avoid nesting POST /sdp inside bold in the package docstring so Sphinx doesn’t render literal backticks, and keep webrtc_direct_dial_version=1|2 on one line.

Approve — squash-merge.

@acul71
acul71 merged commit 82f2399 into libp2p:main Sep 9, 2026
38 checks passed
@yashksaini-coder
yashksaini-coder deleted the docs/webrtc-direct-v1-v2-and-harness branch September 9, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(webrtc): document WebRTC-Direct STUN listener vs /sdp harness, and v1 vs v2

2 participants