Repository navigation
Add werift WebRTC fallback for peer transfers - #365
Merged
Merged
Conversation
vinayagg
marked this pull request as ready for review
November 8, 2026 06:17
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.
When direct HTTPS cannot reach another Bees Client, try a reliable WebRTC data channel using werift before falling back to the existing encrypted relay. Desktop and hosted Clients use the same transport. Setup descriptions travel through the existing authenticated relay; the resulting direct channel carries the existing certificate-pinned TLS exchange and per-thread access checks.
The integration bounds signaling and data buffers, limits setup to 15 seconds, drains writes before closing SCTP, cleans up connections on shutdown, and obtains a fresh relay grant after a failed or unsupported WebRTC attempt. STUN URLs are configurable with BEES_WEBRTC_STUN_URLS. No server API change is required.
Validation completed in the isolated worktrees:
npm run checkpassed.This branch starts at 410ef40. Current main's subsequent d37b6af imports thread-applications.js without committing that file. Merge-result CI may therefore fail until that separate upstream issue is resolved; this PR does not include unrelated application work.
Real cross-network NAT traversal and platform installer verification remain untested. No release or deployment has been performed.
Related PRs: https://github.com/Bees-bot/bees-server/pull/75 (integration tests; merge after Desktop) and https://github.com/Bees-bot/bees-website/pull/74 (publish with the Client release).