Add a stream relay (TURN) to the proxy for browsers that cannot connect directly #11

Merged
kibi merged 1 commits from screen-sharing into main 2026-10-01 21:35:34 +00:00
Owner

Vanadium forbids direct UDP for WebRTC, and mobile and company networks often
block direct connections; the only route then is a relay reached over TCP.

  • server/turn.ts: STUN and TURN on one port, over UDP and TCP, with
    short-lived credentials from /api/turn, quotas and a peer filter
  • The browser build fetches credentials and offers the relay automatically
  • Stats for nerds says when a stream is relayed and how the relay is reached
  • Tests: a TURN client over UDP and TCP, and a browser limited to the relay
    over TCP in the web E2E

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

Vanadium forbids direct UDP for WebRTC, and mobile and company networks often block direct connections; the only route then is a relay reached over TCP. - server/turn.ts: STUN and TURN on one port, over UDP and TCP, with short-lived credentials from /api/turn, quotas and a peer filter - The browser build fetches credentials and offers the relay automatically - Stats for nerds says when a stream is relayed and how the relay is reached - Tests: a TURN client over UDP and TCP, and a browser limited to the relay over TCP in the web E2E Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kibi added 1 commit 2026-10-01 21:35:30 +00:00
Vanadium forbids direct UDP for WebRTC, and mobile and company networks often
block direct connections; the only route then is a relay reached over TCP.

- server/turn.ts: STUN and TURN on one port, over UDP and TCP, with
  short-lived credentials from /api/turn, quotas and a peer filter
- The browser build fetches credentials and offers the relay automatically
- Stats for nerds says when a stream is relayed and how the relay is reached
- Tests: a TURN client over UDP and TCP, and a browser limited to the relay
  over TCP in the web E2E

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kibi merged commit cbd71216a8 into main 2026-10-01 21:35:34 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kibi/mumh5#11