Commit Graph
178 Commits
Author SHA1 Message Date
LainHE 0ef9b84237 Merge remote-tracking branch 'upstream/master' into tmp-merge-check
# Conflicts:
#	package.json
#	src/server/acceleration-relay.test.ts
#	src/server/acceleration-relay.ts
2026-10-16 10:32:06 +08:00
ILLUSIA 7715214f43 Merge pull request #33 from LainHE/fix/acceleration-relay-reconnect-upstream
fix(acceleration-relay): rebuild a self-closed tunnel on reconnect
2026-10-15 22:31:50 +08:00
LainHE 7977572362 fix(acceleration-relay): rebuild a self-closed tunnel on reconnect
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).
2026-10-15 21:36:31 +08:00
LainHE 4816c7ea62 fix(acceleration-relay): validate resolved targets to close SSRF
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.
2026-10-15 16:34:07 +08:00
LainHE feb50d29c1 fix(acceleration-relay): report socket errors instead of throwing into the void
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.
2026-10-15 16:20:19 +08:00
illusia 42a0755ad0 feat(skin): expose visitor count widget for skins 2026-10-14 00:43:43 +08:00
illusia 4910458408 fix(admin): allow KAAK as default skin 2026-10-13 08:15:24 +08:00
ILLUSIA 224a641372 fix: repair KAAK controls and add invite link action 2026-10-12 23:38:35 +08:00
illusia 7fd1ea96fe feat: complete runtime and KAAK skin updates 2026-10-12 23:06:55 +08:00
illusia 458f95c2dc feat: refine KAAK navigation and join experience 2026-10-12 13:49:35 +08:00
illusia 319a16f384 Add server navigation controls across modes 2026-10-12 12:01:51 +08:00
illusia 53324ef02b style: match KAAK password dialogs to reference 2026-10-12 11:23:31 +08:00
illusia 9c8647df50 fix: pass channel password flags from TeamSpeak SDK 2026-10-12 10:51:34 +08:00
illusia cec2a81549 fix: show password protected channels 2026-10-12 10:34:06 +08:00
illusia 8b5db8af1f fix(skins): expose screen-share status to custom members 2026-10-11 23:06:06 +08:00
illusia e800d75b7b feat: restore channel-tree member drag and drop 2026-10-11 22:12:05 +08:00
illusia 3476d4716a feat: add KAAK context menu to channel tree members 2026-10-11 21:40:14 +08:00
illusia 6c57868903 fix(voice): read server banner from client handshake 2026-10-11 20:40:01 +08:00
illusia 398a4d6c7f feat(kaak): render TeamSpeak server banner 2026-10-11 19:50:35 +08:00
illusia 766a9b9b5a feat(kaak): refine compact voice dock controls 2026-10-11 19:30:42 +08:00
illusia 96d2ebae01 feat(kaak): match channel sidebar and audio dock reference 2026-10-11 19:20:57 +08:00
illusia b13bdf1eb2 feat(kaak): add trusted server switcher and channel tree 2026-10-11 18:37:13 +08:00
illusia 17fb27b89a fix: expose server identity and refine KAAK client 2026-10-11 17:14:56 +08:00
Corrupted ILLUSIA 13f4ddac4d feat(kaak): refine voice dock visuals 2026-10-11 10:12:16 +08:00
Corrupted ILLUSIA bdd8e39a35 feat(kaak): expose member volume actions 2026-10-11 08:12:55 +08:00
Corrupted ILLUSIA 9f11d11b55 feat(kaak): isolate chat visibility per channel 2026-10-11 07:53:04 +08:00
Corrupted ILLUSIA 1951884d12 fix(skin): register public audio controls 2026-10-11 05:06:39 +08:00
illusia 83902e0fb5 feat(kaak): refine interaction feedback and permissions 2026-10-11 01:31:44 +08:00
Corrupted ILLUSIA a3bf476db6 feat(kaak): show channel occupancy limits 2026-10-10 22:25:01 +08:00
Corrupted ILLUSIA a1f92cedb2 feat(kaak): keep server rail colors stable 2026-10-10 19:51:00 +08:00
illusia f6ef471960 feat(skins): refine KAAK voice channel chat 2026-10-10 18:25:22 +08:00
illusia 7f5d3e1b3c feat(skins): refine KAAK voice workspace fidelity 2026-10-10 16:27:46 +08:00
illusia 54805f8928 feat(skins): add complete KAAK voice workspace skin 2026-10-10 15:53:51 +08:00
illusia f2e5695bb6 feat(skins): complete visual component CRUD authoring 2026-10-10 15:53:51 +08:00
illusia 0c4cc344ef feat(skins): add component authoring workflow 2026-10-10 15:53:51 +08:00
illusia 96c29394f3 feat(skin): add bounded plugin runtime and Harbor voice sample 2026-10-10 15:53:50 +08:00
illusia 8f097ec597 feat(skin): broaden runtime UI output 2026-10-10 15:53:50 +08:00
illusia b0b4a02a21 feat(skin): preserve screen share user gesture 2026-10-10 15:53:50 +08:00
illusia e20219b010 feat(skin): make runtime plugins locally reorderable 2026-10-10 15:53:50 +08:00
illusia 1499d60bc0 feat(skin): add local sibling ordering 2026-10-10 15:53:50 +08:00
illusia 11a07eae0f fix(skin): register runtime plugin layout parts 2026-10-10 15:53:50 +08:00
illusia 35cb6ad6df feat(skin): bridge trusted plugin actions 2026-10-10 15:53:50 +08:00
illusia 1aa29158ef feat(skin): project bounded read data into Wasm plugins 2026-10-10 15:53:50 +08:00
illusia 7650bd650b feat(skin): connect v4 runtime prototype to WebClient 2026-10-10 15:53:50 +08:00
illusia 7993b38eee feat(skin): support approved Wasm plugin prototype 2026-10-10 15:53:50 +08:00
illusia dd0d779e49 feat(skin): render voice members under channels 2026-10-10 15:53:49 +08:00
illusia 54c77bcb27 feat(skin): prototype bounded UI callback inputs 2026-10-10 15:53:49 +08:00
illusia c3810a177a feat(skin): widen bounded wasm ui output 2026-10-10 15:53:49 +08:00
illusia 067f0c4403 feat(skin): expose custom nodes to layout editor 2026-10-10 15:53:49 +08:00
illusia c243f272fe feat(skin): bind plugin approval to package digest 2026-10-10 15:53:49 +08:00