Commit Graph
93 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
LainHE 96f7fd6783 fix(acceleration-poc): align the relay's target guard with the gateway policy
The PoC relay carried its own copy of the restricted-address check and had
drifted well behind src/security/open-target-policy.ts: it missed multicast,
192.0.0.0/24 and the other special-use ranges, 198.18.0.0/15, the TEST-NET
blocks, fec0::/10, ff00::/8 and 2001:db8::/32. A relay started without
allowPrivate would therefore forward to addresses the gateway refuses, and
nothing exercised the guard, so the gap could not be noticed.

The relay must stay a plain .mjs file that the README documents copying to a
remote host without a build step, so it cannot import the TypeScript policy. The
predicate is mirrored instead and pinned by a parity test that fails the moment
the two classifications disagree.

The parity test lives beside the PoC rather than under src/: .dockerignore
excludes scripts/acceleration-poc from the Docker build context while the
Dockerfile runs `tsc` over src/**, so a copy in src/ would resolve locally and
still break the image build with TS2307.

- mirror isRestrictedAddress() exactly, including fail-closed handling of any
  input that is not a literal public address
- add scripts/acceleration-poc/target-guard-parity.test.mjs comparing both
  implementations across private, loopback, link-local, carrier-grade NAT,
  special-use, IPv6 and IPv4-mapped cases
- assert the guard in the PoC smoke run: a relay without allowPrivate must
  reject loopback, private and IPv4-mapped targets while still serving a public
  one, and the run now fails with the offending target instead of passing
  silently

Verified: tsc clean; `npm run build` and `npm run web:build` succeed with
scripts/acceleration-poc moved aside to reproduce the Docker build context; the
parity test fails when either side drifts; the smoke run reports ssrf_guard_ok
and ACCELERATION_POC_OK after the fix, and fails with a LEAK line per unblocked
target once the guard is weakened; the IPv6 smoke run still reports
IPV6_ACCELERATION_POC_OK.
2026-10-15 21:26:22 +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 292b4073b3 release: prepare v0.2.7 2026-10-13 07:35:19 +08:00
illusia 7fd1ea96fe feat: complete runtime and KAAK skin updates 2026-10-12 23:06:55 +08:00
illusia 9c8647df50 fix: pass channel password flags from TeamSpeak SDK 2026-10-12 10:51:34 +08:00
illusia df2ff79e15 fix(skins): show active screen sharing across bundled themes 2026-10-11 23:17:11 +08:00
illusia 8b5db8af1f fix(skins): expose screen-share status to custom members 2026-10-11 23:06:06 +08:00
illusia 6c57868903 fix(voice): read server banner from client handshake 2026-10-11 20:40:01 +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 16df12e4b2 fix(skin-editor): hide dev controls from visitors 2026-10-11 08:48:36 +08:00
illusia fbcbe994f0 fix(audio): keep device menus within viewport 2026-10-11 05:13:13 +08:00
Corrupted ILLUSIA a3bf476db6 feat(kaak): show channel occupancy limits 2026-10-10 22:25:01 +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 1aa29158ef feat(skin): project bounded read data into Wasm plugins 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 26b74c5be4 feat(skin): prototype bounded wasm UI event loop 2026-10-10 15:53:50 +08:00
illusia c243f272fe feat(skin): bind plugin approval to package digest 2026-10-10 15:53:49 +08:00
illusia 81c35356b4 feat(skin): validate v4 plugin packages 2026-10-10 15:53:49 +08:00
illusia d137b41b5c feat(skin): add validated runtime UI output bridge 2026-10-10 15:53:49 +08:00
illusia d505815f28 feat(skin): add approved full-page surface composition 2026-10-10 15:53:48 +08:00
illusia eabc78f36a feat(skin): add v3 declarative plugin components 2026-10-10 15:53:48 +08:00
illusia 02441410a0 feat(web): implement open skin layouts and migrate Illusia 2026-10-10 15:53:38 +08:00
illusia 58559cf839 fix(web): unify quick server history and favorites 2026-10-09 13:42:56 +08:00
illusia b6e4d349a2 feat(web): add skinnable favorite server switching 2026-10-09 10:35:01 +08:00
yumi 60d3cfd569 feat: support TeamSpeak server nickname connections 2026-10-08 23:48:47 +08:00
illusia 69f8d66ca9 docs: align v0.2.6 packages with supported architectures 2026-10-08 11:29:18 +08:00
illusia aad7833509 fix: build Windows ARM64 Opus with supported toolchain 2026-10-08 11:05:13 +08:00
illusia 50d9d58ad0 release: prepare v0.2.6 multi-architecture packages 2026-10-08 10:50:42 +08:00
illusia 0a552f7ee8 fix: consolidate audited dev updates 2026-10-08 10:32:59 +08:00
illusia 568b8fd8be Prepare 0.2.6-preview and remove private deployment references 2026-10-03 23:25:58 +08:00
illusia 6ed8abfb15 refactor: extract sharing views and repair player ownership 2026-10-01 19:11:29 +08:00
illusia d2caaa8f3c refactor: extract settings dialogs and guard pending feedback 2026-10-01 18:45:56 +08:00
illusia 83b2430d18 refactor: extract member panels and constrain action menus 2026-10-01 18:19:24 +08:00
illusia 9dfded0fb7 fix: bind skin loading to the current page and choice 2026-10-01 17:00:05 +08:00
illusia 15e22d3099 fix: scope identity operations to the active dialog 2026-10-01 16:18:20 +08:00
illusia c16d1d4cfb fix: keep voice diagnostics scoped to current media 2026-10-01 15:03:58 +08:00
illusia 878e94a93a refactor: scope SDK events and directory state to their session 2026-10-01 13:42:57 +08:00
illusia 2047e30984 fix: keep avatar transfers on their original SDK connection 2026-10-01 13:30:18 +08:00
illusia 3dfd25dab7 fix: bind member avatar downloads to connection lifecycles 2026-10-01 13:25:55 +08:00
illusia c8417edd7d refactor: isolate session audio and harden gateway teardown 2026-10-01 13:16:59 +08:00
illusia 525f512f4a fix: bind admin state to request and page lifecycles 2026-10-01 12:11:47 +08:00
illusia f0712fa3fc refactor: share admin contracts and isolate page styles 2026-10-01 10:55:36 +08:00
illusia e2f0a43762 fix: cancel stale voice operations and isolate Android startup 2026-10-01 10:08:18 +08:00
illusia 8960189bc7 refactor: isolate gateway commands and screen-sharing coordination 2026-10-01 09:20:11 +08:00
illusia f4cbd61cff refactor: share wire contracts and isolate screen-sharing lifecycle 2026-10-01 09:06:15 +08:00