Compare commits

..
2 Commits
Author SHA1 Message Date
MoepchiandClaude Opus 5.5 70423d0114 docs: README/roadmap catch up with streaming, languages, sync and idle check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-12-02 08:26:33 +00:00
MoepchiandClaude Opus 5.5 9c67471b49 gateway: idle timeout applies to sockets opened after a change
Each socket keeps the IDLE_TIMEOUT_MINUTES it was told in its hello.
Raising it from 0 in the admin panel used to drop already connected
pages after a few minutes without asking, since they never learned they
have to send "active".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-30 23:34:06 +00:00
3 changed files with 20 additions and 13 deletions

No files matched your search

+6 -3
View File
@@ -95,14 +95,16 @@ not need to be installed on the same machine, modified, or operated by you.
| 👉 **Poke & away status** | Poke clients with an optional message; set yourself away with presets or a custom status | | 👉 **Poke & away status** | Poke clients with an optional message; set yourself away with presets or a custom status |
| ⭐ **Favorites & reconnect** | Remembers your last server/nickname; switch servers without leaving your tab | | ⭐ **Favorites & reconnect** | Remembers your last server/nickname; switch servers without leaving your tab |
| 📱 **Mobile-friendly layout** | Responsive single-column layout for narrow screens, not just a shrunk desktop UI | | 📱 **Mobile-friendly layout** | Responsive single-column layout for narrow screens, not just a shrunk desktop UI |
| 🌍 **Localized UI** | Interface available in German, English, Simplified Chinese, and Persian (Beta), detected automatically or switchable in Options | | 🌍 **Localized UI** | Interface available in German, English, Czech, Simplified Chinese, Persian (Beta), and Russian (Beta), detected automatically or switchable in Options |
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference | | 🌗 **Themes & Design Store** | Dark and light mode, plus community designs you can browse, install, or upload from the built-in Design Store |
| ☁️ **Account sync** | Carry identities, favorites, settings and designs to your other devices. No email, no name, end-to-end encrypted in the browser |
| 💤 **"Are you still there?"** | Optional idle check: after a gateway-set time without input the client asks, and disconnects if nobody answers (`IDLE_TIMEOUT_MINUTES`) |
| 🔁 **Multi-join (server tabs)** | Several connections in parallel — one tab per server, like VoySpeak. Audio stays on the active tab | | 🔁 **Multi-join (server tabs)** | Several connections in parallel — one tab per server, like VoySpeak. Audio stays on the active tab |
| 🔁 **Seamless reconnect** | Switch or add connections mid-session without tearing down unrelated tabs; dropped connections come back on their own, with the channel tree intact | | 🔁 **Seamless reconnect** | Switch or add connections mid-session without tearing down unrelated tabs; dropped connections come back on their own, with the channel tree intact |
| ⌨️ **Keyboard & screen readers** | Arrow keys through the channel tree (exposed as an ARIA tree) and through menus, Enter joins, context-menu key opens the menu; focus-trapped dialogs, labelled toolbar buttons | | ⌨️ **Keyboard & screen readers** | Arrow keys through the channel tree (exposed as an ARIA tree) and through menus, Enter joins, context-menu key opens the menu; focus-trapped dialogs, labelled toolbar buttons |
| 🍵 **VoySpeak support** | Connects to real VoySpeak servers (formerly GreenTeaSpeak), not just TS3/TS6/TeaSpeak | | 🍵 **VoySpeak support** | Connects to real VoySpeak servers (formerly GreenTeaSpeak), not just TS3/TS6/TeaSpeak |
| 📟 **TeamSpeak 2** | <sub>**EXPERIMENTAL**</sub> Voice, channels, private messages and server messages on old TS2 servers. Registered accounts work too, and the server type "Auto" detects TS2 on its own. Off by default, the gateway enables it with `ENABLE_TS2=1` | | 📟 **TeamSpeak 2** | <sub>**EXPERIMENTAL**</sub> Voice, channels, private messages and server messages on old TS2 servers. Registered accounts work too, and the server type "Auto" detects TS2 on its own. Off by default, the gateway enables it with `ENABLE_TS2=1` |
| 🖥️ **Screen streaming to/from TS6** | <sub>**ALPHA · UNSTABLE**</sub> Share your screen to native TeamSpeak 6 clients and watch theirs. Built on TS6's undocumented Stream/Call protocol — expect it to break; see [Roadmap](ROADMAP.md) | | 🖥️ **Screen & camera streaming with TS6** | Share your screen and camera (also both at once) with native TeamSpeak 6 clients and watch theirs. Watch several streams in a grid, focus one, or pop them out into their own window. Streams show up as tiles and as clickable icons in the channel tree. Built on TS6's undocumented Stream/Call protocol, so a TS6 update can still break it; see [Roadmap](ROADMAP.md) |
## 🧱 Tech Stack ## 🧱 Tech Stack
@@ -248,6 +250,7 @@ All optional; add them under `environment:` in your compose override next to `PO
| `ALLOWED_ORIGINS` | unset (any origin) | Comma-separated list of web origins allowed to open `/ws` (e.g. `https://client.example.com`). Stops other websites from silently using your gateway as their relay. | | `ALLOWED_ORIGINS` | unset (any origin) | Comma-separated list of web origins allowed to open `/ws` (e.g. `https://client.example.com`). Stops other websites from silently using your gateway as their relay. |
| `MAX_CONNECTIONS_PER_IP` / `MAX_CONNECTIONS` | `10` / `60` | Concurrent `/ws` connections per client IP and in total (each can hold a live TeamSpeak session). `0` disables a limit. | | `MAX_CONNECTIONS_PER_IP` / `MAX_CONNECTIONS` | `10` / `60` | Concurrent `/ws` connections per client IP and in total (each can hold a live TeamSpeak session). `0` disables a limit. |
| `TURNSTILE_SITE_KEY` / `TURNSTILE_SECRET` | *(unset)* | Optional [Cloudflare Turnstile](https://developers.cloudflare.com/turnstile/) bot check before connecting. With both set, a browser solves the (usually invisible) check once and gets a pass bound to its IP for 12 h. Keeps scripts from opening TeamSpeak connections through your gateway. | | `TURNSTILE_SITE_KEY` / `TURNSTILE_SECRET` | *(unset)* | Optional [Cloudflare Turnstile](https://developers.cloudflare.com/turnstile/) bot check before connecting. With both set, a browser solves the (usually invisible) check once and gets a pass bound to its IP for 12 h. Keeps scripts from opening TeamSpeak connections through your gateway. |
| `IDLE_TIMEOUT_MINUTES` | `0` (off) | Minutes without input after which the client asks "Are you still there?". No answer within 60 s disconnects; the gateway also closes connections that stop reporting activity. Changeable live in the admin panel (applies to new connections). |
| `CONNECT_RATE_LIMIT` | `30` | Server connects per client IP per minute. Each one starts a new TeamSpeak session, so this stops anyone from flooding a server through your gateway. `0` disables it. | | `CONNECT_RATE_LIMIT` | `30` | Server connects per client IP per minute. Each one starts a new TeamSpeak session, so this stops anyone from flooding a server through your gateway. `0` disables it. |
| `TRUST_PROXY` | off | Only when the gateway is reachable **solely** through a proxy/tunnel, so per-IP limits see the real client instead of the proxy: `cloudflare` (Cloudflare Tunnel or proxy) uses `CF-Connecting-IP`; `1` (your own nginx/Caddy/Traefik) uses the last `X-Forwarded-For` entry, the one your proxy appended. Don't set it on a directly exposed gateway - clients could then fake their IP. | | `TRUST_PROXY` | off | Only when the gateway is reachable **solely** through a proxy/tunnel, so per-IP limits see the real client instead of the proxy: `cloudflare` (Cloudflare Tunnel or proxy) uses `CF-Connecting-IP`; `1` (your own nginx/Caddy/Traefik) uses the last `X-Forwarded-For` entry, the one your proxy appended. Don't set it on a directly exposed gateway - clients could then fake their IP. |
| `TELEMETRY` | on | Set to `0` to turn off the anonymous usage ping (see below). | | `TELEMETRY` | on | Set to `0` to turn off the anonymous usage ping (see below). |
+6 -6
View File
@@ -17,17 +17,17 @@ This roadmap is intentionally outcome-focused. It does not promise fixed dates.
- File transfers, local session recording, sound packs, and administration tools - File transfers, local session recording, sound packs, and administration tools
- Design Store: browse, upload, rate, and download community-made themes - Design Store: browse, upload, rate, and download community-made themes
- Opt-in WASM AEC3 echo cancellation for speaker+mic setups - Opt-in WASM AEC3 echo cancellation for speaker+mic setups
- Responsive desktop and mobile interfaces in German, English, Simplified Chinese, and Persian (Beta) - Responsive desktop and mobile interfaces in German, English, Czech, Simplified Chinese, Persian (Beta), and Russian (Beta)
- Docker image and Compose-based self-hosting - Docker image and Compose-based self-hosting
## Experimental or still being validated ## Experimental or still being validated
- **Screen streaming to and from TeamSpeak 6 (alpha, unstable).** WebSpeak3 can - **Screen and camera streaming with TeamSpeak 6.** WebSpeak3 can publish a
publish a screen share that a native TS6 client can watch, and watch a stream screen share and a camera (also both at once) that native TS6 clients can
a TS6 client publishes. It speaks TS6's Stream/Call protocol, which TeamSpeak watch, and watch several TS6 streams at once in a grid or a pop-out window. It speaks TS6's Stream/Call protocol, which TeamSpeak
does not document, so the wire format was derived from observed behavior and does not document, so the wire format was derived from observed behavior and
may break with any TS6 update. Connection setup, picture quality, and viewer may break with any TS6 update. Connection setup and picture quality can still
admission are not yet dependable. The "Server" connection mode (TS6's SFU) is vary with network conditions. The "Server" connection mode (TS6's SFU) is
not implemented; only direct P2P works. Streaming needs a gateway from v0.11.0-beta.1 not implemented; only direct P2P works. Streaming needs a gateway from v0.11.0-beta.1
on; since v0.15 the gateway announces its features when the browser connects, on; since v0.15 the gateway announces its features when the browser connects,
so newer features stay hidden behind an older gateway instead of hanging. so newer features stay hidden behind an older gateway instead of hanging.
+8 -4
View File
@@ -626,6 +626,10 @@ interface HeartbeatState {
isAlive: boolean; isAlive: boolean;
/** Last "active" message (user input in the page) or connect. */ /** Last "active" message (user input in the page) or connect. */
lastActive: number; lastActive: number;
/** Idle timeout this socket was told in its hello. A later change in the
* admin panel applies to new sockets only: older pages don't know they
* must send "active" and would be dropped without being asked. */
idleMs: number;
} }
/** IDLE_TIMEOUT_MINUTES in ms, 0 = off. Read per check, the admin panel changes it live. */ /** IDLE_TIMEOUT_MINUTES in ms, 0 = off. Read per check, the admin panel changes it live. */
@@ -656,8 +660,7 @@ const heartbeatTimer = setInterval(() => {
socket.terminate(); socket.terminate();
continue; continue;
} }
const idleMs = idleTimeoutMs(); if (state.idleMs > 0 && Date.now() - state.lastActive > state.idleMs + IDLE_GRACE_MS) {
if (idleMs > 0 && Date.now() - state.lastActive > idleMs + IDLE_GRACE_MS) {
// Close handler disconnects the TS session; the message tells the page // Close handler disconnects the TS session; the message tells the page
// this was deliberate, so it doesn't auto-reconnect. // this was deliberate, so it doesn't auto-reconnect.
socket.send('{"type":"idleTimeout"}'); socket.send('{"type":"idleTimeout"}');
@@ -748,16 +751,17 @@ wss.on("connection", (socket: WebSocket, req: IncomingMessage) => {
// pulled, so the browser must not assume a feature exists just because it // pulled, so the browser must not assume a feature exists just because it
// knows about it. A gateway without "hello" (before v0.15) supports the // knows about it. A gateway without "hello" (before v0.15) supports the
// v0.14 feature set, streaming included; anything newer gets a name here. // v0.14 feature set, streaming included; anything newer gets a name here.
const idleMs = idleTimeoutMs();
socket.send( socket.send(
JSON.stringify({ JSON.stringify({
type: "hello", type: "hello",
features: gatewayFeatures(), features: gatewayFeatures(),
iceServers: turnServers(), iceServers: turnServers(),
idleTimeoutMinutes: idleTimeoutMs() / 60_000, idleTimeoutMinutes: idleMs / 60_000,
}), }),
); );
heartbeats.set(socket, { isAlive: true, lastActive: Date.now() }); heartbeats.set(socket, { isAlive: true, lastActive: Date.now(), idleMs });
socket.on("pong", () => { socket.on("pong", () => {
const state = heartbeats.get(socket); const state = heartbeats.get(socket);
if (state) state.isAlive = true; if (state) state.isAlive = true;