Enigma SFU
Enigma SFU is a Rust SFU core focused on forwarding RTP/RTCP for group audio/video without hard participant caps. It exposes an HTTP control plane for room lifecycle and WebRTC signaling so operators can layer their own admission control, quotas, and policies.
Why an SFU
Peer-to-peer meshes break down as rooms grow. An SFU receives encrypted media from publishers and forwards it to subscribers without decrypting payloads, keeping bandwidth predictable while leaving end-to-end encryption to the endpoints.
No hard participant limits
The crate never enforces a maximum number of rooms or peers. Operators handle admission by policy, auth tokens, reverse proxies, or external orchestration. Configuration knobs cover timeouts, bitrate caps per sender, and idle cleanup only.
Features
- HTTP signaling API for creating rooms, joining, trickle ICE, and leaving
- Room and router engine that maps publishers to subscribers and forwards RTP/RTCP
- Optional HMAC token checks for control plane requests
- Extensible hooks for metrics and policy enforcement
Quickstart
Example signaling calls (replace host/port as needed):
Safety and E2EE
Media payloads stay opaque to the SFU. It inspects headers for routing only. If clients use insertable streams or SFrame, decryption stays at the endpoints.
Contributing
CI-friendly tests rely on synthetic packets and in-process HTTP calls, so they do not need real devices. Contributions should preserve the no-panic rule for library code and keep JSON payloads strict.