Skip to content

docs: let direct send run on STUN alone (protocol and vectors) - #89

Merged
TheCryptoDonkey merged 4 commits into
mainfrom
feat/direct-stun-protocol
Oct 23, 2026
Merged

TheCryptoDonkey merged 4 commits into
mainfrom
feat/direct-stun-protocol

Conversation

@TheCryptoDonkey

Copy link
Copy Markdown
Member

Direct send needed a TURN URL and a credential in every invitation. With the ForgeSworn TURN server switched off, Drop fails before it shows a link. This changes the protocol text and vectors so that STUN alone is a valid configuration. Version stays wildbloom-direct/1 (still experimental); the vector filename and constants are unchanged.

What changes in the protocol:

  • An ice entry keeps exactly {"credential","urls","username"}. An entry with any turn:/turns: URL has a username and credential of 1 to 256 bytes (unchanged). An entry of stun: URLs only has both exactly "". Anything else is a syntax refusal (failed), so a credential never goes to a STUN server and there is one canonical form.
  • The "at least one TURN URL" rule is removed. The build-time allowlist check is unchanged and still comes after syntax.
  • If the node runs no issuer (404), Drop uses a built-in stun:stun.cloudflare.com:3478. Cloudflare learns the public address of each end that does not hide. No ForgeSworn host is a default.
  • Hiding needs a TURN URL: an end that wants to hide and has none refuses (Drop before it shows a link, the page by not offering the choice).
  • The issuer's --turn-url may be stun: only (no secret) or include TURN (secret required). Operator recipes added.

Vectors: allowlist gains stun:stun.example.net:3478; new messages "invite, STUN only" and "invite, STUN server and TURN server as two entries"; the old "no TURN URL" refusal is renamed "STUN-only server with a credential" and now refuses failed; new refusals for a STUN-only username without credential, a TURN server with an empty username, and a STUN-only server off the allowlist. Hashes recomputed, syntheticOnly kept. Nothing else in the file moved.

Notes for review and merge order:

  • This PR is docs and vectors only. Drop's own vector tests (desktop/src-tauri) read this file and will fail against it until the Drop change lands, because Drop still requires a TURN URL. That PR is stacked on this branch (feat/direct-stun-protocol) and fixes them. Merge them together or in quick succession; no release in between.
  • I checked for the renamed refusal "no TURN URL" in wildbloom, wildbloom-node and the second checkout: Drop's client.rs test case of that name is an issuer-reply test, not a vector index, and is updated in the Drop PR. The page copies the vectors from this branch's head (5899ff2); if this is squash-merged, re-copy from the merge commit.
  • The README flag help for --turn-issuer is left for the wildbloomd PR.
  • No release, tag or deploy.

An ice entry of stun: URLs carries empty username and credential; an entry
with any turn: URL keeps its credential. The at-least-one-TURN rule goes, the
allowlist check stays. Drop falls back to a public STUN default when the node
runs no issuer, and hiding needs a TURN URL. Vectors cover STUN-only,
mixed entries and the new refusals.
Drop accepts an ICE entry of STUN URLs with empty credentials, and when the
node answers 404 for the issuer it uses a built-in stun:stun.cloudflare.com:3478
for both ends instead of failing with no_turn. Hiding needs a TURN URL, so a
receive with hiding on refuses with no_relay before any link is shown, and the
encoder never sends a hidden invitation without one. The hide setting now
defaults to off for installs that never set it; a stored on or off is kept.
A connection that fails with no relay on offer reports connect_direct. The
vendored direct-send bundle is rebuilt from the page change.
@TheCryptoDonkey
TheCryptoDonkey merged commit 8e2549b into main Oct 23, 2026
8 checks passed
@TheCryptoDonkey
TheCryptoDonkey deleted the feat/direct-stun-protocol branch October 23, 2026 21:36
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.

1 participant