feat: Add TURN server support
All checks were successful
Queue Release Build / prepare (push) Successful in 15s
Deploy Web Apps / deploy (push) Successful in 5m35s
Queue Release Build / build-linux (push) Successful in 24m45s
Queue Release Build / build-windows (push) Successful in 13m52s
Queue Release Build / finalize (push) Successful in 23s
All checks were successful
Queue Release Build / prepare (push) Successful in 15s
Deploy Web Apps / deploy (push) Successful in 5m35s
Queue Release Build / build-linux (push) Successful in 24m45s
Queue Release Build / build-windows (push) Successful in 13m52s
Queue Release Build / finalize (push) Successful in 23s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Realtime Infrastructure
|
||||
|
||||
Low-level WebRTC and WebSocket plumbing that the rest of the app sits on top of. Nothing in here knows about Angular components, NgRx, or domain logic. It exposes observables, signals, and callbacks that higher layers (facades, effects, components) consume.
|
||||
Low-level WebRTC and WebSocket plumbing plus the Angular-facing runtime boundary that the rest of the app sits on top of. Most files here stay technical and framework-light, but this area does use Angular signals and DI, shared-kernel contracts, and a small screen-share domain adapter at the composition boundary. It exposes observables, signals, and callbacks that higher layers (facades, effects, components) consume.
|
||||
|
||||
## Module map
|
||||
|
||||
@@ -9,6 +9,8 @@ realtime/
|
||||
├── realtime-session.service.ts Composition root (WebRTCService)
|
||||
├── realtime.types.ts PeerData, credentials, tracker types
|
||||
├── realtime.constants.ts ICE servers, signal types, bitrates, intervals
|
||||
├── ice-server-settings.service.ts Persisted STUN/TURN configuration
|
||||
├── screen-share.config.ts Shared screen-share options and presets
|
||||
│
|
||||
├── signaling/ WebSocket layer
|
||||
│ ├── signaling.manager.ts One WebSocket per signaling URL
|
||||
@@ -56,7 +58,7 @@ realtime/
|
||||
|
||||
## How it all fits together
|
||||
|
||||
`WebRTCService` is the composition root. It instantiates every other manager, then wires their callbacks together after construction (to avoid circular references). No manager imports another manager directly.
|
||||
`WebRTCService` is the composition root. It instantiates the main managers, then wires their callbacks together after construction to avoid the old monolithic tangle and break circular initialization. Some focused helpers still depend on other managers or their types, but cross-cutting orchestration stays centralized here instead of being spread across the runtime.
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
@@ -378,9 +380,10 @@ Instead of connecting peers directly:
|
||||
|
||||
This approach is more reliable in restrictive network environments but introduces additional latency and bandwidth overhead, since all traffic flows through the relay instead of directly between peers.
|
||||
|
||||
Toju/Zoracord does not use TURN and does not have code written to support it.
|
||||
MetoYou ships with STUN-only defaults in `ICE_SERVERS`, but the runtime does support TURN entries through `IceServerSettingsService` and standard `RTCIceServer` credentials. There is no bundled TURN service or default TURN configuration in the repo.
|
||||
|
||||
### Summary
|
||||
|
||||
- **ICE** coordinates connection establishment by trying multiple network paths
|
||||
- **STUN** provides public-facing address discovery for NAT traversal
|
||||
- **TURN** is an optional relay fallback that this runtime can be configured to use, but it is not bundled or enabled by default
|
||||
|
||||
Reference in New Issue
Block a user