feat(webrtc): default ICE config to Google STUN so cross-network desktop connects #101

Merged
Claude-Run merged 1 commit from feat/VS-82-webrtc-ice-default-stun into main 2026-07-03 19:24:41 +02:00
Member

VA-10 wired the server to push a webrtcconfig control frame to agents and to surface the same iceServers to the browser via serverinfo, but only when an operator had set iceservers in the domain config. With no config the server pushed nothing, so both peers gathered host candidates only and the desktop-tab WebRTC data channel never opened across networks (browser: "ICE failed, add a STUN server").

Make the server ship the public Google STUN set by default. Domain::ice_servers_or_default() resolves the effective ICE-server array once (operator iceservers when set, else default_ice_servers() = stun.l.google.com:19302 plus stun1..stun4), and both push_webrtc_config (agent) and ServerInfoBody::from_domain (browser) read through it, so the agent and the browser always point at the same servers. push_webrtc_config now falls back to the default even when no config is loaded. An explicit empty iceservers array is preserved verbatim and disables ICE servers (host-candidate-only), the pre-VS-82 behavior.

TURN is carried by the same path already: iceservers holds raw RTCIceServer objects, so turn: URLs plus username/credential are pushed to both peers verbatim once a coturn deployment exists. Deploying coturn is an operational step outside this repo. README documents the default, the override/TURN shape, and the disable escape hatch.

#VS-82

VA-10 wired the server to push a `webrtcconfig` control frame to agents and to surface the same `iceServers` to the browser via `serverinfo`, but only when an operator had set `iceservers` in the domain config. With no config the server pushed nothing, so both peers gathered host candidates only and the desktop-tab WebRTC data channel never opened across networks (browser: "ICE failed, add a STUN server"). Make the server ship the public Google STUN set by default. `Domain::ice_servers_or_default()` resolves the effective ICE-server array once (operator `iceservers` when set, else `default_ice_servers()` = `stun.l.google.com:19302` plus `stun1`..`stun4`), and both `push_webrtc_config` (agent) and `ServerInfoBody::from_domain` (browser) read through it, so the agent and the browser always point at the same servers. `push_webrtc_config` now falls back to the default even when no config is loaded. An explicit empty `iceservers` array is preserved verbatim and disables ICE servers (host-candidate-only), the pre-VS-82 behavior. TURN is carried by the same path already: `iceservers` holds raw `RTCIceServer` objects, so `turn:` URLs plus `username`/`credential` are pushed to both peers verbatim once a coturn deployment exists. Deploying coturn is an operational step outside this repo. README documents the default, the override/TURN shape, and the disable escape hatch. #VS-82
feat(webrtc): default ICE config to Google STUN so cross-network desktop connects
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 2m33s
Create release / Create release from merged PR (pull_request) Has been skipped
ab6803e777
VA-10 wired the server to push a `webrtcconfig` control frame to agents and to surface the same `iceServers` to the browser via `serverinfo`, but only when an operator had set `iceservers` in the domain config. With no config the server pushed nothing, so both peers gathered host candidates only and the desktop-tab WebRTC data channel never opened across networks (browser: "ICE failed, add a STUN server").

Make the server ship the public Google STUN set by default. `Domain::ice_servers_or_default()` resolves the effective ICE-server array once (operator `iceservers` when set, else `default_ice_servers()` = `stun.l.google.com:19302` plus `stun1`..`stun4`), and both `push_webrtc_config` (agent) and `ServerInfoBody::from_domain` (browser) read through it, so the agent and the browser always point at the same servers. `push_webrtc_config` now falls back to the default even when no config is loaded. An explicit empty `iceservers` array is preserved verbatim and disables ICE servers (host-candidate-only), the pre-VS-82 behavior.

TURN is carried by the same path already: `iceservers` holds raw `RTCIceServer` objects, so `turn:` URLs plus `username`/`credential` are pushed to both peers verbatim once a coturn deployment exists. Deploying coturn is an operational step outside this repo. README documents the default, the override/TURN shape, and the disable escape hatch.

#VS-82
Claude-Run deleted branch feat/VS-82-webrtc-ice-default-stun 2026-07-03 19:24:41 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-server!101
No description provided.