Add chrome.json slot mode "toolbar" with grouped and per-action recovery buttons, page-specific anchor candidates and sanitized toolbar style tokens. Keep the floating capsule as the bad-anchor fallback, hide the duplicate plugin launcher, and preserve legacy capsule slots. Document the full contract, add a minimal toolbar example package, and cover the new behavior in unit and browser tests.
Keep health checks, rollback reporting, launcher recovery, and download failure handling consistent so verified updates cannot report false success or crash during recoverable I/O failures.
- Ship one POSIX launcher that repairs an interrupted code swap before Node
starts, install it atomically before the swap, and keep it out of
CODE_ENTRIES so it always survives at the install root.
- Restore from the in-progress task backup (state.json task.id ->
backups/<id>) first, then the newest complete backup, so a leftover older
backup never resurrects an obsolete build.
- Add exact-window SIGKILL recovery tests, including the stale-backup case.
- Gate Linux arm64 apply behind a capability check; add five-language copy
and i18n labels for arm64, lock and unavailable errors.
- Harden the L2 runner handshake and recheck runner health before exit.
- Copy the restart runner with every runtime import (restart-runner.js,
code-swap.js, version.js, update-state.js) and fail the apply when the
runner exits during the startup grace window instead of reporting a task
that never restarted.
- Accept official tar/zip relative symlinks that stay inside the extraction
root while still refusing absolute, drive-qualified, escaping and hard-link
entries.
- Have the restart runner take over the update lock for the same task, keep
live or unreadable locks, and copy EXDEV entries into a temporary name
before renaming so a partial copy cannot replace the previous tree.
- Disable console apply for Windows release packages with
WINDOWS_APPLY_UNVERIFIED while still reporting available versions.
- Clarify in zh/en docs and five-language console copy that SHA256SUMS.txt is
an integrity checksum, not a signature, and that verification targets the
official Linux x64 build-release.yml package.
- Add tests for the failing EXDEV copy, live/unreadable/dead locks, same-task
lock takeover, a real spawned runner compiled from source, and
initialization leaving another live process's task untouched.
Recovered after the original 04bd82e object was lost from the worktree history; the working tree still contained the same ten-file fix (249 insertions).
Check official GitHub Releases, require SHA256SUMS, safely extract and swap release-package code, roll back on failed health checks, and persist task state across restarts. Docker and source deployments stay check-only. Add updater tests, route security tests and five-language admin copy.
- Host-owned controls refuse font tokens naming the compiler's scoped skin
font prefix (ws-), so a skin @font-face gated behind a non-matching @media
(absent from document.fonts) cannot blank labels after a resize; the theme
binding also re-reads tokens on viewport resize for @media-scoped tokens.
- A token palette is accepted only if black or white text reaches 4.5:1 on its
accent; mid-tone accents (~4.23:1) now fall back as a group.
- Protected app-DOM controls reject var()/attr() for filter, clip and
content-visibility, which could smuggle opacity(0)/rect(0,0,0,0)/hidden past
the literal hide checks; literal filters and other parts are unchanged.
- Docs and tests updated (unit + headless-Chrome fixture).
App-DOM protected parts keep only hide/off-screen/disable guards; host-owned recovery capsule, skin-load banner and authorization dialog read one sanitized --skin-host-* token set with per-part overrides (--skin-recovery-*, --skin-load-recovery-*, --skin-permission-*) via the new host-control-tokens module.
- chrome.json#slots names an existing skin data-ws-part as anchor for host.recovery
(align start/center/end, optional compact); host/trusted parts rejected as anchors
- reusable host-slot-placement module: positions the closed-shadow top-layer
capsule over the anchor, re-checks visibility/size/on-screen/elementFromPoint,
snaps back to the default corner on any failure with anti-flap re-slotting
- --skin-recovery-* tokens (accent/background/foreground/radius/font/size tier)
sanitized with 28px minimum hit target and WCAG contrast fallback
- compact mode only after 5s full display post-activation; shortcut always full
- no new skin CSS compile-time restrictions; docs and host-chrome-demo updated
Only inspect keyframe frames an animation can rest on, parse animation names correctly, and close remaining hide-selector and value bypasses while still allowing large layout restyles.
Hold @keyframes to the same hide/yeet checks as regular declarations,
including escaped and namespaced animation names. Loosen decorative
host-chrome layout locks so open skins can restyle layout freely.
Listen for the recovery shortcut in the capture phase, move the
load-failure banner into the host-owned layer, and fix recovery
aria-labels.
Allow skins to theme host chrome through a second scope and explicit
visibleParts. Official and built-in skins stay decoration-free by
default.
Harden the CSS compiler so skins cannot hide the document root, push
protected controls off-screen, or target the host layer with sibling
selectors. Move recovery and authorization UI into a closed Shadow DOM
on the top layer, so a third-party skin cannot block the built-in
skin reset.
Classify IPv6 subnets numerically, reserve login capacity before hashing, bind authentication to credential revisions, revoke other sessions on password rotation, reuse trusted proxy client keys and bound PCM encoding by monotonic time. Credit ph1gros for the findings and proposed regression cases.
Adopt the pinned published TeamSpeak SDK and direct relay routing.
Add optional TeamSpeak Query administration with encrypted credentials
and separate WebSpeak access, site, operations and skin management.
Distribute Discord Voice through the GitHub skin index, preserve skin
state during updates, and correct KAAK scaling and screen fullscreen.
Validation: 831 tests; backend and frontend builds; five-language UI
checks from narrow screens through 4K and local Query fixture actions.
resolveClientIp() read X-Forwarded-For, then X-Real-IP, then the socket
address, taking whichever parsed first, with no notion of who wrote them.
Every visitor can set those headers on the WebSocket upgrade, so the address
recorded for a connection was chosen by the client rather than observed. It is
logged when the client starts connecting, when it reaches TeamSpeak and when
its session ends, and readConnectionHistory() turns those lines into the source
column of the admin connection log, so a visitor could put any address into the
audit trail.
Nothing else was affected: join, mobile and admin-login rate limiting key on
request.socket.remoteAddress, and the admin audit records no address at all, so
no admission or authentication decision depended on the forwarded value.
Forwarding headers are now read only when the peer that sent them is a declared
proxy. A trusted chain is walked from the hop nearest to us towards the client,
and the first address that is not a trusted proxy is reported, so a value a
client injects to the left of the entry its proxy appended is never recorded.
X-Real-IP is used only for a trusted peer that sent no chain, and never in
preference to one: a proxy appends its peer to X-Forwarded-For, whereas
X-Real-IP is only as good as the proxy configuration and can still carry a
client value if it is forwarded rather than overwritten.
Whoever we believe can choose what we record, so the default trusts loopback
alone. That keeps a reverse proxy on the same host working, including the
published host-network container. WEBSPEAK_TRUSTED_PROXIES takes IPs and CIDRs
for anything else; an invalid entry stops startup instead of silently narrowing
what is trusted.
Tests cover the direct-client case including the mapped IPv4 peer form, the
chain walk over IPv4 and IPv6, chains that are trusted end to end, X-Real-IP
gating, default loopback, CIDR and ::ffff: entries, and rejected
misconfiguration.
The browser uplink judged an incoming PCM frame before it resolved the audio
route, so a frame that arrived while the route was down was reported as
malformed. Every frame is discarded in that state whatever its size, which made
the error a misattribution and, worse, a spurious client-side failure: the
browser renders `error.code` as a session error, and that code can abort an
in-flight quick connect, because WebClient.vue fails the pending favorite
connection whenever a new error code appears.
Resolve the route first and only then judge the frame. The flow counters are
unchanged: a discarded frame increments `ingressDroppedFrames` exactly once
either way, so the teardown log and the client's `audioStatsProbe` still report
the same numbers, and a malformed frame still never reaches the encoder.
Repeated faults of one kind also produced one JSON error per frame. A client
streaming malformed frames made the server build and send a ~110 byte error for
every frame it received, for a payload that can be as small as a single byte,
while the browser only ever shows the first one: it writes the same error string
into the same state, and Vue does not re-render for an unchanged value.
Rate-limit the reports per fault code so that two different faults cannot hide
each other, and keep counting every discarded frame.
Route those faults to the logger as well. The outbound error is not logged
anywhere, so an operator had no way to notice a client that kept sending
malformed audio until the session was torn down and the full flow stats were
written at once. The warning is raised under the same rate limit, so a broken
client cannot turn it into a new log flood.
Tests: the route-first ordering and the per-code window each have a case that
fails without the change.
`WebRtcAudioSession` builds its `RTCPeerConnection`, attaches the outgoing
track and adds the audio transceiver before it creates the mixer encoder. When
that encoder cannot be created the constructor stops the track and throws, but
it never closed the peer it had already built.
The caller cannot cover for it. `handleWebRtcOffer` assigns the factory result
to a local that starts as `null`:
let peer: WebRtcAudioSession | null = null;
...
peer = this.createWebRtcSession({ ... });
so a throwing constructor leaves `peer` at `null`, and the catch block's
`if (entry.webrtc === peer) entry.webrtc = null;` and `await peer?.close()` are
both no-ops. The peer was created, never closed, and no handle to it survived
the unwind.
The impact today is bounded, and the defect is the broken invariant rather than
a measured leak: the throw lands before ICE gathering starts, before
`scheduleAudioTick()` and `activityTimer` are installed, and werift's
constructor binds no socket or timer of its own, so the unreachable instance is
reclaimed by garbage collection. But an exception during construction must not
strand a half-built resource, and any acquisition added above that point would
turn this into a real leak.
Close the peer before propagating the failure:
* `this.peer.close()` now runs before the throw, so the peer is released even
though the caller never receives the session;
* `createEncoder` becomes an injectable option on `WebRtcAudioSessionOptions`,
mirroring `VoiceBridgeDependencies.createEncoder` and `createWebRtcSession`.
Production still resolves to `new OpusEncoder(AUDIO_SAMPLE_RATE, 1)`, so
behaviour is unchanged; the seam exists so the failure branch is reachable
without a machine that happens to lack the native codec.
Covered by a regression test that injects a failing encoder and instruments
`RTCPeerConnection.prototype.close` to count the distinct peers closed during
construction. It reports 0 on the old code and 1 with the fix, in any
environment and with no dependency on native Opus.
The gateway only publishes `connected` once the directory snapshot lands in
`sendInitialState()`. Between authenticating and that point the session is in
`syncing` while `hasConnectedOnce` is still false. `onDisconnect` required both
`hasConnectedOnce` and `state === "connected"`, so a transport drop inside that
gap returned early and did nothing:
* no `disconnected` frame for the browser,
* no `scheduleReconnect`,
* no peer/WeRTC rollback, no teardown.
The session stayed in `syncing` with the browser socket still open, the client
kept showing the connecting state forever, and nothing could recover it short
of the user closing the tab. `onKick` had the same gap via its own
`if (!hasConnectedOnce) return;` guard, so a kick or ban during the same window
was silently ignored while the gateway kept the dead session alive.
The window is not momentary. `tsClient.connect()` resolves even when the
directory reconciliation fails (the failure is logged and the explicit snapshot
emit is skipped), and `resetDirectoryForReconnect()` clears the snapshot on
every recovery, so each reconnect attempt opens the window again.
Treat the settling states (`authenticating`, `syncing`) as an explicit concept
and handle transport loss there:
* a drop during the first connect is a connect failure, not an interruption:
report `connectionFailed`, close with 4003 and tear the session down;
* the same reporting is now shared by the rejected-`connect()` path through a
single `failConnect` helper, so a transport that reports itself twice (a
`disconnected` event plus a rejected connect) still fails exactly once;
* a drop during a *reconnect* handshake returns the session to `reconnecting`
and schedules another attempt instead of stalling in `syncing`;
* a kick that lands before the session settles is reported and terminal.
A drop on an established session keeps the previous behaviour: `disconnected`
plus a scheduled reconnect.
Covered by three regression tests over the real WebSocket wiring with only the
external SDK stubbed: a drop before the directory sync, a kick in the same
window, and a drop during a reconnect handshake. All three hang on the old code.
Two smaller gaps left over from removing the inline avatars.
The announced viewerCount summed the viewer entry ids and the native viewer
ids, while the roster silently dropped ids whose participant had vanished
from the entry map. A client that disappears without passing through the
leave path therefore inflated the count for as long as the stream lived.
Prune those ids, and derive the count in the same call that builds the
roster so the two can no longer disagree.
The legacy inline-avatar path capped each entry at 128 KiB but placed no
bound on the roster total, which still allowed 64 x 128 KiB in a single
broadcast. Bound the total as well; entries past the budget fall back to
the client-side member lookup like any other viewer without an avatar.
Both behaviours are covered by new tests: a dropped entry no longer
inflates the count, and eight 128 KiB avatars are trimmed to the budget
(measured at 1048576 bytes without the bound).
The screen-share viewer roster embedded every viewer's avatar as a base64
data URL, and the gateway rebroadcast the whole roster to the channel on
every viewer join and leave. With the 64-viewer cap and the 128 KiB avatar
cap that is up to ~8 MB of JSON per event, multiplied by every member of
the channel -- even though the player renders at most five avatars and
every client already holds member avatars from the directory it received
through the connected and memberAvatar messages.
Send the TeamSpeak client id instead and resolve the avatar locally,
mirroring how a stream's ownerClientId already maps to a member card. This
removes the payload entirely rather than trimming it: the roster no longer
scales with avatar size at all.
The legacy inline avatar is still parsed so a newer client keeps working
against an older gateway, and a viewer missing from the local directory
degrades to the existing initial-based avatar fallback.
Verified by a regression test that gives every viewer a 128 KiB avatar and
asserts the roster stays under 16 KiB. Restoring the previous behaviour
makes that assertion fail at 1049182 bytes for eight viewers.
An acceleration tunnel can tear itself down on its own: a socket error, a relay
OPEN_ERR/CLOSE frame, or an open timeout runs closeSockets(), which closes both
UDP sockets and leaves every later sendFrame() a silent no-op.
TSClient kept the adapter bound to that tunnel's now-dead local port and only
rebuilt the transport when adapter or client were null. An auto-reconnect
therefore dialed a port nobody reads, and because a closed tunnel reports
nothing, the session could never recover and never surfaced an error either.
- expose isClosed() on AccelerationRelayClient so callers can distinguish a live
tunnel from one that tore itself down
- drop a stale tunnel together with its adapter and SDK client before connect()
decides whether to rebuild the transport, detaching first so a late
"disconnected" from the retired client cannot re-enter the reconnect path
- cover the reconnect guard with regression tests in ts-client.test.ts
Verified: tsc clean; ts-client.test.ts 35/35 pass (incl. the two new guards).
The relay's private-target guard ran on the caller-supplied hostname while the
connection was made to the DNS-resolved address, so any hostname could reach
loopback or an internal host even with allowPrivate=false. IPv4-mapped IPv6
literals such as ::ffff:127.0.0.1 slipped through the IPv6 branch as well.
- reuse isRestrictedAddress() instead of the weaker local isPrivateAddress()
- resolve first, then reject when any resolved address is restricted, so a
mixed public/private DNS answer cannot be used to reach an internal host
- release the freshly created session before rejecting a blocked target
- add an injectable lookupAddresses option for deterministic tests
- mirror the same resolve-then-validate ordering in the acceleration PoC relay
- add src/server/acceleration-relay.test.ts (6 tests) to the test script
Verified: tsc clean; the 6 new tests fail 4/6 before the fix and pass 6/6 after;
the acceleration PoC still reports ACCELERATION_POC_OK.
The relay's socket error listener ended with `throw error`. A listener that throws
escapes EventEmitter.emit, so it became an uncaught exception that terminated the
whole process. Because the throw also aborts the remaining listeners, it prevented
the startup promise from ever settling when the socket failed to bind.
- extract an idempotent shutdown() used by both close() and error handling
- reject the startup promise when the failure happens before listening, so a failed
bind behaves like any other rejected startup rather than a process crash
- tear the relay down and report via a new onError callback once it is running
- release the socket and sweep interval on a synchronous bind failure, which never
emits error at all
- add 3 regression tests covering bind failure, a surviving relay after a failed
sibling startup, and idempotent close
- register the new test file in the npm test list so CI actually runs it
Verified: tsc --noEmit is clean and the 3 new tests pass. Before the fix the same
bind failure terminated the process with an uncaught EADDRINUSE instead of
rejecting the startup promise.