Publisher state was a single slot; it is now one publisher per source,
each with its own tile (preview, viewers, join requests). The stream
button opens the dialog with the source that is not running yet
preselected and only stops everything once both run.
StreamPublisher used to claim any own notifystreamstarted, so a second
broadcast would have stolen the first one's id. It now only takes an id
while it is starting and has none, and the app starts one publisher at
a time so that stays unambiguous.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
In the separate window the grid now picks the column count that makes
the 16:9 tiles largest for the current window size and stream count, and
re-picks on resize. The pop-out/back button moved from a bar above the
grid into each tile header: in the corner the bar got pushed out of view
once the tiles overflowed, and "align-content: end" made that overflow
unreachable (now "safe end").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Watched streams and our own broadcast are tiles in one grid (two columns
in the corner), any tile can be enlarged across the grid, and the whole
grid can move into its own browser window via a React portal; closing
that window brings it back.
main.tsx now reloads once when the App chunk (or a lazy chunk) fails to
load, which is what left a black screen right after the last deploy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Viewer state was a single slot, so opening a second stream closed the
first. It is now keyed by publisher clid: each stream gets its own
StreamViewer and panel (they already stack bottom-right), "watch" on a
stream that is open is a no-op, and closing one leaves the others running.
StreamViewer already ignored events for other stream ids, so only the app
state changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Every JSON store (ping, store, news, sync, admin auth, config) wrote to one
shared "<file>.tmp" and renamed it. Parallel requests raced on that path:
one rename won, the others failed with ENOENT, and overlapping writes could
leave a mangled file that reads as empty after a restart. Seen live from a
parallel /api/ping probe.
writeFileAtomic() in net.ts queues writes per file, so the last caller's
data always lands last.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
A legacy ftupload line had no size check, and every upload body stayed in
memory until the server answered and the transfer finished, which a
client-chosen ftlimit can stretch to days. One client could park any
amount of memory in its connector (measured: +8 MiB per 8 MiB upload,
never released). Legacy uploads now respect MAX_UPLOAD_BYTES, and all
held upload bodies share a budget of 2x MAX_UPLOAD_BYTES per connector,
released when an upload finishes or fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
A server could make the connector buffer without bound: packets far
ahead of the next expected one went into the reorder map, fragments
were appended until one arrived with fragment 0. Packets more than 256
ahead are now dropped unacknowledged (a real server resends them), and
a fragmented message over 1 MiB ends the session.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
normalizeCss stripped /* */ without knowing about strings or escapes, so
content:"/*" ... "*/" hid a url() between them from the checks, and
-webkit-image-set( slipped past the function-name boundary. The checks
now run with and without comment stripping and allow a vendor prefix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
stripPort("[allowed]evil.tld") returned "allowed", so the allowlist
accepted the host while the connector resolved and contacted evil.tld.
A bracketed host may now only be followed by :port.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Message handlers on one WebSocket run concurrently. A connect awaiting the
previous connector's teardown could still spawn a new connector after the
socket closed, or two connects could both spawn and one got lost. Either
way the connector kept running outside MAX_CONNECTIONS and shutdown.
Each connect now detaches the previous connection before awaiting it and
only spawns if it is still the newest connect on an open socket; the
disconnect message and the close handler detach the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
/admin (enabled by ADMIN_USER + ADMIN_PASSWORD) lets self-hosters change
most .env settings at runtime. Overrides live in ADMIN_CONFIG_FILE and are
written onto process.env, so the modules now read their settings at use
time instead of at load time.
- Sidebar navigation with search, DE/EN, light/dark, phone layout
- "Restart required" group (PORT, TLS, paths, WEB_STATIC) plus a restart
button that goes through the graceful SIGTERM path
- Status line: version, uptime, connected users
- Optional TOTP 2FA: QR setup, code check, switch on/off in the panel
- Password change in the panel (scrypt hash in ADMIN_AUTH_FILE); every
credential change re-asks the current password; deleting the file
falls back to .env
- Login rate limits, CSRF header, HttpOnly/SameSite session cookie, CSP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
- Move-client dialog, permission editor and whisper menu list channels in
channel-tree order (parent, then its subchannels) instead of a flat sort
by the per-parent order index or no sort at all.
- A refused banclient now shows an error naming the usual causes; the UI
logs "Ban requested" instead of claiming the ban succeeded.
- The connector sends a stable HWID derived from the identity's UID instead
of tsclientlib's built-in one shared by every web user.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Connect dialog no longer prefills "localhost" (always rejected on the
public gateway); empty field with an example placeholder instead.
- Empty channel tree on desktop gets a Connect button and, outside the demo,
a "No server? Try the demo" link.
- While a connection is being set up the tree shows a spinner,
"Connecting to <host>…" and a Cancel button instead of "Not connected".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
With TURNSTILE_SITE_KEY and TURNSTILE_SECRET set, the gateway answers a
connect without a valid pass with "turnstileRequired". The browser solves
the (usually invisible) check and resends the connect with the token; the
gateway verifies it and hands out a pass bound to the client IP for 12 h,
so reconnects and new tabs skip the check. Off by default.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Rejections at the WebSocket upgrade (429) were silent, so a client
hammering MAX_CONNECTIONS_PER_IP left no trace. Now logged as a
[ratelimit] line like the connect rate limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Built-in group icons (Server Admin, Channel Admin, ...) were plain coloured
letter circles. Now a small person with the group's initial in a coloured
badge, in the style of the mute icons. Own artwork, not a copy of the
native client's icons.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Like the native client: server group icons, channel group icon, then the
flag on the far right. The channel group list is now fetched on connect
like the server group list, and its custom icons are downloaded too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
- Country flag is the rightmost icon, after the group icons.
- Flags render through the Twemoji Country Flags font (CC-BY 4.0), since
Chromium on Windows has no flag emoji and shows the two letters.
unicode-range keeps it to flag characters and loads it only on demand.
- Away is the 💤 again, still in place of the talk dot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
- Connector: --login-name/--login-password (TS_LOGIN_NAME/TS_LOGIN_PASSWORD)
send a registered login (flag 2 + account name + password).
- Server type "auto" retries as TeamSpeak 2 when the TS3 handshake gets no
answer, only with ENABLE_TS2=1. Default port 9987 is swapped for 8767.
- Gateway and connect dialog pass account name/password for TS2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
- Voice packets: packet counter before conversation id (native client order);
swapped, the native client stuttered on WebSpeak3 voice.
- Logout: wait for and ack the server's own 'player left'; leaving earlier
kept us half-present and listed as a ghost to clients joining meanwhile.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
New connector module (connector/src/ts2.rs) speaks the TS2 UDP protocol:
login, channel and player lists, Speex voice both ways, status flags,
channel switching, private messages and server messages. Channel/server
chat goes through too but the server only delivers it when the user has
the text permission; a refusal shows up as an error.
Off by default. ENABLE_TS2=1 on the gateway adds "ts2" as a server type
and feature; the connect dialog offers it only then, read from the new
GET /api/features. Documented in the README.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
Below 700px (or with the demo's mobile toggle) the client switches to its own
shell instead of squeezing the desktop layout: header with the menu behind a
hamburger, one full-height panel at a time (channels / chat / info), big
mic / sound / leave buttons and a tab bar at the bottom. Touch targets are at
least 44px, the chat input is 16px so iOS doesn't zoom. Desktop is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU