Repository navigation
feat(drop): receive over STUN alone when the node runs no TURN server - #90
Merged
TheCryptoDonkey merged 2 commits intoOct 23, 2026
Merged
Conversation
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
merged commit Oct 23, 2026
b9aa792
into
feat/direct-stun-protocol
7 of 8 checks passed
Member
Author
|
Included in #89, which carries these commits and was squash-merged to main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #89 (protocol and vectors); the base is that branch and GitHub will retarget it when #89 merges. Pairs with forgesworn/wildbloom#104 (the page).
Drop no longer needs the node to run a TURN issuer. It fails neither with
no_turnnor before showing a link when there is none.Changes (all under
desktop/):messages.rs:IceServer::well_formedtakes the two forms (any TURN URL: username and credential 1 to 256 bytes; STUN URLs only: both empty). The "no TURN URL" check is gone from the reader and from the encoder, which now refuseshide: truewithout a TURN URL instead, so Drop never sends a hidden invitation it cannot honour. NewDEFAULT_STUN_URL = "stun:stun.cloudflare.com:3478"anddefault_stun(); a test pins the exact string (the page has the matching test) and that it names no ForgeSworn host.client.rs: the issuer reply parser accepts STUN-only entries with empty credentials and refuses a STUN-only entry with a credential, a TURN entry with an empty field, and so on.receive.rs: a 404 from the issuer becomes the built-in STUN entry for both ends (expires: 0, which a direct send does not read). With hiding on and no TURN URL it returnsno_relaybeforeopen_pairing, so no link is made and no relay session is allocated. This is a small pure function,ice_for_receive, with unit tests for each answer.no_turnis removed.onstays on, storedoffstays off). Settings status,app.js,drop.jsand the test stub follow. This is the owner-decided flip.session.rs: a session that never connects reportsconnect_directinstead ofconnectwhen no TURN URL was on offer.DROP-IPC.md:no_turnremoved;no_relaynow points to Settings;connect_directadded ("...Some networks, like mobile data or work Wi-Fi, don't allow it. Nothing was kept.").scripts/vendor-direct.mjsfrom forgesworn/wildbloom feat/direct-stun-page at e04bdef (the page code commit). The provenance names that commit. If #104 is squash-merged, rebuild from the merge commit before releasing Drop (node scripts/vendor-direct.mjs --checkout ../wildbloom --commit <sha>).Tests run (local, macOS):
cargo test --locked --manifest-path desktop/src-tauri/Cargo.toml(after fixing one harness assertion of mine; the run that failed was my own new test), then thedrop::tests again aftercargo fmt;cargo clippy --all-targets -D warningson the desktop crate;node desktop/tests/drop-ui.mjs(71 scenarios),node desktop/tests/direct-window.mjs(15, including a new one that a STUN-only server reachesRTCPeerConnectionwith no username or credential member);vendor-direct.mjs --check --checkoutrebuilds byte for byte.pools-ui.mjsand the native acceptance scripts were not run.Spec deviations: the session tests for "404 gives the default invite" and "hide on plus 404" are unit tests of
ice_for_receiveplus the harness test forconnect_direct; a fullopen_receivetest needs a live node and device identity (the e2e harness), which I did not extend. The Drop release, the hide-default flip going out, and signing remain owner decisions; nothing is released or tagged.