Compare commits

..
516 Commits
Author SHA1 Message Date
illusia 7cc43bb336 fix(mobile): align standalone version fallback with v0.3.0 2026-11-03 20:30:52 +08:00
illusia 42d15c6d32 release: prepare v0.3.0 2026-11-03 20:19:28 +08:00
illusia 360126b14f merge: retain master release and skin startup fixes 2026-11-03 20:13:42 +08:00
illusia 047a40ac4b merge: retain dev security fixes for the 0.3.0 release 2026-11-03 20:13:15 +08:00
illusia 3430a8a753 feat: add plugin application runtime and unified instance authorization 2026-11-03 20:13:01 +08:00
illusia 275e27c4ac fix(security): address PR 48 findings with bounded concurrent authentication
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.
2026-10-26 10:28:45 +08:00
illusia 37f5b86b52 fix(skins): use build version during initial activation 2026-10-25 18:49:21 +08:00
illusia 8bca848c21 docs: refresh multilingual READMEs and organize project assets 2026-10-25 11:26:53 +08:00
illusia ce681f749d feat(plugins): add GitHub store and scoped collaborative panels 2026-10-25 01:42:41 +08:00
illusia dacc4a143f release: prepare v0.2.9 2026-10-24 18:28:03 +08:00
illusia d91e811ede Merge dev into master for v0.2.9 2026-10-24 18:24:04 +08:00
illusia b9fccb8757 feat(channels): render TeamSpeak spacers across skins 2026-10-24 18:16:01 +08:00
illusia 4bff2133b6 fix(admin): correct TeamSpeak member counts and action feedback 2026-10-24 18:16:00 +08:00
illusia 88439181ae fix(skins): sync Discord Voice 1.0.11 layout and controls 2026-10-24 18:16:00 +08:00
illusia 941cff30d7 docs: credit upstream SDK author and skin contributors 2026-10-24 18:15:59 +08:00
illusia 9c4a2c4a51 fix(kaak): identify project links in icon tooltips 2026-10-24 14:11:32 +08:00
illusia bb5905eb39 feat(kaak): add admin and community shortcuts to server rail 2026-10-24 14:03:27 +08:00
illusia 452e6f09ca feat(skins): add persistent voice workspace API and align KAAK 2026-10-24 13:30:50 +08:00
illusia 0af3236c30 feat: add GitHub skin store and organize instance administration
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.
2026-10-24 12:52:59 +08:00
ILLUSIA c917692b61 Merge pull request #51 from yichen11818/codex/kook-connection-flow
fix(kook): KAAK首次连接后保留语音工作区
2026-10-21 16:39:05 +08:00
yumi bcecf4fed4 fix(kook): keep returning users in the voice workspace 2026-10-21 15:31:19 +08:00
illusia 32d84435ce fix(screen-share): correct fullscreen dimensions 2026-10-18 11:10:54 +08:00
illusia 180bfeb52f fix: harden TeamSpeak detection and clean up departed speakers 2026-10-17 14:55:25 +08:00
illusia 84bdf63514 fix: persist member volume preferences 2026-10-17 12:34:57 +08:00
illusia 54e154be1a release: prepare v0.2.8 2026-10-17 09:53:27 +08:00
illusia 4375f01d05 docs: add Shanghai and Hong Kong demo links 2026-10-16 22:55:29 +08:00
ILLUSIA 6f5f4c9f4d Merge pull request #38 from LainHE/fix/audio-frame-error-reporting-upstream
fix(audio): report discarded frames as route drops, not bad frames
2026-10-16 19:33:23 +08:00
ILLUSIA a9f5a47163 Merge pull request #35 from LainHE/fix/voice-session-connect-window-upstream
fix(voice): never swallow a TeamSpeak drop while the session is settling
2026-10-16 19:33:15 +08:00
ILLUSIA 6bf6544fd6 Merge pull request #37 from LainHE/fix/client-ip-trust-boundary-upstream
fix(voice): only believe forwarding headers from declared proxies
2026-10-16 19:33:07 +08:00
ILLUSIA 9c3b86dc7a Merge pull request #40 from LainHE/fix/webrtc-peer-rollback-upstream
fix(webrtc): roll back the peer when the mixer codec is unavailable
2026-10-16 19:31:00 +08:00
ILLUSIA 411ab57b63 Merge pull request #34 from LainHE/fix/screen-share-viewer-roster-upstream
fix(screen-share): resolve viewer avatars from client ids instead of the roster
2026-10-16 19:30:01 +08:00
ILLUSIA 4de532e56b Merge pull request #31 from LainHE/fix/acceleration-relay-ssrf-upstream
fix(acceleration-relay): 在 DNS 解析后校验目标地址,阻断 SSRF
2026-10-16 19:29:43 +08:00
LainHE e9cec18345 fix(voice): only believe forwarding headers from declared proxies
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.
2026-10-16 17:48:09 +08:00
LainHE 82957832a5 fix(audio): report discarded frames as route drops, not bad frames
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.
2026-10-16 16:42:28 +08:00
LainHE 5cf7331223 fix(webrtc): roll back the peer when the mixer codec is unavailable
`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.
2026-10-16 14:55:13 +08:00
LainHE 9873d27222 fix(voice): never swallow a TeamSpeak drop while the session is settling
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.
2026-10-16 12:23:55 +08:00
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 bcc78177c2 fix(screen-share): keep the announced viewer count in step with the roster
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).
2026-10-16 09:50:26 +08:00
LainHE bfa26da9eb fix(screen-share): resolve viewer avatars from client ids instead of the roster
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.
2026-10-16 09:47:01 +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
ILLUSIA 69c2f4776e Merge pull request #32 from LainHE/fix/acceleration-relay-error-handling-upstream
fix(acceleration-relay): 修复 socket 错误监听器内 throw 导致进程崩溃
2026-10-15 22:31:22 +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 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 62af82f253 fix(kaak): keep voice dock controls inside panel 2026-10-14 17:06:44 +08:00
illusia 42a0755ad0 feat(skin): expose visitor count widget for skins 2026-10-14 00:43:43 +08:00
illusia 26c638c2a2 docs: fix public demo links 2026-10-13 11:19:12 +08:00
illusia c19dad513a docs: format changelogs by release version 2026-10-13 10:18:58 +08:00
illusia 21ee7c322d docs: consolidate localized release and skin guides 2026-10-13 10:08:41 +08:00
illusia 4910458408 fix(admin): allow KAAK as default skin 2026-10-13 08:15:24 +08:00
illusia 292b4073b3 release: prepare v0.2.7 2026-10-13 07:35:19 +08:00
illusia 48c2fb3948 Merge dev into master 2026-10-12 23:39:18 +08:00
ILLUSIA 224a641372 fix: repair KAAK controls and add invite link action 2026-10-12 23:38:35 +08:00
illusia 19274cf0ee Merge dev into master
# Conflicts:
#	web/src/voice/screen-share.ts
2026-10-12 23:12:27 +08:00
illusia 45bec91daa fix: correct identity provider test callback 2026-10-12 23:09:24 +08:00
illusia 7fd1ea96fe feat: complete runtime and KAAK skin updates 2026-10-12 23:06:55 +08:00
illusia c994722016 fix(screen-share): preserve AV1 fallback priority 2026-10-12 13:53:52 +08:00
LainHE 7a6e054fe9 fix(screen-share): use sender capabilities for codec preference
setCodecPreferences requires codecs from RTCRtpSender.getCapabilities;
feeding it RTCRtpReceiver.getCapabilities throws InvalidModificationError
in Chrome and the swallowed exception left VP8 as the negotiated codec.
Switch the capability source so H264/AV1 preferences actually apply.
2026-10-12 13:51:49 +08:00
LainHE d919dbd82a feat(web-client): allow users to pick screen share bitrate limit
Add a bitrate select to the screen share settings dialog (auto by
resolution, or a fixed 1.5/3/5/8/12 Mbps cap), persist the choice in
localStorage, and pass it through ScreenShareOutputSettings.maxBitrate
so configureScreenShareVideoSender applies the user-chosen budget
instead of only the height-scaled default.
2026-10-12 13:51:49 +08:00
illusia f74e211d0f Merge pull request #28 from LainHE/pr/screen-share-quality 2026-10-12 13:50:02 +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 c6eeb49f44 fix: unify KAAK password dialog confirm labels 2026-10-12 11:37:53 +08:00
illusia 05220b7a6e style: include KAAK connection password field 2026-10-12 11:25:49 +08:00
illusia 53324ef02b style: match KAAK password dialogs to reference 2026-10-12 11:23:31 +08:00
illusia 2f5cdcba90 feat: remember server and channel passwords locally 2026-10-12 11:08:35 +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 ff508a8eb9 Fix collapsed KAAK share stage 2026-10-12 10:03:42 +08:00
illusia 8a46691dbb Fix KAAK screen share layout bounds 2026-10-12 09:58:08 +08:00
illusia 64b24d0452 Expand screen-share player to content width 2026-10-12 09:43:33 +08:00
illusia 833357e278 Fix screen-share letterboxing across skins 2026-10-12 09:38:26 +08:00
illusia acdc7a2330 Fix missing screen share player 2026-10-12 08:25:57 +08:00
illusia 42190909e3 Fix screen share player fallback width 2026-10-12 08:10:17 +08:00
illusia a4e54d6341 Fix screen share player sizing 2026-10-11 23:36:58 +08:00
illusia 13499541e0 fix(voice): enable screen share in built-in member cards 2026-10-11 23:30:09 +08:00
illusia df2ff79e15 fix(skins): show active screen sharing across bundled themes 2026-10-11 23:17:11 +08:00
illusia d9749ac12f docs: record screen-share skin fix verification 2026-10-11 23:06:57 +08:00
illusia 8b5db8af1f fix(skins): expose screen-share status to custom members 2026-10-11 23:06:06 +08:00
illusia 7fe8719812 style: show noise suppression disabled state 2026-10-11 22:20:12 +08:00
illusia 0a77bdcaca docs: record channel tree drag drop work 2026-10-11 22:12:32 +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 3459c8410c record KAAK menu update status 2026-10-11 21:14:17 +08:00
illusia 10739a7c7e style KAAK member context menu 2026-10-11 21:13:56 +08:00
illusia fb39aabbe2 docs(kaak): record banner handshake fix 2026-10-11 20:41:07 +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
illusia e8164abafe docs(kaak): record popover stacking fix 2026-10-11 15:23:16 +08:00
illusia a1051b989e fix(kaak): layer audio popovers above metrics 2026-10-11 15:22:55 +08:00
illusia a84a12ced4 docs(kaak): record control dock fix 2026-10-11 13:02:43 +08:00
illusia 938bb0646d fix(kaak): restore dock controls and feedback 2026-10-11 13:01:47 +08:00
illusia 2f32d47036 docs(kaak): record control dock push 2026-10-11 12:51:02 +08:00
illusia 25148dd343 fix(kaak): move noise control into lower row 2026-10-11 12:49:28 +08:00
Corrupted ILLUSIA cf692174da docs(kaak): record rebuilt skin package 2026-10-11 12:39:11 +08:00
Corrupted ILLUSIA a43e6750ef docs(kaak): record corrected dock layout 2026-10-11 12:37:43 +08:00
Corrupted ILLUSIA 729e413196 fix(kaak): keep noise control in lower row 2026-10-11 12:36:56 +08:00
Corrupted ILLUSIA 93c9c2532a docs(kaak): record dock update pushed 2026-10-11 12:31:59 +08:00
Corrupted ILLUSIA 74ee82a927 feat(kaak): match provided voice dock layout 2026-10-11 12:31:02 +08:00
Corrupted ILLUSIA b9f3272210 docs(kaak): record compact dock push 2026-10-11 10:44:19 +08:00
Corrupted ILLUSIA 0ad7386fcd style(kaak): match supplied compact dock layout 2026-10-11 10:43:31 +08:00
Corrupted ILLUSIA 4adc712562 style(kaak): compact voice control dock 2026-10-11 10:25:33 +08:00
Corrupted ILLUSIA f5c0d66c10 docs(kaak): record 3.1.54 push 2026-10-11 10:13:47 +08:00
Corrupted ILLUSIA 13f4ddac4d feat(kaak): refine voice dock visuals 2026-10-11 10:12:16 +08:00
Corrupted ILLUSIA 16df12e4b2 fix(skin-editor): hide dev controls from visitors 2026-10-11 08:48:36 +08:00
Corrupted ILLUSIA 8cde1eae5a docs(kaak): sync latest checkpoint 2026-10-11 08:37:39 +08:00
Corrupted ILLUSIA 1391e02dd5 feat(kaak): add member card context actions 2026-10-11 08:36:34 +08:00
Corrupted ILLUSIA f3325458f4 docs(kaak): record local acceptance blocker 2026-10-11 08:19:55 +08:00
Corrupted ILLUSIA 72297c79b4 docs(kaak): record member actions checkpoint 2026-10-11 08:14:25 +08:00
Corrupted ILLUSIA bdd8e39a35 feat(kaak): expose member volume actions 2026-10-11 08:12:55 +08:00
Corrupted ILLUSIA 1e4fa08220 docs(kaak): record channel state checkpoint 2026-10-11 07:54:05 +08:00
Corrupted ILLUSIA 9f11d11b55 feat(kaak): isolate chat visibility per channel 2026-10-11 07:53:04 +08:00
Corrupted ILLUSIA fe578bcb60 docs(kaak): record pushed preview checkpoint 2026-10-11 07:43:23 +08:00
Corrupted ILLUSIA 650c1e0a6a style(kaak): animate performance sampling feedback 2026-10-11 07:41:32 +08:00
Corrupted ILLUSIA 5596735d4a style(kaak): unify active speaker feedback 2026-10-11 07:25:32 +08:00
Corrupted ILLUSIA 2ef21a7da5 docs(kaak): clarify branch checkpoint 2026-10-11 07:20:35 +08:00
Corrupted ILLUSIA c5146a5734 docs(kaak): update clone checkpoint 2026-10-11 07:19:23 +08:00
Corrupted ILLUSIA b01127c461 docs(kaak): preserve complete clone worklog 2026-10-11 07:11:10 +08:00
Corrupted ILLUSIA 2e67eaaa54 docs(kaak): record noise controls checkpoint 2026-10-11 07:10:16 +08:00
Corrupted ILLUSIA cb504c95bc feat(kaak): surface noise controls in audio settings 2026-10-11 07:06:49 +08:00
illusia 7c3e32d671 docs(kaak): record audio settings checkpoint 2026-10-11 06:50:19 +08:00
illusia 2a80ade08b feat(kaak): match audio settings layout 2026-10-11 06:49:53 +08:00
Corrupted ILLUSIA 2fcea5622b feat(kaak): unify audio accent feedback 2026-10-11 06:25:33 +08:00
Corrupted ILLUSIA 62a358796f feat(kaak): match KOOK channel typography 2026-10-11 06:14:17 +08:00
illusia 3f68050c81 feat(kaak): refine participant stage feedback 2026-10-11 06:00:05 +08:00
illusia 01ad967e30 feat(kaak): align KOOK brand accents 2026-10-11 05:50:00 +08:00
illusia a73a6b1a1e feat(kaak): refine volume slider states 2026-10-11 05:46:01 +08:00
illusia 0453bc6d4a feat(kaak): match device picker geometry 2026-10-11 05:41:07 +08:00
illusia c29109e898 docs(kaak): clarify voice chat defaults 2026-10-11 05:27:20 +08:00
Corrupted ILLUSIA 794b3f0ae0 docs(kaak): refresh clone checkpoint 2026-10-11 05:22:52 +08:00
Corrupted ILLUSIA 9cc6e7b765 fix(kaak): match audio label typography 2026-10-11 05:20:24 +08:00
illusia fbcbe994f0 fix(audio): keep device menus within viewport 2026-10-11 05:13:13 +08:00
Corrupted ILLUSIA 1951884d12 fix(skin): register public audio controls 2026-10-11 05:06:39 +08:00
Corrupted ILLUSIA 463f803881 fix(kaak): match audio title weight 2026-10-11 04:55:33 +08:00
illusia 61332ed846 fix(audio): show desktop volume controls 2026-10-11 04:45:06 +08:00
Corrupted ILLUSIA f3565f9859 docs(kaak): record successful dev sync 2026-10-11 04:26:20 +08:00
Corrupted ILLUSIA a3bdee9063 fix(kaak): apply skin typography to home surface 2026-10-11 04:24:25 +08:00
Corrupted ILLUSIA 2d92ca82f4 fix(kaak): match audio settings typography 2026-10-11 04:21:12 +08:00
illusia 10379829d8 fix(audio): keep volume hover panels reachable 2026-10-11 04:02:44 +08:00
illusia 5da11b41f9 fix(kaak): smooth member speaking glow 2026-10-11 04:00:04 +08:00
illusia deb5ca4e43 fix(voice): improve performance panel dismissal 2026-10-11 03:53:14 +08:00
illusia 3ff6507943 feat(kaak): animate voice channel group collapse 2026-10-11 03:38:37 +08:00
illusia e02ce7c546 feat(kaak): animate member name hover labels 2026-10-11 03:30:56 +08:00
illusia 8e580e7e18 feat(kaak): match KOOK audio device picker 2026-10-11 03:20:34 +08:00
illusia 70cc6c3bbf docs(kaak): record interaction fidelity audit 2026-10-11 02:47:39 +08:00
illusia ed6bf3a6ec docs(kaak): describe hidden chat panel 2026-10-11 02:20:24 +08:00
illusia 17a76fc1fd docs(kaak): record collapsed chat node 2026-10-11 02:06:33 +08:00
illusia ff207df20d feat(kaak): hide collapsed voice chat panel 2026-10-11 02:05:51 +08:00
illusia 5ca90c0914 docs(kaak): record channel selection feedback 2026-10-11 01:39:45 +08:00
illusia 19e693c270 feat(kaak): show channel join confirmation 2026-10-11 01:39:12 +08:00
illusia 2b6903f00a docs(kaak): record interaction polish progress 2026-10-11 01:32:43 +08:00
illusia 83902e0fb5 feat(kaak): refine interaction feedback and permissions 2026-10-11 01:31:44 +08:00
illusia bdd0c3473c feat(kaak): refine audio controls and diagnostics 2026-10-11 00:47:06 +08:00
illusia afa1e89136 fix(kaak): keep voice heading visible with chat open 2026-10-10 23:53:53 +08:00
illusia 5d27b9e4a8 fix(kaak): match KOOK member name visibility 2026-10-10 23:35:26 +08:00
illusia 7ea19e14eb docs: clarify KOOK channel entry checkpoint 2026-10-10 23:06:18 +08:00
illusia efa8f76787 docs: record KAAK reference checkpoint 2026-10-10 23:04:23 +08:00
illusia 8105a07171 fix(kaak): keep participant names visible 2026-10-10 22:53:56 +08:00
illusia 42cf4fbb8a docs: track KAAK clone progress 2026-10-10 22:40:22 +08:00
Corrupted ILLUSIA a3bf476db6 feat(kaak): show channel occupancy limits 2026-10-10 22:25:01 +08:00
Corrupted ILLUSIA 387462d89a feat(kaak): animate participant membership changes 2026-10-10 22:02:46 +08:00
Corrupted ILLUSIA 498a728d04 feat(kaak): match KOOK muted participant badge 2026-10-10 21:48:28 +08:00
Corrupted ILLUSIA 9c0fa35d38 feat(skin): improve KAAK collapsed voice stage 2026-10-10 21:28:19 +08:00
Corrupted ILLUSIA afc58799d9 feat(kaak): match KOOK voice participant tiles 2026-10-10 21:03:54 +08:00
Corrupted ILLUSIA 212bd9db2c feat(kaak): match KOOK voice dock actions 2026-10-10 20:37:23 +08:00
Corrupted ILLUSIA 5824754912 feat(kaak): match open KOOK voice stage 2026-10-10 20:13:24 +08:00
Corrupted ILLUSIA a1f92cedb2 feat(kaak): keep server rail colors stable 2026-10-10 19:51:00 +08:00
Corrupted ILLUSIA 8aefed83d1 feat(kaak): match KOOK voice chat presentation 2026-10-10 19:40:41 +08:00
Corrupted ILLUSIA 19c85ce1f5 feat(kaak): align voice room with KOOK layout 2026-10-10 19:33:48 +08:00
Corrupted ILLUSIA 7fb5e1d6ea feat(kaak): add collapsible voice channel group 2026-10-10 19:18:52 +08:00
Corrupted ILLUSIA b9c017f9aa feat(kaak): match KOOK server rail icons 2026-10-10 19:11:12 +08:00
Corrupted ILLUSIA d9b83f12cc feat(kaak): enrich channel chat message rows 2026-10-10 18:52:11 +08:00
Corrupted ILLUSIA 36ece5e582 feat(kaak): center voice participant rows 2026-10-10 18:41:05 +08:00
illusia f1f50d393a fix(kaak): keep full voice roster visible 2026-10-10 18:30:29 +08:00
illusia f6ef471960 feat(skins): refine KAAK voice channel chat 2026-10-10 18:25:22 +08:00
LainHE 20bde72c8b fix(screen-share): use sender capabilities for codec preference
setCodecPreferences requires codecs from RTCRtpSender.getCapabilities;
feeding it RTCRtpReceiver.getCapabilities throws InvalidModificationError
in Chrome and the swallowed exception left VP8 as the negotiated codec.
Switch the capability source so H264/AV1 preferences actually apply.
2026-10-10 18:02:36 +08:00
LainHE 1c328995aa feat(web-client): allow users to pick screen share bitrate limit
Add a bitrate select to the screen share settings dialog (auto by
resolution, or a fixed 1.5/3/5/8/12 Mbps cap), persist the choice in
localStorage, and pass it through ScreenShareOutputSettings.maxBitrate
so configureScreenShareVideoSender applies the user-chosen budget
instead of only the height-scaled default.
2026-10-10 18:01:04 +08:00
illusia 7b31c9106a feat(skins): refine KAAK voice room fidelity 2026-10-10 17:15:02 +08:00
illusia 7f5d3e1b3c feat(skins): refine KAAK voice workspace fidelity 2026-10-10 16:27:46 +08:00
illusia ad0aa5c120 fix(skins): correct full-surface layout and KAAK audio dock 2026-10-10 15:53:51 +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 3fd8e76a98 test(skins): verify surface deletion recovery 2026-10-10 15:53:51 +08:00
illusia da0472383d fix(skins): preserve screen capture user activation 2026-10-10 15:53:51 +08:00
illusia fd4b0c6da2 test(skins): verify live component CRUD preview 2026-10-10 15:53:51 +08:00
illusia 100a8f49ee test(skins): verify editor focus restoration 2026-10-10 15:53:51 +08:00
illusia 16f28ca348 fix(skins): refresh plugin assets when switching skins 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 26b74c5be4 feat(skin): prototype bounded wasm UI event loop 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 ab36825a56 docs(skin): reject iframe as plugin network boundary 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
illusia 81c35356b4 feat(skin): validate v4 plugin packages 2026-10-10 15:53:49 +08:00
illusia 17e4d78e52 feat(skin): define full plugin runtime target 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 7047d71678 feat(skin): add bounded UI output bridge 2026-10-10 15:53:49 +08:00
illusia 849eb1a6d9 feat(skin): expand schema v3 voice interactions 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
illusia ae1cd707be docs: credit contributor for PR #25 2026-10-09 00:26:27 +08:00
illusia efa0b85a0e fix: preserve invites on nickname lookup failure 2026-10-09 00:26:21 +08:00
Corrupted ILLUSIA 75893339c5 Merge pull request #25 from yichen11818/codex/teamspeak-server-aliases
feat: support TeamSpeak server nickname connections
2026-10-08 23:51:02 +08:00
yumi 60d3cfd569 feat: support TeamSpeak server nickname connections 2026-10-08 23:48:47 +08:00
illusia 35dde81cc2 docs: keep release notes out of project home page 2026-10-08 12:19:19 +08:00
illusia ebca754ca5 docs: refresh v0.2.6 project documentation 2026-10-08 12:07:06 +08:00
illusia 69f8d66ca9 docs: align v0.2.6 packages with supported architectures 2026-10-08 11:29:18 +08:00
illusia 7789758024 fix: provide Opus config for Windows ARM64 2026-10-08 11:17:44 +08:00
illusia c211deeb98 fix: set Android Gradle wrapper executable in CI 2026-10-08 11:13:57 +08:00
illusia aad7833509 fix: build Windows ARM64 Opus with supported toolchain 2026-10-08 11:05:13 +08:00
illusia 39413cf840 fix: update Android release setup action 2026-10-08 10:56:41 +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 d919df1273 docs: close refactor scope with requested acceptance exclusions 2026-10-03 15:54:02 +08:00
illusia 921e83dfb3 fix: acknowledge TS6 screen cleanup and include removal reason 2026-10-03 14:31:45 +08:00
illusia 77fef3bed9 fix: restore input mute after TeamSpeak flood rejection 2026-10-03 14:06:07 +08:00
illusia 2c49ee2599 docs: record Edge dialog blocker and remaining acceptance requirements 2026-10-03 09:50:45 +08:00
illusia 81a860c3df docs: record live multi-speaker mixing and member volume checks 2026-10-03 09:45:16 +08:00
illusia d327c6f179 fix: negotiate only supported Opus audio before WebRTC activation 2026-10-03 09:38:59 +08:00
illusia 7baeff00ba fix: preserve continuous Opus state in WebRTC downlink 2026-10-03 09:28:11 +08:00
illusia 777c779d79 fix: keep accompaniment audible while microphone is muted 2026-10-03 09:18:49 +08:00
illusia 051cb402e5 docs: scope out Android and record requested TeamSpeak connectivity checks 2026-10-02 17:11:28 +08:00
illusia 1791d5946d docs: record clean Android APK installation and cold startup 2026-10-02 01:00:00 +08:00
illusia 39eba1b121 fix: describe administrative audit events in all languages 2026-10-01 20:15:24 +08:00
illusia a195681e78 build: exclude local env files and record clean release validation 2026-10-01 20:03:31 +08:00
illusia 172347aaa7 refactor: remove redundant client style declarations 2026-10-01 19:47:59 +08:00
illusia 8e28bca634 refactor: remove redundant admin style declarations 2026-10-01 19:36:43 +08:00
illusia 4ef7ec5ee3 style: expand client templates and preserve CSS rule order 2026-10-01 19:30:07 +08:00
illusia f18fa63001 refactor: extract voice member cards with page-owned sharing 2026-10-01 19:20:31 +08:00
illusia 6ed8abfb15 refactor: extract sharing views and repair player ownership 2026-10-01 19:11:29 +08:00
illusia 8b6c998c43 refactor: extract audio controls and scope whisper input 2026-10-01 18:58:19 +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 a416e36bd1 refactor: extract client join and chat panels and fit narrow forms 2026-10-01 18:00:31 +08:00
illusia a2f91e606f refactor: separate admin sections and fit narrow navigation 2026-10-01 17:36:54 +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 db08fbda6b fix: scope session state and confirm chat destinations 2026-10-01 15:46:52 +08:00
illusia c16d1d4cfb fix: keep voice diagnostics scoped to current media 2026-10-01 15:03:58 +08:00
illusia 5855d0ba67 refactor: scope browser transports and command lifecycles 2026-10-01 14:48:44 +08:00
illusia f11fe26bfe fix: isolate microphone metering resources and stale ticks 2026-10-01 14:16:10 +08:00
illusia 1a46ab83a3 fix: preserve live voice during accompaniment changes 2026-10-01 14:09:32 +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 49481145ef fix: prepare microphone graphs before replacing live capture 2026-10-01 12:49:44 +08:00
illusia 3b5c0dfc7d refactor: complete admin translations and responsive toolbar 2026-10-01 12:36:55 +08:00
illusia 525f512f4a fix: bind admin state to request and page lifecycles 2026-10-01 12:11:47 +08:00
illusia 0785f82386 fix: preserve audio capture across device reconfiguration 2026-10-01 11:30:40 +08:00
illusia 797fc135a9 fix: isolate remote playback and microphone recording lifecycles 2026-10-01 11:16:05 +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
illusia 541a216c4d test: establish gateway refactoring checks and prevent stale directory entries 2026-10-01 08:34:04 +08:00
illusia aeaeb15965 feat: add Android gateway preview and refactoring plan 2026-10-01 08:13:46 +08:00
illusia 9e2b9bf564 feat: import and export TeamSpeak identities 2026-09-29 11:09:18 +08:00
illusia 0a4fff6f6f feat: report live voice status and harden target handling 2026-09-28 22:28:16 +08:00
illusia e0d5916a86 fix: shrink Illusia voice artwork 2026-09-27 12:56:40 +08:00
illusia e8dc71329b fix(skins): refresh cached Illusia packages 2026-09-27 09:35:21 +08:00
illusia 30682cd659 fix(skins): localize selector and animate gradient states 2026-09-27 09:17:46 +08:00
illusia e09a19b7b4 feat(skins): ship protected built-ins and instance defaults 2026-09-27 00:45:29 +08:00
illusia 2b7e908d31 feat: add customizable skin support 2026-09-26 08:59:05 +08:00
illusia 0ea85752fd fix(admin): unify operations layout 2026-09-25 16:14:48 +08:00
illusia 97b7127ca3 refactor: modularize WebClient responsibilities 2026-09-25 07:54:31 +08:00
illusia db38feba52 fix: surface TeamSpeak handshake errors 2026-09-23 22:15:52 +08:00
illusia 1bab4df64e fix: apply screen share output limits at sender 2026-09-23 14:34:48 +08:00
Object ILLUSIA 193130c50f Merge pull request #8 from LainHE/master
fix: 缩放补偿、浮动布局及首页脚标问题修复
2026-09-23 10:55:09 +08:00
LainHE c7794a12e7 fix(web): give join footer solid background and stacking, constrain join-content scroll
- .join-footer: background var(--surface-0) so it matches page theme in light/dark/system; z-index 2 so it stays above join-content overlap on short viewports

- .join-content: overflow-y auto on desktop so oversized copy scrolls inside the container instead of spilling into the footer
2026-09-23 09:48:08 +08:00
LainHE 408d8bcda4 feat(web): float desktop audio dock and message composer
Float .desktop-audio-dock at the bottom of .member-panel and .message-composer at the bottom of .chat-panel on desktop (>=741px):
- switch both from in-flow to absolute positioning, keeping the original visual anchor semantics
- width follows the parent content width (left/right insets align with member-panel horizontal padding / chat-panel zero padding)
- add padding-bottom compensation to .member-panel and .chat-panel so member/message lists are not covered
- mobile layout (<=740px) remains untouched
2026-09-23 08:39:36 +08:00
LainHE 5a3eebecbd fix(web): zoom compensation and mobile chat scroll fixes
- WebClient: divide fixed offsets and viewport heights by --ui-scale on large displays; fix member context menu position
- WebClient: use 100dvh/100svh with fallbacks on mobile; constrain workspace-content height so message list scrolls properly
- AdminView: keep html/body at real viewport while zoomed admin shell divides height by scale
- DemoView: divide poke banner offsets by --ui-scale to keep intended margin
- package-lock: drop stale peer flags
2026-09-23 06:57:09 +08:00
illusia 713716dacc merge: release v0.2.4 from dev 2026-09-22 17:23:16 +08:00
illusia 3a7a162f97 release: prepare v0.2.4 2026-09-22 17:23:04 +08:00
illusia 2f8614d53a fix: move screen share settings into modal 2026-09-22 17:06:11 +08:00
illusia bdac15afac fix: keep screen share settings inside cards 2026-09-22 17:01:23 +08:00
illusia 7f49e2f2d7 feat: add screen share quality controls 2026-09-22 15:01:14 +08:00
illusia 24f1b9a4b8 docs: add star history chart 2026-09-22 12:04:27 +08:00
illusia 79b91fca44 feat: refine screen share member controls 2026-09-22 11:31:30 +08:00
illusia 6a821b760e fix: sync mute state and handle move permissions 2026-09-22 10:50:53 +08:00
illusia 6539479d10 feat: show homepage visitor number 2026-09-22 00:09:33 +08:00
illusia 8ed3e788be feat: add STUN candidates for screen sharing 2026-09-21 22:24:24 +08:00
illusia de8f6a11c9 chore: prepare v0.2.4-preview 2026-09-21 19:19:52 +08:00
illusia 21d53a30c9 fix: target native screen source during browser joins 2026-09-21 18:17:37 +08:00
illusia 22656b2e7d feat: bridge screen sharing with native ts6 clients 2026-09-21 17:51:43 +08:00
illusia 3a18bcebbc fix: place screen share viewers at top right 2026-09-21 08:48:19 +08:00
illusia 7b35c63a74 fix: isolate native screen share from browser p2p 2026-09-21 08:29:37 +08:00
illusia 6b9038da6c fix: include viewer id in native screen join 2026-09-21 06:06:39 +08:00
illusia 1dd04bf7ca fix: cancel pending screen capture safely 2026-09-21 05:59:54 +08:00
illusia 15af861389 fix: allow cancelling pending screen share 2026-09-21 05:56:53 +08:00
illusia 7ea63c525e fix: clean up pending screen share starts 2026-09-21 05:52:22 +08:00
illusia 3d0b8a5c97 feat: show screen share viewers 2026-09-21 05:49:11 +08:00
illusia fb39d82c01 fix: validate screen share connection state 2026-09-21 04:59:08 +08:00
illusia ae530963bf fix: clear failed screen share viewers 2026-09-21 01:05:11 +08:00
illusia f8554fc991 fix: harden browser screen share p2p signaling 2026-09-21 00:54:40 +08:00
illusia a3dad55c76 fix: forward native screen share join responses 2026-09-20 23:48:31 +08:00
illusia 0b29742bce feat: discover existing native screen streams 2026-09-20 23:33:51 +08:00
illusia c2c38fa011 Merge remote-tracking branch 'origin/master' into dev 2026-09-20 23:31:04 +08:00
illusia 578217ba41 fix: use native screen share join requests 2026-09-20 23:28:58 +08:00
illusia d75bdccfd9 feat: add direct P2P screen sharing signaling 2026-09-20 23:15:58 +08:00
illusia 412f560677 fix: keep admin settings inside scaled viewport 2026-09-20 10:16:22 +08:00
illusia fdccf86458 fix: keep admin relay settings within viewport 2026-09-20 10:03:42 +08:00
illusia d43a33aa15 docs: rewrite v0.2.3 release notes 2026-09-19 16:23:01 +08:00
illusia 056b57bcd1 release: prepare v0.2.3 2026-09-19 13:52:01 +08:00
illusia 688eb3174e fix: make member drag moves direct 2026-09-19 12:15:39 +08:00
illusia c38f67bc3b fix: keep current channel in move menu 2026-09-19 12:00:48 +08:00
illusia 67c7a27af6 fix: move members without channel passwords 2026-09-19 11:47:56 +08:00
illusia 6d1d2a1f92 fix: add pointer fallback for member moves 2026-09-19 11:32:22 +08:00
illusia faff7a2237 fix: restore member moves, avatars, and remembered identity 2026-09-19 11:12:19 +08:00
illusia dc63f4b45b Merge branch 'fix/issues-integration' into dev 2026-09-18 18:48:02 +08:00
illusia 380fb67090 merge: integrate issue 6 mute synchronization 2026-09-18 18:03:05 +08:00
illusia b71632cc29 merge: integrate issue 5 avatar support 2026-09-18 18:02:27 +08:00
illusia 38f7c94a65 merge: integrate issue 3 move permissions 2026-09-18 18:01:21 +08:00
illusia d91a145657 fix: complete client avatar loading 2026-09-18 17:58:55 +08:00
illusia a2e33ff176 feat: display TeamSpeak client avatars 2026-09-18 17:48:33 +08:00
illusia 010b8ef072 fix: gate member moves by TeamSpeak permissions 2026-09-18 17:36:45 +08:00
illusia 883703dd0c fix: preserve TeamSpeak channel order 2026-09-18 17:14:35 +08:00
illusia bcf212738b fix: synchronize microphone mute state 2026-09-18 17:06:30 +08:00
illusia fae21ec086 docs: add contributors section 2026-09-17 17:56:40 +08:00
illusia 22dcf93925 docs: label documentation links bilingually 2026-09-17 15:05:34 +08:00
illusia 4df59b80d0 docs: restore README banner and localize license 2026-09-17 15:02:20 +08:00
illusia c49b4ec715 release: prepare v0.2.2 2026-09-17 14:36:40 +08:00
illusia 1c80791109 feat: refine desktop audio controls 2026-09-17 14:28:18 +08:00
illusia 85f87ecd0b feat: add Russian Japanese localization and welcome templates 2026-09-17 13:49:43 +08:00
illusia 3d6752a5e4 docs: split README by language 2026-09-17 13:22:40 +08:00
illusia a0921c35b2 merge master error handling into denoise branch 2026-09-17 12:56:49 +08:00
Object ILLUSIA ace9e84889 Merge pull request #2 from LainHE/master
feat: 浏览器端报错翻译与提示改造(vibe coding)
2026-09-17 07:45:00 +08:00
LainHE 4ead174c04 feat: 浏览器端报错翻译与提示改造
- errors: 新增 TeamSpeak 服务器错误 ID 映射表与不可重连错误码集合,归一化
  normalizeTeamSpeakError 按 错误ID/关键词/异常类/传输层特征 分级收敛错误
- voice-bridge: 身份无效/客户端不可用时先发结构化 connectionFailed 帧再关闭,
  新增 pendingKickReason 机制在 kicked 事件后优先回放踢出原因;Opus 编码器
  不可用时限流上报 AUDIO_ENCODER_UNAVAILABLE
- ts-client: 记录本端退出 reasonID,转发 kicked 事件并归一化踢出/封禁原因
- network-probe/teamspeak-probe: 收窄关键字匹配、拒绝原因收敛到既有探测码
- session-manager: 新增 teamSpeak-kicked 拆除原因
- WebClient: 麦克风失败不再假成功,音频状态避免自相矛盾,新增降级横幅与
  中/英/德三语提示词表
- useVoiceWebSocket: 导出 ensureMicrophone 供开麦前预检,新增音频诊断状态、
  CONNECTION_FAILURE_MESSAGES 总表与网关关闭码映射
- 关键新增逻辑补充中文注释说明改动意图
2026-09-16 22:24:25 +08:00
illusia f628d19ebf fix: denoise microphone and honor WebRTC mute 2026-09-15 23:17:23 +08:00
illusia 75de8f1d2b test: use native microphone noise suppression 2026-09-15 22:05:15 +08:00
illusia 1ba8cd5ee1 docs: reorder README sections 2026-09-13 16:49:57 +08:00
illusia f639825775 docs: align README friend project section 2026-09-13 16:18:23 +08:00
illusia 0b40a69d74 docs: add dedicated friend projects section 2026-09-13 16:16:12 +08:00
illusia 6defbff591 docs: add NeteaseTSBot friend link 2026-09-13 16:13:53 +08:00
illusia b5d167e1e7 release: prepare v0.2.1 2026-09-13 08:26:45 +08:00
illusia 7f97d54206 fix: surface all connection error codes on join page 2026-09-13 08:20:27 +08:00
illusia ef3e65ea0b fix: show invalid nickname connection errors 2026-09-13 08:08:40 +08:00
illusia d13b3207a9 fix: send localized connection failure details 2026-09-13 08:00:07 +08:00
illusia 7e08ee54a5 fix: classify TeamSpeak connection failures 2026-09-12 08:09:52 +08:00
illusia 6d8e289b81 feat: scale frontend from 1080p baseline 2026-09-11 11:20:45 +08:00
illusia defbb766e4 feat: include relay route in connection records 2026-09-11 07:34:52 +08:00
illusia 69043748a1 feat: show client IP in connection records 2026-09-10 21:28:34 +08:00
illusia 8046985574 docs: clarify relay deployment instructions 2026-09-10 20:52:54 +08:00
illusia 5ce73d2c84 docs: finalize v0.2.0 release notes 2026-09-10 20:42:17 +08:00
illusia 2d1d202981 fix: use valid Docker healthcheck syntax 2026-09-10 20:20:09 +08:00
illusia 73313f9e2d feat: add relay deployment mode and multiple relays 2026-09-10 20:16:50 +08:00
illusia 097c72bc5d release: prepare v0.2.0 2026-09-10 17:47:34 +08:00
illusia 71f219b7ca merge: promote 0.2.0 preview features 2026-09-10 17:29:35 +08:00
illusia bacc9fe07e merge: integrate connection error fixes 2026-09-10 17:28:41 +08:00
illusia a9c360fb9c docs: describe 0.2.0 connection fixes 2026-09-10 17:27:44 +08:00
illusia 04926c8491 docs: record admin log improvements 2026-09-10 17:25:28 +08:00
illusia fa1d1ad01b docs: add advanced feature guides 2026-09-10 17:22:13 +08:00
illusia c0fc18c344 docs: add advanced feature guides 2026-09-10 17:20:13 +08:00
illusia 69d69f0a5a fix: show generic reason for untraceable history 2026-09-10 17:03:22 +08:00
illusia 6d7976e5d8 fix: hide disabled relay and report password errors 2026-09-10 16:32:18 +08:00
illusia aef1f68875 fix: explain TeamSpeak connection failures 2026-09-10 16:11:18 +08:00
illusia 06e5cc6d8b fix: allow explicit private targets on relay service 2026-09-10 15:35:57 +08:00
illusia 7782e9b327 feat: expose acceleration relay settings in admin console 2026-09-10 15:25:47 +08:00
illusia b82c4fe0af feat: add mainland acceleration preview 2026-09-10 14:27:33 +08:00
illusia 45584810a2 test: add IPv6 acceleration smoke 2026-09-10 11:54:31 +08:00
illusia bfefd053a0 feat: add acceleration tunnel proof of concept 2026-09-10 11:29:18 +08:00
illusia 324213de14 chore: remove repository test sources 2026-09-10 10:54:18 +08:00
illusia a041ba90bb fix: support IPv6 TeamSpeak targets safely 2026-09-10 10:39:02 +08:00
illusia 0dc623eb69 docs: simplify Docker deployment instructions 2026-09-08 13:38:23 +08:00
illusia 3e6876dbe7 release: prepare v0.1.8 2026-09-08 11:25:50 +08:00
illusia a60abffd3b fix: make performance probe handlers browser-safe 2026-09-08 11:09:51 +08:00
illusia 2b43952c01 fix: harden local targets and monitor network continuously 2026-09-08 11:01:28 +08:00
Object ILLUSIA 12f440ab8b Update README to remove image width attribute
Removed width attribute from project icon image.
2026-09-07 13:39:11 +08:00
Object ILLUSIA 7221af78bf Change project icon image in README
Updated the image source in the README file.
2026-09-07 13:38:39 +08:00
Object ILLUSIA a88b0616f5 upload banner
banner
2026-09-07 13:38:14 +08:00
illusia ea4d5b2a70 docs: expand localized interface screenshots 2026-09-06 15:36:46 +08:00
illusia a439100ad6 docs: add localized interface screenshots 2026-09-06 15:28:37 +08:00
illusia 620d24f796 fix: compact latin locale typography 2026-09-06 15:24:51 +08:00
illusia fc3bbd0c59 fix: install ping for admin diagnostics 2026-09-06 15:08:19 +08:00
illusia 3b5ce9b446 fix: restore dark welcome contrast 2026-09-06 14:51:51 +08:00
illusia 37de6067d0 fix: widen language menu options 2026-09-06 14:40:51 +08:00
illusia 45410fcc7d fix: keep quiet WebRTC audio frames 2026-09-06 14:33:15 +08:00
illusia 166cb543a1 fix: make admin diagnostics clientless 2026-09-06 14:18:41 +08:00
illusia a295ff4b27 fix: measure TeamSpeak latency over its protocol 2026-09-06 14:04:41 +08:00
illusia dcc52c4530 release: refresh v0.1.7 diagnostics 2026-09-06 13:47:37 +08:00
illusia dc3ad6a598 release: prepare v0.1.7 2026-09-06 10:48:16 +08:00
illusia ef59e51e32 fix: reveal master volume slider on hover 2026-09-06 10:38:54 +08:00
illusia 9bbc22de25 feat: add master output volume control 2026-09-06 10:25:18 +08:00
illusia 335d93a8b8 fix: preserve accompaniment levels and channel password retry 2026-09-06 09:54:01 +08:00
illusia 52ff0560d1 feat: add German language option and Telegram community link 2026-09-06 09:10:58 +08:00
illusia a5e5dd6592 fix: align connection diagnostics and localize announcement 2026-09-06 08:53:39 +08:00
illusia 62e41dbc51 docs: show demo URL directly 2026-09-06 00:59:00 +08:00
illusia d8b2fd9e1b docs: reorganize bilingual README 2026-09-06 00:49:56 +08:00
illusia 8ca3249832 feat: use penguin icon for QQ entry 2026-09-05 23:35:42 +08:00
illusia 92574fddb1 feat: add QQ community entry to homepage 2026-09-05 21:59:15 +08:00
illusia 596114e6a3 fix: repair admin theme and merge connection history 2026-09-05 21:45:54 +08:00
illusia 2868f7a478 feat: animate welcome page text 2026-09-05 20:08:29 +08:00
illusia 63ef6b673d docs: remove private server address from README 2026-09-05 19:52:04 +08:00
illusia 5a56e1706f fix: remove welcome artwork 2026-09-05 18:09:37 +08:00
illusia 986814441d fix: keep welcome artwork and text readable 2026-09-05 18:09:06 +08:00
illusia 0ab6fb6f3f fix: remove welcome background overlay 2026-09-05 17:43:06 +08:00
illusia a966be4db6 feat: refresh welcome page visuals 2026-09-05 17:35:49 +08:00
illusia 556084233d fix: do not drop WebRTC volume updates 2026-09-04 19:39:45 +08:00
illusia c38239ec35 fix: apply member volume in WebRTC playback 2026-09-04 19:31:50 +08:00
illusia 21041346e3 docs: update README version badge 2026-09-04 16:59:55 +08:00
illusia 7320aa3bb5 release: prepare v0.1.6 2026-09-04 16:31:59 +08:00
illusia d9b8ea625a feat: add repository and site branding 2026-09-04 16:08:43 +08:00
illusia 2323e22fef fix: keep identity concurrency warning visible 2026-09-04 16:03:13 +08:00
illusia b5f8f01301 fix: guard concurrent remembered identities 2026-09-04 15:53:15 +08:00
illusia e964ff460e fix: bypass mixer for single accompaniment stream 2026-09-04 15:41:58 +08:00
illusia 21d8d9c3bc fix: preserve accompaniment audio levels 2026-09-04 14:30:51 +08:00
illusia 169cf88306 fix: preserve accompaniment frames in WebRTC mixer 2026-09-04 12:46:07 +08:00
illusia 059435f4cb fix: preserve WebRTC playback diagnostics 2026-09-04 11:59:53 +08:00
illusia 4d4d4cdeb1 fix: pace WebRTC downlink audio 2026-09-04 11:50:26 +08:00
illusia d42e7a033c fix: handle canceled accompaniment sharing 2026-09-04 10:37:38 +08:00
illusia 0986c65551 feat: add desktop accompaniment controls 2026-09-04 10:24:10 +08:00
illusia 694f864d36 fix: include ca certificates in docker build 2026-09-04 08:38:06 +08:00
illusia 512854ab9f fix: pin sdk lockfile for reproducible installs 2026-09-04 08:31:48 +08:00
illusia b298496911 fix: make sdk release preparation deterministic 2026-09-04 08:27:28 +08:00
illusia b6367e2645 release: prepare v0.1.5 2026-09-04 08:18:56 +08:00
illusia b0fa4bf5d0 fix: make theme toggle respond on first click 2026-09-04 08:05:19 +08:00
illusia cb3dbe4ca4 fix: preserve remembered browser identity on exit 2026-09-03 23:40:38 +08:00
illusia 96ba467d52 release: prepare v0.1.4 2026-09-03 17:07:35 +08:00
illusia 20fdcc7b1d fix: fit welcome header actions on narrow screens 2026-09-03 16:59:28 +08:00
illusia feea39a81c feat: add bilibili profile link 2026-09-03 16:57:35 +08:00
illusia 69d1653f99 feat: add home link to admin login 2026-09-03 16:53:39 +08:00
illusia a18a5b4920 fix: wrap long admin logs on desktop 2026-09-03 16:46:40 +08:00
illusia 343dd84132 fix: wrap long mobile admin logs 2026-09-03 16:44:52 +08:00
illusia a037962cc1 fix: let mobile admin pages scroll naturally 2026-09-03 16:40:22 +08:00
illusia 680ce246fd fix: compact server settings layout 2026-09-03 16:36:52 +08:00
illusia baa09ad38c feat: customize and lock WebRTC media ports 2026-09-03 16:28:49 +08:00
illusia 767bdea018 fix: show channel broadcast messages 2026-09-03 16:08:51 +08:00
illusia 83a8fd0d5a fix: enforce WebRTC microphone mute at gateway 2026-09-03 15:25:34 +08:00
illusia e14ddc9465 fix: filter silent WebRTC uplink frames 2026-09-03 15:16:20 +08:00
illusia 7feb97d77d fix: keep WebRTC playback on native media output 2026-09-03 14:52:59 +08:00
illusia 434360cda9 fix: recover WebRTC playback and speaker state 2026-09-03 14:45:44 +08:00
illusia d0a2e9edc0 fix: make WebRTC playback reliable 2026-09-03 14:28:47 +08:00
illusia 61f66ab319 docs: simplify user-facing README 2026-09-03 12:54:11 +08:00
illusia e79ad66e1f docs: document WebRTC public UDP setup 2026-09-03 11:59:03 +08:00
illusia 522fa8f409 fix: remove obsolete WebRTC error labels 2026-09-03 11:02:42 +08:00
illusia c7def28a8f feat: make WebRTC media service self-contained 2026-09-03 10:56:39 +08:00
illusia d6c8ccb73f fix(ui): remove real IP from WebRTC placeholder 2026-09-03 08:01:08 +08:00
illusia ab5851935c merge: admin-managed WebRTC settings 2026-09-03 07:52:21 +08:00
illusia 5c3d1b7e5d feat(admin): manage WebRTC settings from console 2026-09-03 07:52:13 +08:00
illusia ecff06e9a1 docs: record SDK migration in v0.1.3 2026-09-03 07:32:11 +08:00
illusia 9c3f09b55b merge: release v0.1.3 2026-09-03 07:28:29 +08:00
illusia b42c455e7f release: prepare v0.1.3 2026-09-03 07:28:14 +08:00
illusia 40ea30b9e2 fix(audio): cleanly fall back from WebRTC 2026-09-03 01:29:34 +08:00
illusia a4cf5b5359 fix(audio): use OpusEncoder decoder API 2026-09-03 01:23:34 +08:00
illusia 1d41d5a3e7 fix(audio): honor negotiated WebRTC Opus payload 2026-09-03 01:17:01 +08:00
illusia 46b190a913 fix(audio): avoid duplicate WebRTC playback 2026-09-03 01:02:18 +08:00
illusia 8abd2d6228 feat(audio): add experimental WebRTC transport 2026-09-03 00:47:51 +08:00
illusia 7ff6836a7e fix(audio): tighten gateway voice backpressure 2026-09-03 00:23:16 +08:00
illusia a6187c18af chore(audio): attribute egress frames by client 2026-09-03 00:19:45 +08:00
illusia 8ab2fbe8ea fix(audio): move capture framing to audio worklet 2026-09-03 00:13:48 +08:00
illusia 3e7674c94f chore(audio): capture sampled flow timing 2026-09-03 00:04:17 +08:00
illusia 30c0d09a33 chore(audio): include session flow counters in teardown 2026-09-03 00:01:50 +08:00
illusia d9904fa154 fix(audio): bound realtime voice buffering 2026-09-02 23:56:24 +08:00
illusia afbbd1e2d4 refactor: migrate to maintained TeamSpeak SDK 2026-09-02 23:27:32 +08:00
illusia adca8cc1db docs(deploy): standardize published Docker image flow 2026-09-02 16:26:20 +08:00
illusia 9788e7fa1c release: prepare v0.1.2 2026-09-02 16:11:59 +08:00
illusia 66da7efe4a fix(web): align settings icons on narrow screens 2026-09-02 15:48:39 +08:00
illusia 3fb7000d02 feat(web): add prominent GitHub repository link 2026-09-02 15:35:54 +08:00
illusia 03c95abcf7 docs(deploy): simplify Docker startup and document demo 2026-09-02 12:51:43 +08:00
illusia d2ffbee873 refactor(admin): hide protocol details from users 2026-09-02 10:38:46 +08:00
illusia 413dbaf3a8 docs: record microphone mute update 2026-09-02 08:01:08 +08:00
illusia 9187d2faed fix(web): replace browser ptt with microphone mute 2026-09-02 07:52:54 +08:00
illusia af85a73c7d feat(web): optimize mobile client experience 2026-09-02 06:23:07 +08:00
illusia b3ace7d7b6 release: consolidate final v0.1.1 documentation 2026-09-02 00:13:58 +08:00
illusia 49c8aee795 release: make v0.1.3 publishing reliable 2026-09-02 00:08:12 +08:00
illusia cd6dd69d9b release: prepare v0.1.2 docker and packages 2026-09-02 00:02:20 +08:00
illusia 325c907683 docs: add Chinese community section and release publishing 2026-09-01 23:58:21 +08:00
illusia 41666a5531 docs: separate bilingual navigation and dated changelog 2026-09-01 23:53:04 +08:00
illusia 0732e2df7d docs: align bilingual readme and changelog 2026-09-01 23:48:48 +08:00
illusia d7766497e8 fix complete directory sync for late web clients 2026-09-01 23:32:15 +08:00
illusia aa5c5e687f fix private chat disconnect and member menu 2026-09-01 23:23:47 +08:00
illusia 8a06382cec docs: remove implementation details from readme 2026-09-01 23:12:13 +08:00
illusia 1fe11850b7 docs: rewrite project readme 2026-09-01 23:02:43 +08:00
illusia a5a8648240 fix: keep admin lists inside their cards 2026-09-01 22:54:49 +08:00
illusia 81212b420b fix: keep page scrolling inside view containers 2026-09-01 22:26:32 +08:00
illusia 3ec9ab497a feat: split TeamSpeak address and port inputs 2026-09-01 22:12:37 +08:00
illusia bf1158aff2 fix: complete admin session translations 2026-09-01 21:47:32 +08:00
illusia a4cbcf536f feat: expose audit and update status in operations 2026-09-01 18:28:12 +08:00
illusia 797c5b118a fix: pass package version to admin overview 2026-09-01 18:26:06 +08:00
illusia 6337789afa chore: harden release operations and freeze docs 2026-09-01 18:24:09 +08:00
illusia 87fcd736be feat: add admin operations dashboard 2026-09-01 18:19:18 +08:00
illusia f5bd06fdaf feat: add managed invites and admin diagnostics backend 2026-09-01 18:16:22 +08:00
illusia 96ef77c789 feat: add real TeamSpeak whisper routing 2026-09-01 18:08:07 +08:00
illusia cab7707e51 feat: complete M008 web ux and demo 2026-09-01 17:54:51 +08:00
illusia 277fa9d8fe feat: complete M007 audio system 2026-09-01 17:41:12 +08:00
illusia 509dc038c1 M006: add scoped chat and client interactions 2026-09-01 17:32:00 +08:00
illusia 2f8301d188 M005: add local identity and preference persistence 2026-09-01 17:19:15 +08:00
illusia 3397e90749 M004: close Docker and deployment workflow 2026-09-01 17:02:54 +08:00
illusia 3cca211ae9 M003: add TeamSpeak reconnect recovery 2026-09-01 16:59:48 +08:00
illusia 8c7a940de5 M002: harden session lifecycle and directory sync 2026-09-01 16:52:26 +08:00
illusia 4a5d1ca0da Use admin default target on welcome page 2026-09-01 13:12:43 +08:00
illusia 7dcbcaae78 M001: replace bootstrap setup with forced password rotation 2026-09-01 13:09:51 +08:00
illusia 34ef16b737 chore: update frontend security dependencies 2026-09-01 08:07:27 +08:00
illusia 31f320d4c1 M001: add secure admin foundation 2026-09-01 08:00:24 +08:00
illusia 960be106bb M000: normalize configuration and TeamSpeak adapter 2026-08-31 20:14:08 +08:00
525 changed files with 103593 additions and 2779 deletions

No files matched your search

@@ -0,0 +1,32 @@
---
name: webspeak-plugin-development
description: Build, review and package WebSpeak API v2 functional applications with standard browser code and optional Node services, including GitHub distribution. Use for .wplugin applications rather than .wskin skins or their presentation components.
---
# WebSpeak Application Development
Read the current [application runtime guide](../../../docs/PLUGIN_DEVELOPMENT.md). In a standalone checkout, use `https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/blob/master/docs/PLUGIN_DEVELOPMENT.md`. Require WebSpeak v0.3.0 or later for API v2. API v1 and its shared-room examples are removed.
Develop an independent application, not a list of host business RPC calls. Use ordinary HTML/CSS/JavaScript, browser APIs and optional Node services with author-defined routes, dependencies and state. The host provides authenticated context, configuration, package/lifecycle management and a separate origin. It supplies no room API or feature permission list. Keep application business logic in its package; a host defect or missing general runtime primitive is a separate host change.
Start with `docs/templates/plugin-app/` or the distribution repository's `template/`. Put frontend output under `client/` with relative assets and optional `.mjs/.cjs` activation code under `server/`. Include audited dependencies or bundle them; the host does not run package installers. Native dependencies must match target OS and Node ABI. Build with `node scripts/build-plugin.mjs SOURCE_DIR OUTPUT.wplugin`, or the standalone distribution builder, then import the actual output.
Use `webspeak.ready`, `getContext()`, `onContextChange()` and `signal` for generic context; implement functionality through native browser/Node code. Scope provides admission and a grouping key, not synchronization. Server logic must enforce scope and business access. Prefer host-verified `req.webspeak` over browser-supplied identities or channels. Temporary runtime URLs are credentials: do not persist, broadcast or log them. Backend private configuration is encrypted at rest and omitted from admin reads; public configuration is user-visible.
Treat applications as trusted code. Node services have the WebSpeak OS account's privileges; process separation and heap limits are not a hostile-code sandbox. Frontends use a separate origin with standard browser capabilities. Browser permission, secure-context, user-gesture, CORS and network requirements apply. The shared application origin does not isolate mutually hostile plugins. Explain these boundaries accurately and review dependencies rather than inventing host feature permissions.
Provide responsive light/dark styles and suitable language handling using context. Keep UI in the application panel without relying on skin DOM. Clean timers, subscriptions, media and sockets on exit/revocation. Persist backend state in `dataDir`, never extracted code directories. Implement concurrency and atomic writes appropriate to the application.
Verify import, trust, enable, update, failure/restart, custom routes, persistence and revocation. Collaborative apps need two real browser participants and late-join/concurrent-change/channel-boundary/disconnect tests. Distinguish mocked HTTP, actual processes, browser interactions and independent networks. Claim only demonstrated capabilities. Keep credentials and diagnostics out of artifacts.
For distribution use schema v2 catalog entries, matching manifest, raw-package SHA-256 and fixed refs. Publishing and deployment follow the user's task authorization; this skill does not itself authorize either.
## Floating host workspace
The host owns a skin-independent draggable launcher, application library and non-modal app window. Do not add launch controls to a particular skin or inspect its DOM. Apps render their responsive light/dark UI inside the supplied iframe; the host supplies dragging, minimize/maximize/restore and close controls. The host window uses the standard `color-scheme` for its light/dark fallback without inheriting skin component styles. Do not duplicate host window chrome or block the workspace with a page-wide modal backdrop.
Minimizing or switching to the library retains the same iframe and app session. Transfers and playback must survive those actions. Closing the window, replacing the active app or host context revocation ends that session; only one frontend app is currently hosted at a time. Do not equate a hidden iframe with app exit. Verify resize, narrow screens, theme changes, minimize/resume without reload and close/revocation cleanup. Keep the user-facing window focused on functionality and actionable status; omit repeated runtime/permission disclaimers. Administrator trust and security review remain part of enablement.
## Instance authorization
The public host asks once per browser origin for third-party skins and functional applications together. No decision or refusal allows only Day, Night and ILLUSIA; KAAK also requires consent. The last item in the skin menu reopens this setting. Revocation must close/revoke the active frontend application while preserving independently enabled backend services. Do not add per-app copies of the same host authorization prompt, bypass the host gate or confuse this user decision with administrator package trust or browser-native permission prompts.
@@ -0,0 +1,4 @@
interface:
display_name: "WebSpeak Plugin Development"
short_description: "Build portable WebSpeak functional plugins"
default_prompt: "Use $webspeak-plugin-development to build and verify a portable WebSpeak plugin."
@@ -0,0 +1,35 @@
---
name: webspeak-skin-development
description: Develop, review, package, or validate portable WebSpeak .wskin skins. Keep skin UI and implementation inside the package and use only released runtime APIs.
metadata:
short-description: Develop portable WebSpeak skins
---
# WebSpeak Skin Development
Develop the skin as a portable `.wskin` package. A skin task should not require a skin-specific edit to WebSpeak's client, server, shared protocol, or host-widget implementation. The package owns its page/component markup, styling, copy, layout, assets, and supported plugin logic. The host owns TeamSpeak transport, credentials, trusted actions, and the versioned public data/API contract.
## Workflow
1. Locate the `webspeak-webclient` repository root, then read the single current contract and workflow in `docs/SKIN_DEVELOPMENT.md`. It covers package schemas, runtime data, permissions, actions, security boundaries, and validation. If a request needs an undocumented capability, identify the missing public contract before editing and treat that work as a separate platform change. Inspect the closest example under `docs/examples/`; do not copy unrelated product-specific content.
2. Choose the least complex supported package format that can express the request: CSS/assets for appearance, `content.json` for localized copy, `layout.json` for author defaults, `components.json` for declarative structure and supported interactions, and the documented v4 Wasm plugin path only when local logic is required. JavaScript files in a package are not executed by the current runtime.
3. Keep all skin-authored implementation in the package. Use stable public skin parts, component schema, published context fields, existing host widgets, and permission-gated actions. Do not add a widget, data field, action, CSS hook, or branch to core code for one skin. If a reusable platform capability is missing, identify the exact contract gap and treat it as separate platform work: define a generic, versioned API and compatibility behavior first; only then use that released API from the package.
4. Set a unique skin ID, increment its package version for changed output, and set `minAppVersion` to the lowest compatible WebSpeak runtime. Keep component schema and plugin `apiVersion` aligned with the APIs actually used. Package every referenced image, font, stylesheet, component, and plugin asset. Use only safe package-relative paths; do not depend on local machine files, remote assets, private endpoints, or instance-specific frontend code.
5. Build the `.wskin` from its source directory while including only files declared by the manifest. Validate the finished archive with the repository importer and keep any distributable built-in archive synchronized with its example source. An example README or other undeclared file belongs beside the package, not inside it.
6. Verify the package at the scope of the change: run the skin package and component-schema tests; run the relevant type/build checks; import the exact archive in a compatible WebSpeak runtime. Check desktop and narrow layouts, all supported interface languages, long text, keyboard focus, reduced motion, contrast, and every interaction the skin replaces. For a portability claim, install the same archive (compare its SHA-256) in two instances with the same compatible runtime/API version; do not treat a successful build alone as proof.
## Compatibility and truthfulness
- `minAppVersion` is a lower compatibility bound, not a guarantee that an older or unrelated runtime implements every API. Read the current schema and runtime documentation before using a capability.
- Dynamic values such as public connection state or administrator-configured copy are runtime inputs. The package contains how those values are rendered; it must not bundle secrets or assume a particular server's private configuration.
- An existing host widget is a stable capability the package may declare. Its presence does not authorize changing that widget's implementation for a skin-specific design; use package CSS/components around it where supported.
- Do not describe an unimplemented API as portable, mark a feature complete from schema validation alone, or claim that different runtime versions render identically. Report the tested package hash, compatible runtime/API versions, and any platform gap.
## References
- `docs/SKIN_DEVELOPMENT.md` — the single current reference for skin formats, runtime APIs, permissions, data, actions, CSS hooks, security, and QA.
- `docs/examples/ILLUSIA-VOICE.md` and `docs/examples/OPEN-VOICE-SURFACE.md` — full skin and surface examples.
## Instance authorization
WebSpeak v0.3.0 replaces per-skin consent dialogs with one origin-scoped user decision covering third-party skins and functional apps. Without consent only the fixed official Day, Night and ILLUSIA skins are available; bundled KAAK also requires consent. The host skin switcher owns the final authorization item. Packages must not duplicate or bypass it. Revocation must cancel pending activation, remove third-party CSS/components and stop workers. Continue enforcing manifest permissions, credential redaction, trusted action validation and package digests internally; one-time consent does not extend the public API. See the current guide for release compatibility.
+22
View File
@@ -0,0 +1,22 @@
.git
.github
.claude
node_modules
web/node_modules
mobile/node_modules
web/android
.local-opus-hook.cjs
界面参考
dist
web/dist
data
certs
release-artifacts
scripts/acceleration-poc
*.tar.gz
*.tar.xz
claude.pem
config.json
.env
.env.*
*.log
+175 -28
View File
@@ -1,50 +1,76 @@
name: Build release assets
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
version:
description: Release version without the v prefix
required: true
default: 0.1.0
default: 0.3.0
type: string
permissions:
contents: read
jobs:
windows-x64:
runs-on: windows-latest
verify:
uses: ./.github/workflows/ci.yml
windows:
needs: verify
strategy:
fail-fast: false
matrix:
include:
- arch: x64
runner: windows-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.22.2
architecture: x64
cache: npm
cache-dependency-path: |
package-lock.json
web/package-lock.json
- name: Build application
shell: pwsh
env:
RELEASE_REF: ${{ inputs.version || github.ref_name }}
run: |
$ErrorActionPreference = "Stop"
npm ci --no-audit --no-fund
$releaseVersion = $env:RELEASE_REF -replace '^v', ''
npm ci --ignore-scripts --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm rebuild @discordjs/opus --foreground-scripts --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm --prefix web ci --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm --prefix web run build
$currentVersion = node -p "require('./package.json').version"
if ($currentVersion -ne $releaseVersion) {
npm version --no-git-tag-version $releaseVersion
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
npm run web:build
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm run build
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
npm prune --omit=dev --no-audit --no-fund
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
- name: Package and smoke-test Windows x64
- name: Package and smoke-test Windows ${{ matrix.arch }}
shell: pwsh
env:
RELEASE_VERSION: ${{ inputs.version }}
RELEASE_REF: ${{ inputs.version || github.ref_name }}
PACKAGE_ARCH: ${{ matrix.arch }}
run: |
$ErrorActionPreference = "Stop"
$packageName = "webspeak-webclient-v$env:RELEASE_VERSION-windows-x64"
$releaseVersion = $env:RELEASE_REF -replace '^v', ''
$packageName = "webspeak-webclient-v$releaseVersion-windows-$env:PACKAGE_ARCH"
$packageRoot = Join-Path $env:RUNNER_TEMP $packageName
$runtimeRoot = Split-Path -Parent (Get-Command node).Source
New-Item -ItemType Directory -Path $packageRoot | Out-Null
@@ -71,8 +97,8 @@ jobs:
$smokeRoot = Join-Path $env:RUNNER_TEMP ($packageName + "-smoke")
Copy-Item -Recurse -LiteralPath $packageRoot -Destination $smokeRoot
@{
port = 31440
tsHost = "203.0.113.10"
port = 3040
tsHost = "127.0.0.1"
tsPort = 9987
tsServerPassword = ""
tsServerProtocol = "ts6"
@@ -85,9 +111,9 @@ jobs:
$health = $null
for ($attempt = 0; $attempt -lt 30 -and -not $health; $attempt++) {
Start-Sleep -Milliseconds 500
try { $health = Invoke-RestMethod -Uri "http://127.0.0.1:31440/api/health" -TimeoutSec 2 } catch {}
try { $health = Invoke-RestMethod -Uri "http://127.0.0.1:3040/api/health" -TimeoutSec 2 } catch {}
}
if (-not $health -or $health.status -ne "ok" -or $health.version -ne $env:RELEASE_VERSION) {
if (-not $health -or $health.status -ne "ok" -or $health.version -ne $releaseVersion) {
throw "Windows release health check failed"
}
} finally {
@@ -96,36 +122,56 @@ jobs:
Compress-Archive -LiteralPath $packageRoot -DestinationPath (Join-Path $env:GITHUB_WORKSPACE ($packageName + ".zip")) -CompressionLevel Optimal
- uses: actions/upload-artifact@v4
with:
name: windows-x64
path: webspeak-webclient-v${{ inputs.version }}-windows-x64.zip
name: windows-${{ matrix.arch }}
path: webspeak-webclient-v*-windows-${{ matrix.arch }}.zip
if-no-files-found: error
compression-level: 0
linux-x64:
runs-on: ubuntu-latest
linux:
needs: verify
strategy:
fail-fast: false
matrix:
include:
- arch: x64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.22.2
architecture: ${{ matrix.arch == 'arm64' && 'arm64' || 'x64' }}
cache: npm
cache-dependency-path: |
package-lock.json
web/package-lock.json
- name: Build application
env:
RELEASE_REF: ${{ inputs.version || github.ref_name }}
run: |
set -euo pipefail
npm ci --no-audit --no-fund
release_version="${RELEASE_REF#v}"
npm ci --ignore-scripts --no-audit --no-fund
npm rebuild @discordjs/opus --foreground-scripts --no-audit --no-fund
npm --prefix web ci --no-audit --no-fund
npm --prefix web run build
current_version="$(node -p "require('./package.json').version")"
if [ "$current_version" != "$release_version" ]; then
npm version --no-git-tag-version "$release_version"
fi
npm run web:build
npm run build
npm prune --omit=dev --no-audit --no-fund
- name: Package and smoke-test Linux x64
- name: Package and smoke-test Linux ${{ matrix.arch }}
env:
RELEASE_VERSION: ${{ inputs.version }}
RELEASE_REF: ${{ inputs.version || github.ref_name }}
PACKAGE_ARCH: ${{ matrix.arch }}
run: |
set -euo pipefail
package_name="webspeak-webclient-v${RELEASE_VERSION}-linux-x64"
release_version="${RELEASE_REF#v}"
package_name="webspeak-webclient-v${release_version}-linux-${PACKAGE_ARCH}"
package_root="$RUNNER_TEMP/$package_name"
runtime_root="$(dirname "$(dirname "$(command -v node)")")"
mkdir -p "$package_root/web" "$package_root/runtime"
@@ -148,8 +194,8 @@ jobs:
cp -a "$package_root" "$smoke_root"
cat > "$smoke_root/config.json" <<'CONFIG'
{
"port": 31441,
"tsHost": "203.0.113.10",
"port": 3040,
"tsHost": "127.0.0.1",
"tsPort": 9987,
"tsServerPassword": "",
"tsServerProtocol": "ts6",
@@ -164,17 +210,118 @@ jobs:
trap 'kill "$app_pid" 2>/dev/null || true; wait "$app_pid" 2>/dev/null || true' EXIT
health=""
for _ in $(seq 1 30); do
health="$(curl -fsS --max-time 2 http://127.0.0.1:31441/api/health 2>/dev/null || true)"
if grep -q '"status":"ok"' <<<"$health" && grep -q "\"version\":\"$RELEASE_VERSION\"" <<<"$health"; then break; fi
health="$(curl -fsS --max-time 2 http://127.0.0.1:3040/api/health 2>/dev/null || true)"
if grep -q '"status":"ok"' <<<"$health" && grep -q "\"version\":\"$release_version\"" <<<"$health"; then break; fi
sleep 0.5
done
grep -q '"status":"ok"' <<<"$health"
grep -q "\"version\":\"$RELEASE_VERSION\"" <<<"$health"
grep -q "\"version\":\"$release_version\"" <<<"$health"
)
tar -czf "$GITHUB_WORKSPACE/${package_name}.tar.gz" -C "$RUNNER_TEMP" "$package_name"
- uses: actions/upload-artifact@v4
with:
name: linux-x64
path: webspeak-webclient-v${{ inputs.version }}-linux-x64.tar.gz
name: linux-${{ matrix.arch }}
path: webspeak-webclient-v*-linux-${{ matrix.arch }}.tar.gz
if-no-files-found: error
compression-level: 0
android:
needs: verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.22.2
cache: npm
cache-dependency-path: |
package-lock.json
web/package-lock.json
mobile/package-lock.json
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "21"
- uses: android-actions/setup-android@v4
with:
packages: platform-tools
- name: Build Android APKs
env:
RELEASE_REF: ${{ inputs.version || github.ref_name }}
run: |
set -euo pipefail
release_version="${RELEASE_REF#v}"
version_code="$(node -e 'const [major, minor, patch] = process.argv[1].split(".").map(Number); process.stdout.write(String(major * 10000 + minor * 100 + patch))' "$release_version")"
sdkmanager "platform-tools" "platforms;android-36" "build-tools;36.0.0"
npm ci --ignore-scripts --no-audit --no-fund
current_version="$(node -p "require('./package.json').version")"
if [ "$current_version" != "$release_version" ]; then
npm version --no-git-tag-version "$release_version"
fi
npm --prefix web ci --no-audit --no-fund
npm --prefix mobile ci --no-audit --no-fund
npm run android:sync
cd web/android
chmod +x gradlew
./gradlew --no-daemon assembleDebug -PappVersion="$release_version" -PappVersionCode="$version_code"
cd "$GITHUB_WORKSPACE"
mkdir -p release-apks
for apk in web/android/app/build/outputs/apk/debug/app-*-debug.apk; do
abi="${apk##*/app-}"
abi="${abi%-debug.apk}"
cp "$apk" "release-apks/webspeak-android-v${release_version}-${abi}-debug.apk"
done
test "$(find release-apks -maxdepth 1 -name '*.apk' | wc -l)" -eq 3
- uses: actions/upload-artifact@v4
with:
name: android-apks
path: release-apks/*.apk
if-no-files-found: error
compression-level: 0
publish-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [windows, linux, android]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Download deployment packages
uses: actions/download-artifact@v4
with:
pattern: '*'
path: release-assets
merge-multiple: true
- name: Create checksums
run: |
set -euo pipefail
cd release-assets
sha256sum * > SHA256SUMS.txt
- name: Publish GitHub release
env:
RELEASE_REF: ${{ github.ref_name }}
run: |
node --input-type=module <<'NODE'
import { readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
const tag = process.env.RELEASE_REF;
const languages = [['简体中文', 'zh-CN'], ['English', 'en'], ['Deutsch', 'de'], ['Русский', 'ru'], ['日本語', 'ja']];
const sections = languages.map(([label, locale]) => {
const source = readFileSync(`docs/README.${locale}.md`, 'utf8');
const start = source.indexOf(`### [${tag}](`);
if (start < 0) throw new Error(`Missing ${tag} release notes for ${locale}`);
const remaining = source.slice(start);
const next = remaining.indexOf('\n### [v', 1);
const notes = (next < 0 ? remaining : remaining.slice(0, next)).trim();
return `## ${label}\n\n${notes}\n\n[Project documentation](https://github.com/${process.env.GITHUB_REPOSITORY}/blob/${tag}/docs/README.${locale}.md)`;
});
writeFileSync(join(process.env.RUNNER_TEMP, 'webspeak-release-notes.md'), sections.join('\n\n---\n\n') + '\n');
NODE
- name: Upload GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: WebSpeak ${{ github.ref_name }}
body_path: ${{ runner.temp }}/webspeak-release-notes.md
files: release-assets/*
+52
View File
@@ -0,0 +1,52 @@
name: Continuous integration
on:
push:
branches: [dev, master]
pull_request:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.22.2
cache: npm
cache-dependency-path: |
package-lock.json
web/package-lock.json
- name: Install dependencies
run: |
npm ci --ignore-scripts --no-audit --no-fund
npm rebuild @discordjs/opus --foreground-scripts --no-audit --no-fund
npm --prefix web ci --no-audit --no-fund
- name: Test and build application
run: npm run verify
docker-smoke:
needs: verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Build image
run: docker build --tag webspeak:ci .
- name: Run health smoke test
run: |
set -euo pipefail
docker run --detach --name webspeak-ci --publish 3040:3040 webspeak:ci
trap 'docker logs webspeak-ci; docker rm --force webspeak-ci' EXIT
for attempt in $(seq 1 30); do
if curl --fail --silent http://127.0.0.1:3040/health | grep -q '"status":"ok"'; then
exit 0
fi
sleep 2
done
exit 1
+51
View File
@@ -0,0 +1,51 @@
name: Publish Docker image
on:
push:
branches: [master]
tags: ["v*.*.*"]
workflow_dispatch:
permissions:
contents: read
packages: write
env:
IMAGE_NAME: ghcr.io/echosixhiya/webspeak
jobs:
verify:
uses: ./.github/workflows/ci.yml
publish:
needs: verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=tag
type=sha
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
+24 -1
View File
@@ -1,9 +1,32 @@
node_modules/
dist/
web/dist/
web/skin-wasm-interpreter/target/
mobile/node_modules/
web/android/.gradle/
web/android/build/
web/android/app/build/
web/android/local.properties
web/android/app/src/main/assets/public/
web/android/app/src/main/assets/capacitor.config.json
data/
config.json
*.log
.env
webspeak-update.tar.gz
# Local deployment notes and downloaded artifacts.
/release-artifacts/
/webspeak-deploy*.tar.gz
/webspeak-update*.tar.gz
/teamspeak6-server-linux-amd64.tar.xz
/.local-opus-hook.cjs
/界面参考/stitch_teamspeak_web_interface.zip
claude.pem
# Private credentials and deployment notes stay local.
.env.*
!.env.example
*.pem
*.key
/.claude/
/LOCAL-RELEASE-RUNBOOK.md
/DEPLOYMENT-*.md
+195 -70
View File
@@ -1,87 +1,212 @@
# WebSpeak — TeamSpeak Browser Gateway
# WebSpeak TeamSpeak Browser Gateway
Server-side bridge that lets users join TeamSpeak voice channels from a browser. No TS client install needed.
WebSpeak connects browser users to TeamSpeak 3 and TeamSpeak 6 through a self-hosted Node.js gateway. Each connected browser session owns an independent TeamSpeak client. The repository also contains a standalone UDP acceleration relay and an Android preview with an embedded local gateway.
## Architecture
## Application boundaries
```
Browser (PCM capture) → WebSocket → Node.js server (PCM→Opus) → TeamSpeak server
Browser (playback) ← WebSocket ← Node.js server (Opus relay) ← TeamSpeak server
| Location | Responsibility |
| --- | --- |
| `src/index.ts` | Gateway startup, SQLite, master secret, admin service and shutdown; also supports relay mode |
| `src/server/server.ts` | HTTP or HTTPS, public configuration, skins, join tickets, admin routes and static frontend |
| `src/server/voice-bridge.ts` | `/ws/voice`, admission, connection/reconnection orchestration and voice transport assembly |
| `src/server/voice-commands.ts`, `directory-view.ts`, `audio-stats.ts` | Command execution, public directory projection and diagnostic snapshots |
| `src/server/member-avatars.ts` | Generation-bound optional avatar downloads, bounded sequential batches, cached images and timer cleanup |
| `src/server/session-events.ts` | Session-owned SDK subscriptions, directory projection, self/channel state, chat mapping and avatar coordination |
| `src/server/screen-share-coordinator.ts` | Server/channel-scoped sharing membership and browser/native signaling |
| `src/shared/` | Browser-safe wire types and runtime parsers shared by both endpoints |
| `src/shared/admin-inputs.ts`, `admin-responses.ts` | Shared admin request types and runtime-checked response projections |
| `src/server/ts-client.ts` and `teamspeak-adapter.ts` | SDK integration, TS3/TS6 negotiation, identity, chat, voice and client events |
| `src/server/session-manager.ts` and `directory-sync.ts` | Connection state, teardown, admission limits and directory reconciliation |
| `src/server/webrtc-audio.ts` and `opus-codec.ts` | WebRTC audio mixing and platform-specific Opus codecs |
| `src/server/session-audio.ts` | Per-session PCM encoding, exclusive WebRTC/WebSocket routing, whisper dispatch, bounded egress and audio counters |
| `src/admin/`, `src/security/`, `src/persistence/` | Administration, access policies, credentials and persistent settings |
| `src/relay.ts` and `src/server/acceleration-relay.ts` | Standalone relay and gateway-side relay transport |
| `web/src/views/` and `web/src/composables/` | Vue pages, connection state, audio controls, chat and screen sharing |
| `web/src/voice/screen-share.ts` | Per-session screen capture, peer negotiation, cleanup and diagnostics |
| `web/src/voice/remote-playback.ts` | Per-speaker compatibility decoding, bounded scheduling, volume and resource cleanup |
| `web/src/voice/microphone-test.ts` | Cancellable recording tests, recorder deadline and playback URL ownership |
| `web/src/voice/microphone-capture.ts` | Prepared microphone processing graphs, per-context worklet loading, optional RNNoise and independent PCM activation/cleanup |
| `web/src/voice/audio-sink.ts` | Serialized device routing per audio endpoint, with stale-operation guards |
| `web/src/voice/accompaniment.ts` | Generation-bound display-audio capture, immediate pending-capture cancellation, ended listeners and committed activity |
| `web/src/voice/webrtc-input.ts` | Stable WebRTC sender output, microphone gain and transactional accompaniment-source attachment |
| `web/src/voice/microphone-meter.ts` | Optional per-peer level sampling, owned analysis nodes and timer, partial-failure cleanup and stale-tick rejection |
| `web/src/voice/webrtc-transport.ts`, `webrtc-playback.ts` | Per-attempt peer negotiation, input/meter ownership, compatibility fallback and independently owned playback elements and retries |
| `web/src/voice/connection.ts`, `commands.ts` | Cancellable ticket acquisition, socket and connection generations, plus per-command acknowledgement deadlines and cleanup |
| `web/src/voice/session-state.ts` | Reactive directory, chat history, events and notifications; complete versus omitted directory data, session resets and private-conversation identity scopes |
| `web/src/composables/useWebClientChat.ts`, `useWebClientChannels.ts` | Destination-owned drafts and pending sends, identity-bound private history, and iterative channel-tree projection |
| `web/src/composables/useWebClientIdentity.ts`, `web/src/components/web-client/IdentityImportDialog.vue` | Page-owned identity reads, parsing, restoration and exports; a presentation dialog with explicit input and action events |
| `web/src/voice/audio-diagnostics.ts`, `web/src/composables/useWebClientPerformance.ts` | Session-owned diagnostic probes and compatibility counters, browser statistics, comparable sample scopes and cancellable UI polling |
| `web/src/platform/` | Browser mounting and cancellable Android gateway readiness handshake |
| `web/src/services/`, `web/src/i18n/`, `web/src/skins/` | Browser persistence, identity import, skin packages and translations |
| `web/src/composables/usePublicSkin.ts`, `web/src/services/skin-operation.ts` | Shared public-page skin initialization and selection, page ownership, cancellation and bounded loading |
| `web/src/services/admin-api.ts`, `admin-requests.ts` | Admin HTTP validation and cancellation, session-bound CSRF and per-feature request ownership, including skin uploads and backup downloads |
| `web/src/composables/useAdminServerSettings.ts`, `useAdminOperations.ts`, `useAdminSkins.ts` | Admin form merging, probes, operational actions and skin state; the page owns authentication, routing and overview |
| `web/src/components/admin/` | Server settings, operations and skin presentation; the parent page retains the feature controller instances across subroute changes |
| `web/src/composables/useAdminI18n.ts`, `web/src/i18n/admin.ts` | Admin formatting and error/status mappings; all five languages explicitly implement the same translation keys |
| `src/mobile/`, `mobile/`, `web/android/` | Android loopback gateway, asset packaging and Capacitor container |
## Connection and control protocol
1. The browser requests `/api/join-ticket`. The gateway validates the request against its access policy and issues a short-lived, single-use ticket.
2. The browser presents the ticket to `/ws/voice`. The bridge admits a session, acquires any required identity lease and creates its TeamSpeak client.
3. WebSocket text messages carry JSON commands, events, WebRTC negotiation and screen-sharing signaling. The server uses the WebSocket `isBinary` flag to distinguish audio from control messages.
4. Register TeamSpeak event listeners before connecting: directory and membership events may arrive during the handshake.
Channel and member data come from SDK directory snapshots and client-protocol commands, followed by realtime notifications. WebQuery and its API key are not required. `DirectorySynchronizer` reconciles snapshots with membership events.
`SessionEventCoordinator` subscribes before SDK connection and closes before waiting for peer shutdown. Remove only its own listeners and guard captured callbacks as well as registered ones. Directory events are accepted during authentication, synchronization and the live connection, but not reconnect backoff. SDK adapter listeners must reject events from a replaced client before mutating state or forwarding them. A kick remains terminal if the disconnect notification already started recovery.
Avatar downloads belong to the connected directory generation. Reset them on SDK interruption and close them before awaiting session teardown. Old success or failure results cannot refill caches, publish images, start another download, or unlock newer work. `isAlive` is only the WebSocket heartbeat acknowledgement flag; it is not a lifecycle predicate. Keep avatar failure optional, the 50-member batch limit and 250 ms continuation delay.
The SDK avatar method captures its client and connection generation across metadata, transfer initialization and download. Recheck both after each await, including reconnects that reuse the same SDK object; never continue an old transfer through a replacement `this.client`. A retired SDK client's disconnect event must not clear the current connection.
Session teardown must remain safe when requested more than once or when sockets and codec resources are already closed. Reconnection is governed by `reconnect-policy.ts`; preserve terminal error handling, bounded retries and the previous-channel fallback.
Invalidate session audio before awaiting peer closure. Each codec and track must be released independently so one disposal failure cannot abandon the remaining resources. WebRTC close callers share one completion promise, including a peer-close rejection. Preserve WebSocketServer's close listener: it owns removal from the server's client set and allows shutdown to finish.
Late socket messages and media permission/negotiation results must not mutate a replacement session. Screen-sharing ownership is scoped to both the TeamSpeak target and channel; another member moving channels must not stop the current user's share. Preserve these invariants when extracting the remaining audio responsibilities.
WebRTC offers, answers, playback callbacks and accompaniment capture belong to the session and peer that started them. Invalidate pending negotiation on stop, reconnect or teardown before awaiting resource closure. A stale peer must not publish errors, counters or audio into its successor. Negotiation and track setup failures must restore compatibility capture without misreporting a microphone failure.
The WebRTC transport owns its peer, input mixer, meter, ICE wait and answer deadline. The capture layer retains ownership of the original microphone and PCM graph; releasing input during microphone preparation must not invalidate the preparing transport. Failed stop signaling cannot prevent local cleanup or compatibility fallback. A fallback permission failure must still belong to the connection and transport generation that initiated it.
Each remote WebRTC audio element owns its in-flight play attempt and retry listeners. Coalesce overlapping gestures, guard captured callbacks against replacement and release partial element setup. Pause, listener removal, source clearing or peer closure failures must not interrupt release of other resources.
Ticket acquisition has a 15-second browser deadline covering preference readiness, fetch and response-body reading. Disconnect and replacement abort the owning request immediately; stale success, rejection and deadline callbacks cannot open a socket or update a newer connection. This is separate from the gateway's TeamSpeak handshake policy. Browser cancellation does not undo a server-side invite consumption or ticket issuance. Preserve the gateway close code over generic WebSocket errors, detach retired handlers, and tolerate socket-close failures.
Every acknowledged command owns its original socket, connection generation and deadline. Success, server rejection, synchronous send failure, timeout and disconnect all use one idempotent completion path; release the registration and timer immediately. Fire-and-forget commands keep the existing shared wire contract.
Chat sends require a connected TeamSpeak session and append local history only after acknowledgement. A queued acknowledgement cannot append after session resource release. Recovery rejections retain the command request ID. Optional channelId and clientUid command fields let the gateway verify the actual channel and recipient before invoking the SDK; legacy payloads remain accepted without those additional guards. Confirmation is not a read receipt, and a timeout does not prove non-delivery.
Directory, chat, events and poke lists retain their reactive array identities. Complete channel snapshots replace the member directory, while omitted members remain unknown rather than empty. Channel projections share canonical members. Departure and UID replacement release the old member's playback, speaking state, temporary volume and whisper selection; persisted UID-based preferences remain. A recovered TeamSpeak connection replaces its directory even when the connected message omits members.
Explicit disconnect, target replacement and ordinary socket closure reset message state and advance the page's session epoch. Same-socket recovery may preserve chat history, but cannot send until connected; recovered directories and events replace old snapshots and clear old pokes. Failed recovery may retain its history for the failure panel until retry or exit.
Private history uses UID scopes when available and member-lifetime scopes for legacy clients without UIDs. Unknown senders must not become later members merely because a numeric ID matches. Preserve the recipient name in outgoing history. Drafts, pending submissions and errors belong to a destination within a session; switching tabs cannot duplicate an in-flight send. Confirmation clears only the unchanged submitted draft, including when its tab is inactive. Reset or disposal retires late feedback.
Channel projection uses iterative parent and sibling traversal, emits each ID at most once, keeps the first duplicate, promotes missing-parent channels to roots and starts isolated cycles at their first source entry. Do not reintroduce recursive traversal or silently discard the entire directory on a malformed topology.
Audio diagnostic probes retain their cancellation entry and deadline until both gateway and browser statistics finish. Bind the result to the original socket, connection generation and peer; disconnect settles pending consumers immediately, and a late browser getStats result cannot mix with a replacement peer. A probe send failure returns no sample.
Diagnostic samples also include the WebRTC transport generation, so a probe cannot survive a failed attempt that starts and ends without a peer. A browser-local scope ID changes with the source and session resets; compatibility counters reset at session teardown and snapshots stay independent. The scope ID is internal metadata, not part of the gateway protocol. Keep the exported diagnostic types available from the voice composable for existing callers.
The performance panel only subtracts counters from matching scopes, transports and downlink sources (PCM, RTP or gateway frames). Null or rejected probes clear stale activity and restart the baseline. Check the polling generation before starting work as well as after awaiting results; unmount retires callbacks and manual refresh. Preserve the 2-second polling interval. For loss estimates, packetsSent already includes all sent packets, while packetsReceived requires adding lost packets to form the denominator; keep percentages bounded and treat RTCP/local snapshots as estimates.
Accompaniment changes keep the WebRTC sender output alive. Prepare and connect the new source before replacing the old one; a failure preserves the current microphone and accompaniment. The input mixer owns its nodes and output track, never the externally owned capture streams. Release partial allocations and continue cleanup if an individual node fails. Application audio bypasses microphone gain/denoising and retains its source level.
The accompaniment controller owns both active and pending captures. Stop, disconnect and replacement immediately release candidates already returned by the browser, even while optional constraints are pending. Late permissions are stopped on arrival; ended or stale candidates cannot be published. Register ended listeners during preparation and publish activity only after attachment succeeds. Optional content hints and processing constraints may fail without losing capture; distinguish audio attachment errors from permission errors in all five languages.
Microphone metering is optional and must not interrupt voice. Its nodes and timer belong to one meter instance; a queued old tick cannot read the next session's analyser or publish a level. Allocation, connection and read failures release all meter resources and clear level/speaking presentation, while preserving the capture stream and peer. Keep the 512-sample analyser and 50 ms cadence unless audio validation justifies changing them.
## Audio and screen sharing
The compatibility voice path captures 48 kHz mono PCM using an AudioWorklet, with a ScriptProcessor fallback. The browser assembles 960-sample, 20 ms frames and sends 1,920-byte Int16 payloads over WebSocket. The gateway encodes them as Opus for TeamSpeak. Incoming Opus uses a three-byte header containing codec and client ID, then browser WebCodecs decoding and playback.
When enabled by the administrator, WebRTC provides a separate voice transport between the browser and gateway. The gateway uses `werift` and mixes incoming TeamSpeak speakers for WebRTC playback. Negotiation failures can fall back to the compatibility path. Keep microphone mute, per-member volume and playback behavior consistent across both transports.
Screen sharing has its own peer connections. The gateway coordinates stream membership and SDP/ICE signaling between browsers and supported TeamSpeak 6 clients. Screen media travels directly or through an externally configured TURN server; the WebSpeak gateway does not carry screen media.
Preserve bounded audio buffering and stale-playback recovery. Audio counters stay in memory and are exposed in session diagnostics. Do not add per-frame persistent logging to the voice path.
Remote playback owns each speaker's decoder, gain and source nodes as one resource set. Member departure, decoder failure and session teardown release that set; queued callbacks must not touch its replacement. Preserve the 80 ms playback window and three-frame decoder queue threshold unless audio validation justifies changing them.
Microphone recording tests own their recorder, timeout and object URL, while the capture layer owns the microphone stream. A normal stop may publish its final recording; replacement and session teardown discard late results and revoke the old URL. Stopping a test while connected must preserve room capture. Test cancellation and stale permission failures must not change a newer test's state.
Device and noise-suppression changes share one configuration operation. Persist only the last successful settings; stale failures cannot roll back a newer choice. Acquiring a replacement microphone must preserve the current WebRTC peer and compatibility PCM capture until the replacement is ready. Capture callbacks are invalidated when their graph stops, separately from permission-request generations. Closing settings also releases standalone device-preview capture when no recording was started.
Prepare microphone nodes and streams before replacing the live graph. A failed allocation or delayed worklet load must leave the old capture usable. Aborting preparation releases its candidate resources immediately; only activation enables PCM callbacks. Worklet module caches belong to their AudioContext. Device removal uses the normal input/output configuration transactions, including WebRTC restart and rollback on failed default-device selection. A committed graph becomes the fallback preference before subsequent device enumeration completes.
Serialize `setSinkId` on each audio context or media element, since an in-flight browser sink change cannot be cancelled. Bind subsequent work to the original endpoint and current operation; session teardown invalidates queued changes and device enumeration results. If one output endpoint rejects after another changed, attempt to restore the last committed output.
`src/server/opus-codec.ts` loads the native `@discordjs/opus` implementation for server deployments and `opusscript` for the Android bundle. Dispose codec and media resources at the end of their owning session.
## Configuration and persistence
Identity file reads belong to the current selection, text revision and dialog lifetime. New files (including invalid selections), manual edits, closing, entering the room, clearing local data and page disposal retire old results. Parsing owns its submitted draft; only a current result may replace the identity or notify. Preserve the 128 KiB limit, UTF-8/UTF-16 BOM decoding and existing busy-close behavior. The dialog disables submission while a selected file is being read and disables edits while parsing.
Startup identity restoration must not overwrite a newer import or remember preference. Exports belong to the identity and page that started them; coalesce pending clicks, discard late serialization and release download anchors, URLs and timers independently. Keep codec parsing in the existing identity service and persistence in the page/storage layer.
Admin requests belong to the login session and feature that started them. Invalidate pending work on authentication changes and page disposal; cancel feature work on management subroute exit. A late 401 must not expire a newer session, and late login or backup results must not navigate or download after disposal. Aborted work is not a user-facing failure. Failed logout preserves the authenticated draft; successful logout or session expiry resets private page state.
Settings responses merge against the submitted snapshot instead of replacing newer edits. Password and action, and relay token and action, are atomic draft groups. Clear acknowledged secret inputs, retain edits made during the request, merge relay nodes by ID, and do not restore obsolete probe metadata. Serialize skin mutations and prevent duplicate invite actions; cancelling browser work does not undo a server mutation already executed.
| Source | Purpose |
| --- | --- |
| SQLite `webspeak.db` | Admin credentials, target and access settings, relay nodes, invitations, audit records and visitor metadata |
| `master.key` beside the database | Encryption key for persisted secrets; retain it with database backups |
| `/admin` | Normal configuration and operational controls |
| Legacy `config.json` | One-time import of `tsHost`, `tsPort` and `tsServerPassword`; later changes do not replace database settings |
| `WEBSPEAK_DATA_DIR` | Persistent data directory; defaults to project `data/`, while Docker uses `/data` |
| `WEBSPEAK_SCREEN_SHARE_ICE_SERVERS` | Screen-sharing ICE configuration read at startup |
| `WEBSPEAK_TRUSTED_PROXIES` | Comma-separated IPs/CIDRs whose `X-Forwarded-For` may be believed; defaults to loopback so a same-host reverse proxy keeps working |
| Relay environment variables | Standalone relay mode; public gateway relay choices come from saved admin settings |
| Browser IndexedDB and localStorage | Local identities, preferences, server history and skin state |
The current SQLite schema version is defined in `src/persistence/database.ts`. Keep schema migrations separate from structural refactors. Legacy fields such as `voiceToken`, `tsApiKey`, `tsQueryPort`, `port` and `maxClients` do not configure the current gateway.
Optional TS administration lives in `src/admin/ts-admin-service.ts` and `/admin/ts-admin`. It uses the published SDK's typed commands through `QueryClient` over WebQuery, SSH or TCP, separately from guest voice and WebSpeak administration. Never require these credentials for a voice connection. WebQuery has no notifications: omit `events` entirely; `events: false` is also rejected by this SDK. Bind queued mutations to the reviewed configuration, recheck a member's live UID before acting, and never ban the shared gateway IP. Keep credentials encrypted with distinct purpose strings and return only presence flags. Management writes are not automatically retried; a failed refresh cannot imply an acknowledged write failed.
The gateway HTTP port is `3040`. Its admission ceiling is `100` sessions, defined in `src/constants.ts`; this is an application limit, not a TeamSpeak license allowance or a measured performance guarantee. Target server capacity and permissions still apply.
The server uses HTTPS when `certs/cert.pem` and `certs/key.pem` are supplied; otherwise it starts HTTP. It does not generate certificates. Use an appropriate secure browser origin for microphone and screen capture, typically HTTPS in public deployments. Feature support depends on the browser and selected transport; do not infer a universal minimum browser version from WebCodecs alone.
## Development and verification
Server deployments require Node.js 22.12 or newer. CI uses Node.js 22.22.2. Root and frontend dependencies are installed separately. The SDK is installed from the npm registry; only native Opus needs a rebuild after installing with scripts disabled:
```sh
npm ci --ignore-scripts --no-audit --no-fund
npm rebuild @discordjs/opus --foreground-scripts --no-audit --no-fund
npm --prefix web ci --no-audit --no-fund
npm run verify
```
- Each browser user = one independent TS3 virtual client via `@honeybbq/teamspeak-client`
- Frontend captures PCM via `ScriptProcessorNode`, sends as Int16 binary over WebSocket
- Server encodes PCM → Opus using `@discordjs/opus` (CJS, loaded via `createRequire`)
- Server sends Opus to TS via `client.sendVoice(data, codec=4)`
- Incoming TS voice → Opus frames → binary WebSocket → browser `AudioDecoder` → playback
- Channel/member list fetched via TS6 WebQuery HTTP API (port 10080, requires API key)
- WebSocket text frames = JSON commands, binary frames = PCM audio / Opus relay
`npm run verify` runs unit tests, the backend build and `npm run web:build`. The latter delegates to the frontend build, including `vue-tsc --noEmit`. Use `npm run dev` and `npm run web:dev` for development, or `npm start` after building both applications.
## Project Structure
Headless Vue tests use Vite middleware mode with both HMR and the WebSocket listener disabled (`hmr: false`, `ws: false`). Disabling HMR alone still reserves Vite's default socket port and causes parallel test processes to conflict.
```
web/ # Vue 3 + Vite frontend (SPA)
src/composables/useVoiceWebSocket.ts # Mic capture, VOX/PTT, playback, WS client
src/views/WebClient.vue # Connect form + channel/member tree
src/
index.ts # Entry point, config loading, server startup
config.ts # AppConfig interface + load/save
logger.ts # Pino wrapper
server/
server.ts # Express + HTTPS + WS setup
voice-bridge.ts # /ws/voice endpoint, PCM→Opus encoding, WebQuery API
ts-client.ts # TS3Client wrapper around @honeybbq/teamspeak-client
```
CI verifies pushes to `dev` and `master`, pull requests and manual runs. Docker publication on `master` or release tags, and release packaging on tags or manual runs, call the same verification workflow before publishing or packaging. Verification includes the application checks and a Docker HTTP health smoke test; that smoke test does not prove voice or screen-sharing functionality.
## Key Technical Details
Tests requiring a real TeamSpeak server, browser media devices or Android hardware must document their environment and outcome separately. Never substitute a mock codec or an HTTP health response for a successful audio test.
### Audio Pipeline
1. Browser mic → `getUserMedia` (48kHz mono) → `ScriptProcessorNode` (1024 samples)
2. Float32 → Int16 conversion → PTT/VOX gate → WebSocket binary send
3. Server accumulates PCM → every 1920 bytes (960 samples, 20ms) → `OpusEncoder.encode()` → `tsClient.sendVoice(opus, 4)`
4. Incoming: TS → `voiceData` event → 3-byte header `[codec][clientId BE]` → WS binary → browser `AudioDecoder` → playback
## Android preview
### CJS Interop
`@discordjs/opus` is CommonJS, loaded via:
```ts
import { createRequire } from "node:module";
const require = createRequire(import.meta.url);
const { OpusEncoder } = require("@discordjs/opus");
```
The Android app starts an embedded Node.js gateway on `127.0.0.1:3040` and opens it in the WebView. This preview disables gateway WebRTC voice and the admin console, while reusing the compatibility voice path. Its dependencies and runtime differ from server deployments.
### WebSocket Message Routing
- Text frames → JSON commands (`listChannels`, `switchChannel`)
- Binary frames → PCM audio (browser→server) or Opus frames (server→browser)
- JSON detection: `typeof data === "string"` first, then fallback `data[0] === 0x7b` with try/catch
See `mobile/README.md` for build steps and recorded limitations. The embedded Node.js version, SDK compatibility, real-device connections, background audio and native screen sharing require their own validation. Do not present these capabilities as production-ready based on desktop tests.
### Event Handlers
Must be registered BEFORE `tsClient.connect()` because `clientEnter`/`clientLeave` fire during handshake.
Platform startup owns its message listener, polling interval and deadline, including slow listener registration. Release them on success, failure, timeout and page exit. The retry button repeats the readiness handshake; it does not restart the embedded Node.js runtime.
### Channel List
Uses TS6 WebQuery HTTP API (`http://tsHost:tsQueryPort/1/channellist`) with `x-api-key` header. Falls back empty if `tsApiKey` not configured. Regular TS3 voice clients lack permission for `listChannels`/`listClients`.
## Repository maintenance
### Config (config.json)
```json
{
"port": 3040, "tsHost": "127.0.0.1", "tsPort": 9987,
"tsQueryPort": 10080, "tsServerProtocol": "ts6",
"tsApiKey": "", "voiceToken": "change-me", "maxClients": 10
}
```
Routes load their page modules on demand. Document-level page styles must be gated by `html[data-ws-route]` because loaded CSS remains after navigation. The admin stylesheet is independent of public skins. Component extraction must retain `data-ws-part` hooks and account for Vue scoped styles across component boundaries.
## Build & Deploy
```bash
npm install && cd web && npm install && npx vite build && cd .. && npx tsc
node dist/index.js
```
The identity dialog retains page-owned CSS with narrowly targeted `:deep` selectors so the existing declaration order and specificity remain intact. Shared button rules target its dedicated classes across the component boundary. Its close button is positioned within the modal. Public skin-contract tests include Vue files recursively under `components/web-client`; keep new public parts documented.
## Git
- Remote: `https://github.com/EchoSixHIYA/web-client-for-TeamSpeak`
- `webspeak-update.tar.gz` is in .gitignore (deployment artifact)
- No secrets in source; config.json is gitignored
The public join form uses explicit named field models and emits page actions. The chat panel receives a presentation subset of the single page-owned chat controller; keep its list ref bound to the rendered scroller so tab changes and new messages retain automatic scrolling. Form grid columns must allow shrinking, and narrow identity/relay controls must wrap without clipping translated text.
## Known Limitations
- Browser must be Chrome/Edge 94+ (WebCodecs AudioDecoder)
- HTTPS required (self-signed cert OK, generated in `certs/`)
- Max 32 concurrent users (TS3 license limit)
- `tsApiKey` required for channel list; voice works without it
The member panel and actions menu also share one page-owned member controller. The panel exposes an audio-dock slot; menu placement uses measured viewport bounds, converts through the page CSS zoom, and releases its resize observer/listener on unmount. Only desktop may open the move submenu on hover: mobile bottom-anchored menus change position when expanded and must open on click to avoid moving a member accidentally. Constrain short-window menus and allow scrolling.
Voice member cards receive the current channel projection, speaking/avatar helpers and a narrow sharing interface. Keep the sharing refs stable; member menus and stop-sharing actions return to the page through events. Empty, self, speaking, starting, sharing and viewing states must retain their skin hooks and mobile behavior.
Voice diagnostics and screen-sharing presentation also reuse page-owned controllers. Bind the player and video with explicit element callbacks. Rebind an existing stream when its video element changes, clear the previous element, and never stop the media owner's tracks during presentation cleanup. Fullscreen requires a non-null owned player; removing it exits only its own fullscreen. Known screen owner IDs take precedence over nickname fallback, including duplicate nicknames. Sharing settings use the common dialog focus handling.
The audio dock and whisper strip share the page-owned audio controller. Push-to-talk belongs to one primary pointer or one Space/Enter press; unrelated releases and key repeats must not change it. Failed pointer capture must not enable whispering. Clear ownership before releasing capture, and stop on blur, hidden controls/pages and disposal. The whisper component owns and releases its window/document listeners; keep media state in the voice layer.
Audio settings and password dialogs retain one page-owned media/connection state. Dialog focus supports initial focus, Tab cycling, Escape and return to the opener, with a connect-button fallback after pending connections disable that opener. Settings error feedback belongs to the current opening and latest request; closing synchronously stops recording tests, and scope disposal retires pending feedback and stops tests too. A non-password channel error must release the password dialog's pending state and preserve its draft for retry; reject duplicate submissions while pending.
Admin presentation components receive stable feature controllers; do not instantiate duplicate controllers in children. The welcome-language model remains page-owned and the skin file input belongs to its presentation component. Feature CSS crosses these boundaries with `:deep`, while shell and language-control selectors retain their existing scope. On narrow screens the brand and logout occupy the first row and all four navigation links share a separate row with at least 44 px high targets.
Keep each repair batch tied to its current plan item. Combine related fixes before running the full verification command; use focused checks during diagnosis and repeat the full suite only when subsequent changes or failures warrant it.
Keep template/CSS formatting separate from behavior changes. Preserve inline whitespace text nodes when wrapping Vue tags; compare compiled render output when needed. CSS formatting must retain selector meaning, values and declaration/rule order. Layout assertions should tolerate formatting whitespace while still checking the intended rules and values.
Public skin activation is last-choice-owned across both public pages. Retire previous runtime work before preparing a replacement, and reject results after page disposal, a newer choice or local-data reset. Check ownership before modifying document styles, selected content, asset URLs or stored preferences. An already aborted caller must not cancel a newer page's activation. Release compiled candidate URLs on failed installation.
Skin initialization has an 8-second total deadline covering preference reads, directory fetch and body, package loading and activation. Network stages also have bounded standalone operations. A timeout reveals a usable built-in palette and retires late work; retain the explicit skin choice for a later retry. Normal initialization still respects the enabled instance default unless the visitor made a deliberate choice. Home and demo use the same controller; do not restore duplicate unguarded refresh paths.
Skin cache writes and preference persistence accept the owning AbortSignal, including while waiting for IndexedDB to open and during its write transaction. Report storage success at transaction completion. Merge preferences within one transaction so concurrent unrelated settings are preserved. Cancellation of optional persistence must never block page use.
Validate admin responses before applying them to page state. Network and protocol failures must preserve unsaved input; a failed logout must not be presented as a successful logout. Keep secret keep/replace/remove actions intact and do not persist credentials in UI error messages or diagnostic logs.
The repository remote is `https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak`. Preserve existing local work and keep private configuration, runtime data, local deployment archives, and machine-specific notes out of source commits. Preserve documented skin hooks and browser persistence formats during component refactors.
+44
View File
@@ -0,0 +1,44 @@
FROM node:22-bookworm-slim AS build
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates python3 make g++ \
&& rm -rf /var/lib/apt/lists/*
COPY package.json package-lock.json ./
COPY web/package.json web/package-lock.json ./web/
RUN npm ci --ignore-scripts --no-audit --no-fund
RUN npm rebuild @discordjs/opus --foreground-scripts --no-audit --no-fund
RUN npm --prefix web ci
COPY . .
RUN npm run web:build \
&& npm run build \
&& npm prune --omit=dev \
&& rm -rf web/node_modules
FROM node:22-bookworm-slim AS runtime
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates libstdc++6 iputils-ping \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /data \
&& chown node:node /data
ENV NODE_ENV=production
ENV WEBSPEAK_DATA_DIR=/data
COPY --from=build --chown=node:node /app/package.json /app/package-lock.json ./
COPY --from=build --chown=node:node /app/node_modules ./node_modules
COPY --from=build --chown=node:node /app/dist ./dist
COPY --from=build --chown=node:node /app/web/dist ./web/dist
COPY --from=build --chown=node:node /app/scripts/docker-healthcheck.mjs ./scripts/docker-healthcheck.mjs
USER node
VOLUME ["/data"]
EXPOSE 3040/tcp 3041/tcp 3042/tcp 39087/udp 40000-40099/udp
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD ["node", "scripts/docker-healthcheck.mjs"]
CMD ["node", "dist/index.js"]
+99 -308
View File
@@ -1,354 +1,145 @@
# WebSpeak
<a id="readme-top"></a>
TeamSpeak 浏览器客户端:在服务器上运行 Node.js 服务,用户无需安装 TeamSpeak 客户端,即可通过浏览器加入语音频道。
<div align="center">
<a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak"><img src="./docs/assets/webspeak-banner.png" alt="WebSpeak — TeamSpeak in your browser" width="100%" /></a>
<h1>WebSpeak</h1>
<p><strong>打开浏览器,就能加入你的 TeamSpeak。</strong></p>
<p>A self-hosted browser voice client for TeamSpeak 3 &amp; TeamSpeak 6.</p>
<p>
<a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest"><img src="https://img.shields.io/github/v/release/EchoSixHIYA/WebSpeak-client-for-TeamSpeak?sort=semver&amp;display_name=tag&amp;style=flat-square&amp;color=0f766e" alt="Latest release" /></a>
<a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/actions/workflows/ci.yml"><img src="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/actions/workflows/ci.yml/badge.svg?branch=master" alt="CI — master" /></a>
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0--only-0f766e?style=flat-square" alt="AGPL-3.0-only" /></a>
<a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/stargazers"><img src="https://img.shields.io/github/stars/EchoSixHIYA/WebSpeak-client-for-TeamSpeak?style=flat-square&amp;logo=github&amp;color=0f766e" alt="GitHub stars" /></a>
</p>
<p>
<a href="./docs/README.zh-CN.md">简体中文</a> · <a href="./docs/README.en.md">English</a> · <a href="./docs/README.de.md">Deutsch</a> · <a href="./docs/README.ru.md">Русский</a> · <a href="./docs/README.ja.md">日本語</a>
</p>
<p>
<a href="#live-demo">在线演示 · Live demo</a> · <a href="#quick-start">快速部署 · Quick start</a> · <a href="#documentation">文档 · Docs</a> · <a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/issues">反馈 · Issues</a>
</p>
</div>
[English](#english) · [中文](#中文) · [AGPL-3.0 License](LICENSE)
当前版本 / Current version: **[v0.3.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.3.0)** · [更新内容 / Release notes](./docs/README.zh-CN.md#latest-release-notes)
## English
## 关于 WebSpeak · Overview
WebSpeak is a self-hosted browser client and gateway for TeamSpeak 3 and TeamSpeak 6. Each browser session receives an independent TeamSpeak client that maintains its own visible channel/member directory and relays voice through WebSocket.
WebSpeak 将 TeamSpeak 3 / TeamSpeak 6 带到浏览器:无需安装桌面客户端,即可加入语音频道、发送消息和分享屏幕。你可以自行部署网关,并通过网页后台管理服务器、访问策略、皮肤和运行数据。
### Highlights
Join voice channels, chat and share your screen from a browser. Deploy your own gateway and keep control of your TeamSpeak targets, access policy, skins and data through the web administration console.
- Low-latency PCM/Opus voice relay
- VOX open microphone and Space-key push-to-talk modes
- Browser microphone enumeration and device switching
- Channel switching with a complete channel/member tree, including empty channels
- Per-member playback volume controls
- Speaking members are highlighted with a live green avatar border
- Text chat, invite-link sharing, and persistent Chinese/English UI switching
- No WebQuery/SSH Query dependency and no invite token
- Editable TeamSpeak server address and voice port on the web join screen
- No browser plugin or desktop TeamSpeak client required
### Requirements
- Linux server recommended; Windows is also supported
- Node.js 22 or newer
- A reachable TeamSpeak 3 or TeamSpeak 6 server
- A recent Chrome or Edge browser
- HTTPS in production: microphone access and WebCodecs require a secure context
### How it works
```text
Browser WebSpeak TeamSpeak
┌────────────────────┐ ┌──────────────────────┐ ┌──────────┐
│ Microphone → PCM │ ──────▶ │ Per-user voice client│ ──────▶ │ │
│ AudioDecoder │ ◀────── │ PCM ↔ Opus bridge │ ◀────── │ Server │
│ Vue web client │ ◀ JSON │ Live directory │ ◀────── │ │
└────────────────────┘ │ welcome snapshot + │ └──────────┘
│ live events │
└──────────────────────┘
```
### Quick start
#### 1. Install dependencies
```bash
# Native build tools are required by @discordjs/opus.
sudo apt-get update
sudo apt-get install -y build-essential python3
npm install
npm --prefix web install
```
On Windows, install Visual Studio Build Tools with **Desktop development with C++** before running `npm install`.
`npm install` runs the SDK patch automatically. It adds a `directorySnapshot` event to the installed protocol package so the gateway can use the same welcome data as a native client.
#### 2. Build
```bash
npm --prefix web run build
npm run build
```
The build output is written to `web/dist/` and `dist/`.
#### 3. Configure `config.json`
Copy `config.example.json` to `config.json` in the project root, then edit the values. Keep `config.json` private because it may contain TeamSpeak credentials.
```json
{
"port": 3040,
"tsHost": "127.0.0.1",
"tsPort": 9987,
"tsServerPassword": "",
"tsServerProtocol": "ts6",
"maxClients": 20,
"trustProxy": false
}
```
| Field | Description |
| 能力 · Capability | 说明 · Highlights |
| --- | --- |
| `port` | Local HTTP/HTTPS port for WebSpeak. |
| `tsHost` | TeamSpeak server address. Use `127.0.0.1` when it runs on the same host. |
| `tsPort` | TeamSpeak voice port, commonly `9987`. |
| `tsServerPassword` | TeamSpeak server password, if required. |
| `tsServerProtocol` | `"ts3"` or `"ts6"`; omit it to use protocol detection. |
| `maxClients` | Maximum number of simultaneous browser sessions. |
| `trustProxy` | Set to `true` only when a trusted reverse proxy is in front of WebSpeak. |
| 🎙️ 语音 · Voice | Opus、可选 WebRTC、WebSocket 回退、降噪与成员音量 / Opus, optional WebRTC, fallback, noise suppression and per-member volume |
| 💬 频道与聊天 · Channels & chat | 实时频道树、成员状态、私聊与本地历史 / Live channel tree, member state, private chat and local history |
| 🖥️ 屏幕共享 · Screen sharing | 浏览器之间及与受支持的 TS6 客户端互通 / Between browsers and supported native TS6 clients |
| 🎨 皮肤 · Skins | `.wskin` 外观、布局和小组件,支持 GitHub 分发 / Portable appearance, layouts and widgets, distributed through GitHub |
| 🛠️ 管理 · Administration | 目标、邀请、中继、备份和可选 TS 管理 / Targets, invites, relays, backups and optional TS management |
| 🌍 自托管 · Self-hosting | 五种语言、响应式界面、多架构部署 / Five languages, responsive layouts and multi-architecture deployment |
The join page includes a **Setup guide** button. It generates a copyable `config.json` preview from the server address, voice port, protocol, WebSpeak port, and optional password entered in the page. A browser cannot write files on the server, so save the copied JSON as `config.json` in the project root and restart WebSpeak after changing it.
<a id="live-demo"></a>
WebSpeak uses each user's regular TeamSpeak client connection for both voice and directory data. TeamSpeak sends the initial channel/member snapshot during the normal client welcome sequence; WebSpeak then subscribes that regular client to the complete channel tree, just as a native client does, and applies channel/member notifications immediately afterward. A member moving out of the current channel is retained and reassigned to the target channel instead of being mistaken for a server disconnect. WebSpeak does not start a maintenance client and does not call the permission-restricted `channellist` or `clientlist` commands. The visible result is the same view available to that TeamSpeak identity.
## 在线演示 · Live demo
The connected layout keeps the member/channel tree on the left. During the first connection, WebSpeak uses the current channel ID from TeamSpeak's welcome sequence to place the web client in the actual default channel instead of a placeholder group. The small speaking indicator is status-only: it is not a mute control. The avatar border turns green while a voice packet is active, then fades after the stream becomes quiet.
#### 4. Enable HTTPS
WebSpeak automatically serves HTTPS when `certs/cert.pem` and `certs/key.pem` exist:
```bash
mkdir -p certs
openssl req -x509 -newkey rsa:2048 \
-keyout certs/key.pem \
-out certs/cert.pem \
-days 365 -nodes \
-subj "/CN=your-domain.example"
```
For public use, prefer a trusted certificate from Let's Encrypt or terminate TLS at Nginx. Do not commit private keys to Git.
#### 5. Start WebSpeak
```bash
node dist/index.js
```
Open:
```text
https://your-domain.example:3040/
```
Enter the TeamSpeak server address, voice port, and nickname on the page. The browser will request microphone permission. Open **Audio settings** to select a specific microphone, change input/output volume, or run the real microphone-level test.
The connected page keeps its controls in the header so the chat viewport remains unobstructed. Microphone mode selection (free microphone or push-to-talk) is available in **Audio settings**.
### Production deployment
Example systemd unit:
```ini
[Unit]
Description=WebSpeak TeamSpeak browser gateway
After=network.target
[Service]
Type=simple
User=teamspeak
WorkingDirectory=/opt/webspeak
ExecStart=/usr/bin/node /opt/webspeak/dist/index.js
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
```
Enable it with:
```bash
sudo systemctl daemon-reload
sudo systemctl enable --now webspeak.service
sudo systemctl status webspeak.service
```
If Nginx terminates HTTPS, leave `certs/` absent so WebSpeak listens over local HTTP, then proxy both normal traffic and WebSocket upgrades:
```nginx
server {
listen 443 ssl;
server_name ts.example.com;
ssl_certificate /etc/letsencrypt/live/ts.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ts.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3040;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```
Set `trustProxy` to `true` only after verifying that the proxy is trusted and cannot be bypassed.
### Troubleshooting
| Symptom | Check |
| 节点 · Region | 地址 · Address |
| --- | --- |
| Microphone is unavailable | Use HTTPS, grant the browser microphone permission, and check the selected device in Audio settings. |
| Only the default microphone appears | Reload after granting permission; browser device labels are hidden until permission is granted. Disconnect/reconnect if the device was plugged in later. |
| Channel/member list is empty | Check the TeamSpeak address/voice port and `tsServerProtocol`. The directory is populated from the normal client welcome sequence. |
| The channel directory is still loading | Keep the page connected briefly while the welcome snapshot arrives. Later member and channel changes are pushed to the page automatically in real time. |
| The current user is missing | Keep the connection open until the TeamSpeak welcome snapshot arrives. WebSpeak uses the current channel ID to place the user in the default channel, then updates the tree from realtime member notifications. |
| Page loads without audio | Use a recent Chrome/Edge build, verify HTTPS, and check browser output volume. |
| `Cannot find module '@discordjs/opus'` | Install the native build prerequisites and run `npm install` again. |
| `EADDRINUSE` | Change `port` or stop the process already listening on that port. |
| 上海 · Shanghai | [shanghai.webspeak.online](https://shanghai.webspeak.online) |
| 香港 · Hong Kong | [webspeak.online](https://webspeak.online) |
### Project layout
![WebSpeak 语音工作区 · Voice workspace](./docs/screenshots/webspeak-zh.png)
```text
src/
server/voice-bridge.ts WebSocket bridge and per-user voice clients
server/ts-client.ts TeamSpeak protocol adapter and live directory adapter
config.example.json Safe starting configuration; copy to config.json
scripts/
patch-teamspeak-sdk.mjs Preserve TeamSpeak welcome directory data
web/
src/views/WebClient.vue Browser UI and bilingual presentation
src/composables/useVoiceWebSocket.ts
Voice, chat, device and channel state
```
<details>
<summary>更多界面与语言 · More screenshots & languages</summary>
### Development
- [简体中文](./docs/README.zh-CN.md#screenshots) · [English](./docs/README.en.md#screenshots) · [Deutsch](./docs/README.de.md#screenshots) · [Русский](./docs/README.ru.md#screenshots) · [日本語](./docs/README.ja.md#screenshots)
- 日间、夜间、ILLUSIA、KAAK 与社区皮肤 / Day, Night, ILLUSIA, KAAK and community skins
</details>
<a id="quick-start"></a>
## 快速部署 · Quick start
在 Linux Docker 主机上运行 / On a Linux Docker host:
```bash
# Frontend hot reload
npm run web:dev
# Type-check and production-build frontend
npm --prefix web run build
# Type-check backend
npm run build
git clone --depth 1 https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
docker compose pull
docker compose up -d
```
Contributions and issue reports are welcome. Please do not include `config.json`, certificates, private keys, or server logs in issues or pull requests.
1. 打开 `http://127.0.0.1:3040/admin`,使用 `admin` / `admin` 登录并设置至少 12 位新密码。Open the console, sign in and replace the default password.
2. 配置 TeamSpeak 目标和访问模式;公网使用 HTTPS。Set the TeamSpeak target and access mode; use HTTPS for public access.
3. 启用 WebRTC 时放行配置的 UDP 范围,默认 `40000–40099`。Allow the configured UDP range when enabling WebRTC.
### License
数据保存在 `webspeak-data` volume,升级时保留它。以上 Compose 使用主机网络;Windows 服务端可选择[发布包](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest)。完整说明:[中文部署指南](./docs/README.zh-CN.md#deployment) · [English deployment guide](./docs/README.en.md#deployment)。
WebSpeak is released under the [GNU Affero General Public License v3.0 only](LICENSE) (`AGPL-3.0-only`). If you run a modified version as a network service, you must offer its users the corresponding source code as required by the license.
Data persists in the `webspeak-data` volume. The Compose file uses host networking. Windows x64 and Linux x64/ARM64 release packages include the runtime; Docker images support amd64/arm64.
## 中文
<a id="documentation"></a>
WebSpeak 是一个自托管的 TeamSpeak 浏览器客户端。服务运行在服务器上,用户无需安装 TeamSpeak 客户端,打开网页即可加入语音频道。每个网页用户拥有独立的 TeamSpeak 连接,并使用自己的可见频道和成员信息。
## 文档 · Documentation
### 主要功能
- [简体中文](./docs/README.zh-CN.md)
- [English](./docs/README.en.md)
- [Deutsch](./docs/README.de.md)
- [Русский](./docs/README.ru.md)
- [日本語](./docs/README.ja.md)
- [皮肤开发指南 / Skin development guide](./docs/SKIN_DEVELOPMENT.md)
- [皮肤开发 Agent Skill / Skin Development Agent Skill](./.agents/skills/webspeak-skin-development/SKILL.md)
- 低延迟 PCM/Opus 语音转发
- 自由麦(VOX)与空格键按键说话
- 枚举并切换浏览器真实麦克风设备
- 频道切换与完整频道/成员树,空频道也会显示
- 为每个成员单独调整播放音量
- 正在发言的成员头像实时显示绿色边框
- 文字聊天、邀请链接分享、中英文界面切换
- 不依赖 WebQuery/SSH Query,不使用邀请 token
- 网页端直接设置 TeamSpeak 地址和语音端口
- 不需要浏览器插件或桌面版 TeamSpeak 客户端
## 扩展生态 · Extensions
### 环境要求
| 类型 · Type | 入口 · Resources |
| --- | --- |
| 皮肤包 · Skin packages | [皮肤索引 · Catalog](https://github.com/Huddle-Up-Forge/webspeak-skins) · [Discord Voice](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice) |
| 功能插件 · Functional plugins | [应用目录与开发起点 · Catalog & application starter](https://github.com/Huddle-Up-Forge/webspeak-plugin) · [开发指南 · Guide](./docs/PLUGIN_DEVELOPMENT.md) · [Agent Skill](./.agents/skills/webspeak-plugin-development/SKILL.md) |
- 推荐 Linux 服务器,也支持 Windows
- Node.js 22 或更高版本
- 可访问的 TeamSpeak 3 或 TeamSpeak 6 服务器
- 较新的 Chrome 或 Edge 浏览器
- 生产环境使用 HTTPS;浏览器麦克风和 WebCodecs 都要求安全上下文
皮肤包负责界面、布局及其附属小组件;功能插件使用标准浏览器环境和可选 Node 后端,自行实现业务功能。功能插件 API v2 已包含在 v0.3.0 中,提供独立于皮肤的悬浮应用入口。
### 快速开始
Skins own appearance, layout and attached widgets. Functional plugin API v2 is included in v0.3.0 with a skin-independent floating application workspace.
```bash
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y build-essential python3
## 社区 · Community
# 安装服务端和前端依赖
npm install
npm --prefix web install
[GitHub Issues](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/issues) · [QQ 群 · QQ group `869500475`](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=yhumUMDD9PmyYFWdXWUb_x7hM5trFQY8&authKey=Pw3HBGT7GwMinTQnuFGfnpf0aRSzXOJKcAiujVP1%2BXMpjheAKrncTRivicBJxpjV&noverify=0&group_code=869500475) · [Telegram](https://t.me/+8qShpTcuN9A3MWY9)
# 构建前端和后端
npm --prefix web run build
npm run build
```
<details>
<summary>QQ群二维码 · QQ group QR code</summary>
将项目根目录的 `config.example.json` 复制为 `config.json`,再按实际环境修改。`config.json` 可能包含服务器密码,请勿提交到 Git:
<p align="center"><a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=yhumUMDD9PmyYFWdXWUb_x7hM5trFQY8&authKey=Pw3HBGT7GwMinTQnuFGfnpf0aRSzXOJKcAiujVP1%2BXMpjheAKrncTRivicBJxpjV&noverify=0&group_code=869500475"><img src="./web/public/qq-group-qr.jpg" alt="WebSpeak QQ group 869500475" width="260" /></a></p>
```json
{
"port": 3040,
"tsHost": "127.0.0.1",
"tsPort": 9987,
"tsServerPassword": "",
"tsServerProtocol": "ts6",
"maxClients": 20,
"trustProxy": false
}
```
</details>
关键配置:
### 相关项目 · Related projects
- `tsHost`:TeamSpeak 地址;同机部署使用 `127.0.0.1`。
- `tsPort`:语音端口,通常为 `9987`。
- `tsServerProtocol`:填写 `"ts3"` 或 `"ts6"`,也可以省略并使用自动检测。
加入页面提供“配置引导”按钮,可以根据页面中填写的服务器地址、语音端口、协议、WebSpeak 端口和可选密码生成可复制的 `config.json` 预览。浏览器不能直接写入服务器文件,请将复制的内容保存到项目根目录的 `config.json`,再重启 WebSpeak。
WebSpeak 使用每个网页用户自己的普通 TeamSpeak 客户端连接获取语音和目录数据,不连接 WebQuery/SSH Query,也不启动维护客户端。TeamSpeak 会在普通客户端登录握手阶段下发频道和成员快照;随后 WebSpeak 会像原生客户端一样订阅完整频道树,并实时应用频道/成员通知。成员切换到其他频道时会被移动到目标频道,不再被误判为退出服务器。不会主动调用受权限限制的 `channellist` 或 `clientlist` 命令,显示内容与该 TeamSpeak 身份实际可见的内容一致。
[NeteaseTSBot](https://github.com/yichen11818/NeteaseTSBot) — 面向 TeamSpeak 3/6 的音乐机器人,支持网易云音乐、QQ 音乐、Bilibili 和 Web 控制台。A TeamSpeak music bot with Netease Cloud Music, QQ Music, Bilibili and a web console.
进入后的成员/频道树位于页面左侧。首次进入时,WebSpeak 会使用 TeamSpeak 欢迎握手中返回的当前频道 ID,把自己放入实际所在的默认频道;不会把已进入默认频道的用户显示到错误的占位分组。“正在语音中”旁边不再使用没有功能的禁麦图标;它只是状态提示,真正发言时头像边框会实时变绿,停止发声后自动恢复。
## 贡献者 · Contributors
配置好证书后启动:
感谢协议 SDK 作者、代码与文档贡献者,以及独立皮肤的原始作者。Thanks to the SDK author, code and documentation contributors, and original skin authors.
```bash
node dist/index.js
```
<details>
<summary>查看贡献说明 · View contribution credits</summary>
访问:
- [HoneyBBQ](https://github.com/HoneyBBQ) — 上游 [teamspeak-js(`@honeybbq/teamspeak`)](https://github.com/HoneyBBQ/teamspeak-js) SDK 的作者,为 WebSpeak 提供底层 TeamSpeak 协议客户端能力。
- [ph1gros](https://github.com/ph1gros) — 在 [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) 中报告并提供公开目标 IPv6 校验、管理员认证与会话、代理限流和 PCM 上行边界的安全审查、补丁及回归测试;相关问题由项目在 `dev` 分支重新实现并修复。Security findings, proposed fixes and regression tests; reimplemented on `dev`.
- [LainHE](https://github.com/LainHE) — [已合并 PR #2、#8、#28、#31–#35、#37、#38、#40](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ALainHE),涉及浏览器报错翻译、缩放与首页布局、屏幕共享码率与观看者头像、中继目标校验与异常重连、可信代理校验、连接失败传递、音频故障报告及 WebRTC 失败时的资源清理。
- [TimmySheep](https://github.com/TimmySheep) — [已合并 PR #13、#15–#24](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ATimmySheep),涉及 TS6 既有屏幕共享发现、屏幕比例、移动端语音/常亮/皮肤菜单、身份频道选项、PWA/主题、聊天历史、成员音频状态和麦克风权限等改进。
- [yichen11818](https://github.com/yichen11818) — [PR #25](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/25) 支持 TeamSpeak 注册昵称连接并保留昵称目标;[PR #51](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/51) 改进 KAAK 首次连接后的工作区保留与重连;[PR #27](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/27) 和 [PR #52](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/52) 提供 Discord 皮肤的原始设计与实现(提交署名 **yumi**),后由 WebSpeak 项目移植为[独立分发的 `.wskin` 皮肤](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice)。
```text
https://你的域名或IP:3040/
```
</details>
在页面中填写 TeamSpeak 地址、语音端口和昵称。首次使用时允许浏览器访问麦克风。进入语音空间后,打开“音频设置”即可选择具体麦克风、调整输入/输出音量并进行真实麦克风电平测试。
## 许可证 · License
连接后的控制项统一放在顶部,不再遮挡聊天区域;“自由麦”和“按键说话”可以在“音频设置”中切换。
WebSpeak 使用 [AGPL-3.0-only](./LICENSE) 发布。第三方依赖的许可与归属见各自项目。
### HTTPS 与反向代理
WebSpeak is distributed under [AGPL-3.0-only](./LICENSE). Third-party dependencies retain their respective licenses and attribution.
如果项目根目录存在 `certs/cert.pem` 和 `certs/key.pem`,WebSpeak 会直接提供 HTTPS。公网部署建议使用 Let's Encrypt,或让 Nginx 终止 HTTPS 后反向代理到 `http://127.0.0.1:3040`,并转发 WebSocket 升级请求。使用可信反向代理时,将 `trustProxy` 设置为 `true`。
<details>
<summary>Star History</summary>
### 常见问题
<a href="https://star-history.com/#EchoSixHIYA/WebSpeak-client-for-TeamSpeak&amp;Date"><img src="https://api.star-history.com/svg?repos=EchoSixHIYA/WebSpeak-client-for-TeamSpeak&amp;type=Date" alt="WebSpeak star history" width="100%" /></a>
- **无法使用麦克风**:确认使用 HTTPS、已经允许浏览器访问麦克风,并在“音频设置”中检查设备。
- **只能看到默认麦克风**:授权前浏览器会隐藏设备名称;授权后刷新页面,或重新连接一次。
- **频道/成员列表为空**:检查网页中的 TeamSpeak 地址、语音端口和协议设置;目录来自普通客户端登录握手数据。
- **频道/成员目录仍在加载**:保持页面连接,等待登录握手快照到达;之后成员和频道变化会自动实时推送到页面。
- **首次进入看不到自己**:保持连接直到 TeamSpeak 欢迎握手完成;WebSpeak 会根据当前频道 ID 将自己归入默认频道,并在频道成员变化时实时更新。
- **没有声音**:使用较新的 Chrome/Edge,通过 HTTPS 访问,并检查浏览器输出音量。
- **原生 Opus 模块安装失败**:安装 `build-essential python3` 后重新执行 `npm install`。
</details>
### 开发命令
```bash
# 前端热更新
npm run web:dev
# 前端类型检查并构建
npm --prefix web run build
# 后端 TypeScript 构建
npm run build
```
请不要在 Issue 或 Pull Request 中提交 `config.json`、API 密钥、证书、私钥或服务器日志。
### 许可证
本项目仅按 [GNU Affero General Public License v3.0](LICENSE)(`AGPL-3.0-only`)授权。如果你将修改版作为网络服务运行,必须按照许可证要求向服务用户提供对应源代码。
如果 WebSpeak 对你有帮助,欢迎在 GitHub 点一个 Star。维护者:[EchoSixHIYA](https://github.com/EchoSixHIYA)。
### 加入交流群
扫描下方二维码加入群聊(群号:`869500475`):
![WebSpeak 群聊二维码](group-chat.png)
<p align="right"><a href="#readme-top">返回顶部 · Back to top ↑</a></p>
+1 -5
View File
@@ -1,9 +1,5 @@
{
"port": 3040,
"tsHost": "127.0.0.1",
"tsPort": 9987,
"tsServerPassword": "",
"tsServerProtocol": "ts6",
"maxClients": 20,
"trustProxy": false
"tsServerPassword": ""
}
+13
View File
@@ -0,0 +1,13 @@
services:
webspeak:
image: ${WEBSPEAK_IMAGE:-ghcr.io/echosixhiya/webspeak:latest}
pull_policy: missing
restart: unless-stopped
# WebSpeak needs to reach a TeamSpeak server running on the same host.
# Host networking also exposes the configured WebRTC UDP range directly.
network_mode: host
volumes:
- webspeak-data:/data
volumes:
webspeak-data:
+152
View File
@@ -0,0 +1,152 @@
# WebSpeak 功能应用开发 / Functional application development
WebSpeak **v0.3.0** 使用应用运行时 **API v2**。`.wplugin` 与 `.wskin` 完全独立;旧 API v1、共享房间协议及其两个示例已移除,不兼容旧包。
插件是作者自己的应用:标准 HTML/CSS/JavaScript 前端,加上可选的 Node 后端。可以使用框架、浏览器原生 API、自己的 HTTP/WebSocket 协议、网络客户端和数据模型。宿主不提供按音乐、文件、视频等功能划分的业务 API,也不提供 `room.read/write` 或下载权限表。浏览器原有的安全上下文、用户手势、权限许可、跨域及网络可达性要求仍然适用。
## 管理与部署
管理员在 `/admin/plugins` 从 GitHub 安装或导入包,审核代码和依赖,配置作用域,勾选信任后启用。每次安装、更新均撤销信任并禁用,需要重新审核。审核是人工准入流程,校验包哈希不等于审核代码。写操作继续使用管理员认证、同源检查、CSRF 和审计。
**信任边界:** 前端运行在独立源,和工作台 DOM 分离,使用真实浏览器环境。Node 后端运行于独立子进程,拥有 WebSpeak 服务账户的操作系统权限,能够访问该账户可访问的网络和文件。独立进程、目录和 JS 堆上限用于生命周期与故障控制,不是恶意代码安全沙箱。仅安装审核且信任的应用。
运行时默认监听 `0.0.0.0:3042`:
| 环境变量 | 用途 |
| --- | --- |
| `WEBSPEAK_PLUGIN_PORT` | 应用端口,默认 3042 |
| `WEBSPEAK_PLUGIN_HOST` | 监听地址,默认 0.0.0.0 |
| `WEBSPEAK_PLUGIN_PUBLIC_ORIGIN` | 初始公开源,例如 `https://apps.example.com` |
本地工作台为 `127.0.0.1` 时自动使用 `localhost:3042`,反向亦然,以保持源分离。公网部署必须给应用配置独立 HTTPS 源,在管理页“应用运行时”保存;该设置优先于环境变量。代理应将该源的全部路径转发至应用端口,支持 WebSocket 升级和 SSE 长连接,关闭 SSE 缓冲。不要让代理记录 `/apps/…` 中的访问凭证,也不要与主站共用域 Cookie。
```caddyfile
apps.example.com {
reverse_proxy 127.0.0.1:3042
}
```
容器需映射应用端口,或让代理接入相同容器网络。端口/监听地址改变需重启;公开源可在后台更新,会撤销已有应用会话。主站直接使用 TLS 时,运行端口使用相同证书;TLS 在代理终止时,上游使用 HTTP。监听失败会保留主站和语音服务,后台显示不可用,修复后需重启。配置为主站自身源时拒绝打开应用。
## 作用域与身份
`server`:管理员配置允许的实际 TS `host:port`,用户按真实 TS 目标和频道获得作用域标识。`instance`:当前语音网关的已连接用户获得同一实例标识。作用域负责宿主准入和提供上下文,**不会替作者创建共享房间或自动同步数据**。应用后端应按 `request.webspeak.scope.key` 分组,并自行实现业务授权和同步。
TS 目标由实际语音连接解析,插件不能自报身份或频道。目标支持 `host:port`、`host#port`、`[IPv6]:port`,保存时规范化;SRV/Nickname 场景应核对实际目标。服务器范围切换频道后需重开;实例范围的频道变更通过上下文更新。断开、重连、更新、禁用、重启、配置修改或卸载会撤销旧凭证并关闭连接。服务端可以在没有打开面板时执行后台任务,直到禁用或停止。
入口属于实际语音网关;浏览器直连另一中继网关时,在那个网关安装配置。原生 TS 客户端不会执行网页应用,不同网关不会自动共享状态。作者可自行实现跨实例服务。
## 包格式与构建
复制 [通用起点](templates/plugin-app/manifest.json),修改 ID、元数据和业务代码。它只展示上下文及自定义计数路由,不是商店预装插件。
```text
my-app/
manifest.json
client/index.html
client/main.js
client/style.css
server/main.mjs # 可选
server/node_modules/ # 可选,已审核的运行依赖
```
```json
{
"apiVersion": 2,
"id": "community.my-app",
"name": "My application",
"version": "1.0.0",
"author": "Author",
"license": "MIT",
"description": "An independently implemented application",
"scopes": ["server", "instance"],
"client": { "entry": "client/index.html" },
"server": { "entry": "server/main.mjs" }
}
```
纯前端应用删除 `server` 声明。前端框架产物放入 `client/`,静态引用使用相对路径,不能假设根路径为 `/`。后端入口支持 `.mjs/.cjs`,依赖放在 `server/` 内或打包为自包含文件。宿主不会执行 `npm install`、安装脚本或原生编译;原生依赖需匹配目标 Node ABI/操作系统,不一定跨平台。运行环境为宿主 Node,当前项目要求 Node 22 或更高。
```sh
node scripts/build-plugin.mjs docs/templates/plugin-app /tmp/application.wplugin
```
构建器是独立 Node 脚本,可复制到插件仓库,无需导入 WebSpeak 源码。`.wplugin` 是 UTF-8 JSON:`{manifest,files}`;`files` 是路径到 `{encoding:"utf8"|"base64",data:string}` 的映射。支持普通 `client/`、`server/` 文件;禁止越界路径、符号链接、Windows 设备名、大小写冲突及文件/目录别名。入口必须是 UTF-8。封装上限 48 MiB、解码内容 32 MiB、单文件 16 MiB、4096 个文件,安装上限 50 个。宿主导入时完整校验。
## 浏览器上下文
宿主在入口 HTML 注入外部脚本,在应用模块运行前提供:
```js
const context = await window.webspeak.ready;
const unsubscribe = webspeak.onContextChange(next => render(next));
const latest = webspeak.getContext();
const response = await fetch(context.serverUrl + '/my-route', {
method: 'POST', body: JSON.stringify({anything: 'defined by the application'}),
signal: webspeak.signal
});
const socket = new WebSocket(context.socketUrl + '/my-socket');
```
| 上下文字段 | 内容 |
| --- | --- |
| `apiVersion` | 2 |
| `plugin` | manifest |
| `self` | 当前公开 `id/nickname/uid?` |
| `connection` | 真实 `target/channelId` 和当前频道公开 `members`(`id/nickname/uid?`) |
| `scope` | `{type:"server"|"instance",key:string}`;分组标识不能直接当文件路径 |
| `config` | 管理员公开 JSON,所有参与者可读 |
| `theme/language` | `light/dark` 和 `zh/en/de/ru/ja`,同步到 `<html data-theme>` 与 `lang` |
| `appId` | 本次打开的公开标识,不是长期身份或认证凭据 |
| `serverUrl/socketUrl` | 此会话的后端 HTTP/WS 根;纯前端为 `null` |
| `contextUrl` | 此会话最新上下文地址 |
运行时 URL 含临时凭证,不应持久化、广播或记录。`webspeak.signal` 在撤销或退出时中止,仍需清理自己的定时器、网络、媒体和订阅。应用应提供两种基础配色及适合的语言回退。
用原生 `fetch`、`WebSocket`、`RTCPeerConnection`、文件选择/下载、IndexedDB、Canvas 等编写功能。独立源存储遵循原生规则;同一运行源的应用共享该源存储,请按插件 ID 命名,不能把此设计当作互不信任插件间的隔离。服务端持久化使用 `dataDir`。
关闭面板会销毁 iframe 并取消未完成的打开操作。宿主每秒检查会话有效性,撤销后终止 HTTP、SSE、WS 和旧页面。控制平面只传上下文与生命周期;业务数据使用独立应用服务,不经过语音 WebSocket。
## 可选 Node 后端
```js
export default async function activate({ dataDir, config, publicConfig, events, signal, log }) {
return {
handle(req, res) {
// req.webspeak is verified by the host; req.url is your own route.
res.setHeader('content-type', 'application/json');
res.end(JSON.stringify({participant: req.webspeak.self.id}));
},
upgrade(req, socket, head) { /* your WebSocket protocol */ },
async stop() { /* flush data and release resources */ }
};
}
```
也可直接返回 `(req,res)=>…`。这是 Node 原生请求/响应,可适配 Express、WS 等库。`req.webspeak` 含 `apiVersion/appId/self/connection/scope`,不含临时 URL 或管理凭据;服务端 `connection` 只有目标和频道。代理剥离主站 Cookie、Authorization 和伪造的 `x-webspeak-*` 头;应用自行认证可使用自定义头或自己的外部服务。后端不会收到主站管理员/Query 密钥,除非管理员主动在插件配置中提供。
`dataDir` 为本插件持久目录,更新/重启/卸载保留。代码提取目录会清理,不可持久化。包文件没有可执行位;额外子程序需作者自行处理权限和平台。Node 网络、文件、子程序和第三方服务同样属于审核范围。
`config` 是后端私密 JSON,`publicConfig` 是公开 JSON。私密配置在管理页仅显示是否已保存,支持保留/替换/删除,用实例主密钥加密存储;启用的 Node 代码获得明文。它不是针对恶意插件的秘密保险箱。不要把私密配置写入响应或日志。
`events` 为 Node `EventEmitter`:`participantJoined/contextChanged` 提供服务端公开上下文,`participantLeft` 为 `{appId,selfId,scopeKey}`。加入指打开应用面板,不是全体 TS 成员。`signal` 在停止时中止;`log(level,message)` 提供限流日志,宿主当前以 debug 级别记录。
每个后端一个进程,默认最多 8 个;启动超时 10 秒、停止宽限 2 秒、JS 堆上限 256 MiB(不是总 RSS 限额)。失败显示错误、撤销会话,可手动重启,无无限重试。每个语音连接最多 8 个打开会话,全局 800 个,每会话最多 32 条代理连接及 4 条上下文 SSE。普通 HTTP 空闲超时 120 秒,无上下文 SSE 且 90 秒无活动的会话回收。作者负责消息大小、业务授权、并发、存储一致性和依赖资源用量。
## 分发与验证
[分发仓库](https://github.com/Huddle-Up-Forge/webspeak-plugin) 目录为 `{"schemaVersion":2,"plugins":[{"id":"community.my-app","repository":"https://github.com/OWNER/REPO","metadataPath":"plugin.json"}]}`。插件仓库 `plugin.json` 包含同一 `manifest` 和 `package:{ref,path,sha256}`。`ref` 使用固定提交/不可变标签,`path` 指向已提交包,SHA-256 为包原始字节哈希。宿主限制 GitHub 内容来源、核验哈希与 manifest;目录或安装修订改变会拒绝覆盖,需重新加载。空目录不默认安装插件。
验证实际构建包的导入、审核、启用、自定义 HTTP/WS、依赖加载、持久化和关闭/断线/禁用/更新撤销;检查明暗、语言、窄屏。协作另测两位真实参与者及并发/离开/重连。区分模拟身份、真实 TS、浏览器交互与跨网络证据。宿主回归:`npm run verify`。
## 悬浮应用窗口 / Floating application workspace
功能插件入口由宿主的独立悬浮层提供,不属于默认主题或任何皮肤插槽。入口可拖动,避免遮挡工作台控件。应用库和应用内容使用非模态窗口:打开后仍可操作工作台;标题栏可拖动,支持最小化、最大化、还原和关闭,小屏幕自动限制在可视区域内。宿主窗口优先读取标准 `color-scheme` 来选择日间/夜间配色,不继承皮肤组件样式。
最小化、切换到应用库、再返回当前应用均保留同一个 iframe 与会话,传输、播放等任务不会因收起窗口而重置。关闭窗口、切换至另一个应用或语音会话撤销时,宿主结束当前应用会话。当前同时承载一个前端应用;不要把窗口最小化当成退出事件。
应用只负责 iframe 内部内容,使用自身响应式日间/夜间样式和上下文中的主题、语言。不读取或改写皮肤 DOM,不绘制覆盖宿主的全屏遮罩,不自行重复宿主的标题栏、最小化和关闭按钮。需要自有导航时可在内容区实现。应用界面优先显示功能与实际状态,不重复运行环境、权限或免责说明;管理员启用时的信任与权限信息保留在管理流程中。
## 实例级用户授权
首次访问时,宿主统一征求第三方皮肤与功能应用的使用授权;决定按浏览器源保存,不迁移旧的逐皮肤授权。拒绝或未选择时,只显示日间、夜间、ILLUSIA 三款官方皮肤,KAAK 和功能应用入口均隐藏。皮肤菜单最后的“授权”可随时更改。撤回会关闭 iframe 并撤销当前打开操作/应用会话,不停止管理员启用的全实例后台服务。应用不得以入口以外的方式绕过宿主授权,也无需重复询问同一份宿主上下文授权;相机、麦克风等浏览器原生许可仍由浏览器处理。
+517
View File
@@ -0,0 +1,517 @@
<a id="readme-top"></a>
<div align="center">
<img src="./assets/webspeak-logo.png" alt="WebSpeak" width="88" />
<h1>WebSpeak · Deutsch</h1>
<p><strong>Deiner TeamSpeak-Community im Browser beitreten.</strong></p>
<p><a href="../README.md">Projektstartseite</a> · <a href="./README.zh-CN.md">简体中文</a> · <a href="./README.en.md">English</a> · <a href="./README.ru.md">Русский</a> · <a href="./README.ja.md">日本語</a></p>
<p>
<a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest"><img src="https://img.shields.io/github/v/release/EchoSixHIYA/WebSpeak-client-for-TeamSpeak?style=flat-square&amp;color=0f766e" alt="Release" /></a>
<a href="../LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0--only-0f766e?style=flat-square" alt="AGPL-3.0-only" /></a>
</p>
</div>
WebSpeak ist ein selbst gehosteter Browserclient und ein Sprach-Gateway für TeamSpeak 3 und TeamSpeak 6. Nutzer verwenden Sprache, Chat und Bildschirmfreigabe im Browser; Betreiber verwalten Zielserver, Zugriff und Daten über die Webkonsole.
Stabile Version: [Hinweise zu v0.3.0](#latest-release-notes) · [Pakete herunterladen](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest). Mit Plugin-API v2, schwebenden Anwendungen und gemeinsamer Instanzberechtigung.
[Live-Demo](#demo) · [Funktionen](#features) · [Screenshots](#screenshots) · [Bereitstellung](#deployment) · [Verwaltung](#administration) · [Erweiterte Einstellungen](#advanced) · [Skins & Plugins](#extensions) · [Problemlösung](#troubleshooting) · [Änderungsprotokoll](#changelog)
<a id="demo"></a>
## Live-Demo
- [Shanghai · shanghai.webspeak.online](https://shanghai.webspeak.online)
- [Hongkong · webspeak.online](https://webspeak.online)
Willkommensseite und Sprachbereich direkt ausprobieren. Netzwerk, Auslastung und Verfügbarkeit der Demo-Knoten können schwanken.
<a id="features"></a>
## Funktionen
| Funktion | Beschreibung |
| --- | --- |
| Echtzeit-Sprache | Opus, optionales WebRTC und WebSocket-Fallback; Stummschaltung, VOX, Geräteauswahl, Browser-Geräuschunterdrückung und Lautstärke je Mitglied. |
| Kanäle & Nachrichten | Kanalbaum und TeamSpeak-Trenner, Mitgliedsstatus, Kanalwechsel, Kanal-/Server-/Privatchat, Anstupsen, Flüstern und lokaler Chatverlauf. |
| Bildschirm & Audio | Bildschirmfreigabe zwischen Browsern und unterstützten nativen TeamSpeak-6-Clients mit Qualitäts-, Bitraten- und Statistikoptionen; Fenster-/Tab-Audio auf dem Desktop. |
| Identität & Verbindungen | Gespeicherte Identitäten, TS3-Identitätsimport/-export, Favoriten und Verlauf, SRV-/Nickname-Auflösung, IPv4/IPv6 und Einladungen. |
| Instanzverwaltung | Feste oder offene Ziele, Zugriffsregeln, Einladungen, Sitzungen, Logs, Diagnosen, Backups und optionale TeamSpeak-Verwaltung. |
| Skins & Oberfläche | Tag, Nacht, ILLUSIA und KAAK, `.wskin`-Pakete über GitHub, fünf Sprachen und responsive Ansichten. |
| Verteilte Sprache | Der Browser verbindet sich direkt mit dem gewählten Relay-Sprach-Gateway; die URL der Eingangsinstanz bleibt erhalten. |
| Bereitstellung | Docker amd64/arm64, Serverpakete für Windows x64 und Linux x64/ARM64 sowie Android-Vorschau-APKs. |
### TeamSpeak-Versionskompatibilität
Sprachverbindungen verwenden das TeamSpeak-Clientprotokoll und benötigen keine Query-Zugangsdaten. Die optionale TS-Verwaltung verwendet eigene WebQuery-/ServerQuery-Zugangsdaten.
- **TeamSpeak 3**: Die Erkennung wertet die führende `3.x`-Versionsnummer aus. Ältere Serverversionen sollten in der jeweiligen Umgebung geprüft werden, da nicht jede historische Version separat getestet wurde.
- **TeamSpeak 6**: Unterstützt, einschließlich Bildschirmfreigabe mit nativen TeamSpeak-6-Clients.
- **Automatische Erkennung**: Das Gateway liest die `version`-Antwort des Servers und hält das erkannte Protokoll in der Verbindungsdiagnose fest.
- Das Gateway verwendet das Upstream-SDK `1.0.0-beta.23` [`@honeybbq/teamspeak`](https://github.com/HoneyBBQ/teamspeak-js); WebSpeak richtet sich an TeamSpeak 3 und 6.
<a id="screenshots"></a>
## Screenshots
![WebSpeak · Sprachbereich](./screenshots/webspeak-de.png)
<details>
<summary>Willkommensseite, Audiosteuerung und Mitgliedermenü anzeigen</summary>
### Willkommensseite
![WebSpeak · Willkommensseite](./screenshots/webspeak-de-home.png)
### Audiosteuerung
![WebSpeak · Audiosteuerung](./screenshots/webspeak-de-audio.png)
### Mitgliedermenü
![WebSpeak · Mitgliedermenü](./screenshots/webspeak-de-menu.png)
</details>
<a id="deployment"></a>
## Bereitstellung & erste Konfiguration
Die Compose-Konfiguration verwendet `network_mode: host` für Linux-Docker-Hosts. Für einen Windows-Server das Release-Paket verwenden.
| Methode | Geeignet für | Umgebung |
| --- | --- | --- |
| Docker Compose (empfohlen) | Dauerbetrieb, einfache Updates und persistente Daten | Docker Engine + Docker Compose |
| Release-Paket | Betrieb ohne Node.js und Build-Werkzeuge | Windows x64 oder Linux x64/ARM64 |
| Aus dem Quellcode | Entwicklung und Anpassungen | Node.js 22.12+, Git und native Build-Werkzeuge |
### Docker Compose (empfohlen)
```bash
git clone --depth 1 https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
docker compose pull
docker compose up -d
```
Nach dem Start ist WebSpeak unter `http://<dein-host>:3040` erreichbar. Bei einem Reverse Proxy auf diese Adresse zeigen; für WebRTC den im Adminbereich angezeigten UDP-Bereich freigeben. Die Daten liegen im Volume `webspeak-data`.
```bash
docker compose ps
docker compose logs -f webspeak
```
Upgrade:
```bash
git pull --ff-only
docker compose pull
docker compose up -d
```
`docker compose down -v` nicht ausführen, da dadurch Datenbank und Administratoreinstellungen gelöscht werden.
### Release-Paket
Das passende `windows-x64.zip`, `linux-x64.tar.gz` oder `linux-arm64.tar.gz` aus den [GitHub Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest) herunterladen und den enthaltenen Starter ausführen. Die Pakete enthalten Node.js und Produktionsabhängigkeiten. Docker unterstützt amd64/arm64.
Android-APKs für `arm64-v8a`, `armeabi-v7a` und `x86_64` sind ebenfalls verfügbar. Sie sind für Tests per Sideload debug-signiert, keine Google-Play-Pakete; echte TeamSpeak-Sprachtests auf Geräten stehen noch aus.
### Aus dem Quellcode
```bash
git clone https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
npm ci --ignore-scripts
npm rebuild @discordjs/opus --foreground-scripts
npm --prefix web ci
npm --prefix web run build
npm run build
npm start
```
Für den Bau von `@discordjs/opus` werden Python, Make und eine C/C++-Toolchain benötigt.
### Erste Konfiguration
1. `http://<dein-host>:3040/admin` öffnen.
2. Mit `admin` / `admin` anmelden und sofort ein neues Passwort mit mindestens 12 Zeichen setzen.
3. Unter **Server** TeamSpeak-Ziel und Zugriffsmethode konfigurieren, zum Beispiel `voice.example.com#9987`.
4. Für öffentliche Nutzung HTTPS einrichten; bei aktiviertem WebRTC den im Adminbereich angezeigten UDP-Bereich freigeben.
### HTTPS & persistente Daten
Öffentliche Webseite und WebSocket über HTTPS bereitstellen. Beispielsweise die eigene Domain auf den Host zeigen lassen und Caddy als Reverse Proxy einrichten:
```caddyfile
webspeak.example.com {
reverse_proxy 127.0.0.1:3040
}
```
Die Beispieldomain durch die eigene ersetzen. Ein erreichbarer Reverse Proxy oder Tunnel garantiert keine UDP-Medienverbindung; siehe [Erweiterte Einstellungen](#advanced). Release- und Quellcode-Installationen verwenden `data/`, Docker das Volume `webspeak-data`. Bei Backup und Umzug `webspeak.db` und den zugehörigen `master.key` gemeinsam aufbewahren.
<a id="administration"></a>
## Administration
Unter `/admin` werden Server, Zugriff, WebRTC, Relays, Einladungen, aktive Sitzungen, Logs und Backups verwaltet. Der Skin-Store liegt unter `/admin/skins`, der Store für funktionale Plugins unter `/admin/plugins`.
### Optionale TeamSpeak-Verwaltung
WebSpeak-Verwaltung und Sprachverbindungen sind davon unabhängig. Im Modus mit festem Server die TS-Verbindung unter `/admin/ts-admin` einrichten.
1. WebQuery auf dem TS-Server aktivieren und einen berechtigten TS-Administrator einen API-Schlüssel erstellen lassen. HTTP-/HTTPS-URL von WebQuery und Schlüssel eintragen. Gemeint ist der TS-Query-Dienst, nicht die WebSpeak-Webseite. Unterstützt werden TS3 ab 3.12 und TS6.
2. Virtuelle Server-ID `0` wählt anhand des festen Sprachports aus. Bei eingeschränkten Schlüsseln die freigegebene Server-ID eintragen. Änderungen erfordern einen schreibbaren Geltungsbereich und entsprechende TS-Rechte; Leseschlüssel dienen zur Anzeige.
3. Alternativ ServerQuery SSH oder bei TS3 ServerQuery TCP wählen. Query-Host (leer: festes Ziel), Query-Port, Benutzername und Passwort eintragen; SSH benötigt einen vertrauenswürdigen Hostschlüssel-Fingerabdruck. Dies ist kein SSH-Zugang zum Betriebssystem. TCP ist unverschlüsselt und nur für vertrauenswürdige Netze geeignet. HTTPS-Zertifikate müssen vom Gateway als vertrauenswürdig erkannt werden.
4. Speichern und verbinden oder aktualisieren. Verfügbar sind Servereinstellungen, Kanalverwaltung, Verschieben/Ausschließen/Sperren von Mitgliedern, Gruppenzuweisung und Entsperren. Aktionen benötigen Bestätigung und TS-Rechte; Listen werden manuell aktualisiert.
Zugangsdaten werden serverseitig verschlüsselt und nie von der API zurückgegeben. Datenbank und `master.key` gemeinsam sichern. Verbindungsfehler beeinflussen weder WebSpeak-Verwaltung noch Sprache. Sperren verwenden die Benutzer-UID, damit andere Nutzer derselben Gateway-IP nicht betroffen sind.
<a id="advanced"></a>
## Erweiterte Einstellungen
Diese Funktionen sind optional. Ohne sie arbeitet WebSpeak weiterhin mit dem kompatiblen Sprachtransport. Die Einstellungen befinden sich unter **Administration → Server** und gelten für neue Verbindungen.
### WebRTC-Sprache mit niedriger Latenz
WebRTC verwendet für Browser-Sprache einen Echtzeit-Medienpfad und ermöglicht außerdem Desktop-Begleitton. Das aktuelle WebSpeak-Gateway stellt WebRTC selbst bereit; ein zusätzlicher Medienserver ist nicht erforderlich.
1. Unter `/admin` anmelden und auf der Seite **Server** die **Erweiterten Einstellungen** öffnen.
2. Bei deaktiviertem WebRTC Start- und Endport für UDP festlegen. Der Standardbereich ist `40000–40099`.
3. Den gesamten UDP-Bereich in Sicherheitsgruppe und Firewall des WebSpeak-Hosts freigeben.
4. **WebRTC** aktivieren und speichern. Nicht unterstützte Browser oder Netzwerke wechseln automatisch zum kompatiblen Transport.
Der Portbereich ist bei aktiviertem WebRTC gesperrt. Zum Ändern WebRTC zuerst deaktivieren und speichern, danach die Firewall-Regeln anpassen. Für öffentliche Bereitstellungen ist HTTPS erforderlich.
### Sprach-WebRTC hinter Reverse Proxy oder TCP-Tunnel
Unter **Server → Erweiterte Einstellungen** die **öffentliche Medienadresse** als per UDP erreichbare IP oder Domain des Sprach-Gateways eintragen, ohne Schema, Pfad oder Port. Sie ersetzt die aus dem Webseitenaufruf abgeleitete Adresse. Ein Proxy-Hostname ist nicht automatisch eine erreichbare Medienadresse.
**IPv6-Kandidaten** sind optional und behalten IPv4 bei; IPv6-Routing und Firewall müssen passen. Als **Sprach-STUN** kann `stun:turn.teamspeak.com:3478` eingetragen werden. Browser und Gateway verwenden dann denselben Dienst. Leer behält das bisherige Verhalten bei: STUN des Gateway-SDKs, kein Browser-STUN. Zulässig sind IPv4-erreichbare UDP-STUN-Domains oder IPv4-Adressen, keine IPv6-Literale oder TURN-Zugangsdaten.
Speichern und neu verbinden. Den gesamten UDP-Portbereich öffnen und bei statischer Weiterleitung die Portnummern erhalten. STUN findet Adressabbildungen, leitet aber keine Audiodaten weiter. Ein reiner TCP-Tunnel ohne nutzbaren UDP-/IPv6-Pfad führt weiter zum kompatiblen Transport.
### ICE-Kandidaten für Bildschirmfreigabe
Die Medien der Bildschirmfreigabe versuchen weiterhin eine direkte Browser-zu-Browser-Verbindung; WebSpeak leitet nur die Signalisierung weiter. Standardmäßig werden die öffentlichen TeamSpeak-STUN-Dienste zur Ermittlung öffentlicher Kandidaten verwendet. STUN überträgt keine Medien. Ein autorisierter externer TURN-Dienst kann über `WEBSPEAK_SCREEN_SHARE_ICE_SERVERS` als JSON-Array konfiguriert werden, zum Beispiel:
```json
[{"urls":"stun:turn.teamspeak.com:3478"},{"urls":"turns:turn.example.com:5349","username":"<username>","credential":"<credential>"}]
```
Mit TURN kann die Medienübertragung diesen externen Dienst verwenden, aber niemals das WebSpeak-Gateway. Ohne TURN werden nur direkte ICE-Pfade und STUN verwendet.
### Plattformübergreifendes P2P-Bildschirmteilen
Browsernutzer und native TeamSpeak-6-Clients können Bildschirmfreigaben gegenseitig erkennen, starten und ansehen. Zwischen Browsern sowie zwischen Browser und nativem Client werden die Bildschirmmedien möglichst über eine direkte WebRTC/ICE-Peer-to-Peer-Verbindung übertragen; WebSpeak übernimmt Sitzungsberechtigung, Freigabestatus und SDP-/ICE-Signalisierung, transportiert aber keine Bildschirmmedien. Die Oberfläche zeigt Live-Status und Zuschauerzahl und bietet Lautstärke-, Vollbild- und Beenden-Steuerung. Für die Aufnahme stehen bis zu 1080p und 60 FPS sowie WebRTC-Statistiken zur Verfügung.
### Relay-Modus
Ein Relay hilft, wenn ein TeamSpeak-Server Verbindungen aus einer anderen Region ablehnt oder der direkte Weg instabil ist. Es ist kein VPN, sondern leitet nur den TeamSpeak-Verkehr der aktuellen WebSpeak-Sitzung weiter.
Eine Relay-Instanz betreibt sowohl die ältere UDP-Kompatibilitätsweiterleitung als auch ein separates Sprach-Gateway, jedoch keine Besucher- oder Administrationsseite. Das Eingangs-Gateway signiert mit dem gemeinsamen Token ein einmaliges Sprach-Ticket und delegiert es; anschließend verbindet sich der Browser direkt mit dem Relay, das seinerseits TeamSpeak erreicht. Die Seite bleibt unter der URL des Eingangs-Gateways. Ein zufälliges Token mit mindestens 16 Zeichen verwenden.
<details>
<summary>Start- und Konfigurationsbeispiele für Relays anzeigen</summary>
#### Aus dem Quellcode starten
```bash
git clone --depth 1 https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
npm ci --ignore-scripts
npm rebuild @discordjs/opus --foreground-scripts
npm run build
WEBSPEAK_MODE=relay \
WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token' \
WEBSPEAK_RELAY_HOST='0.0.0.0' \
WEBSPEAK_RELAY_PORT='39087' \
node dist/index.js
```
Windows PowerShell:
```powershell
$env:WEBSPEAK_MODE = "relay"
$env:WEBSPEAK_RELAY_TOKEN = "replace-with-a-long-random-token"
$env:WEBSPEAK_RELAY_HOST = "0.0.0.0"
$env:WEBSPEAK_RELAY_PORT = "39087"
node .\dist\index.js
```
#### Aus einem Release-Paket starten
Das passende Paket aus den [Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest) herunterladen und entpacken:
```bash
# Linux
export WEBSPEAK_MODE=relay
export WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token'
export WEBSPEAK_RELAY_HOST='0.0.0.0'
export WEBSPEAK_RELAY_PORT='39087'
./runtime/node ./dist/index.js
```
Unter Windows PowerShell dieselben Variablen setzen und `.\runtime\node.exe .\dist\index.js` ausführen.
#### Mit Docker starten
```bash
docker run -d --name webspeak-relay --restart unless-stopped --network host \
-e WEBSPEAK_MODE=relay \
-e WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token' \
-e WEBSPEAK_RELAY_PORT='39087' \
ghcr.io/echosixhiya/webspeak:latest
```
Das Sprach-Gateway lauscht standardmäßig auf `127.0.0.1:3041`. Eine HTTPS-Domain für das Relay einrichten und sie mit Caddy oder einem vergleichbaren Proxy an `127.0.0.1:3041` weiterleiten, zum Beispiel:
```caddyfile
relay.example.com {
reverse_proxy 127.0.0.1:3041
}
```
In den Relay-Einstellungen des Eingangs-Gateways als **Voice gateway address** diesen HTTPS-Ursprung eintragen, etwa `https://relay.example.com`. Die Seite bleibt auf ihrem ursprünglichen Gateway und öffnet danach eine WSS-Verbindung zum Relay. WebRTC ist auf dem Relay standardmäßig aktiviert. Zusätzlich UDP `40000-40099` freigeben und `WEBSPEAK_RELAY_WEBRTC_PUBLIC_HOST` auf eine öffentliche Relay-IP oder direkt erreichbare Domain setzen. Bei geänderter WebRTC-Portspanne auch die Firewall anpassen. UDP `39087` für ältere Kompatibilitätsweiterleitungen offen lassen.
#### Im Gateway aktivieren
1. **Administration → Server → Relay-Server** öffnen und einen oder mehrere Knoten hinzufügen.
2. Anzeigename, UDP-Endpunkt wie `relay.example.com#39087`, HTTPS-Ursprung des Sprach-Gateways wie `https://relay.example.com` und das passende Token eintragen und speichern.
3. Besucher können auf der Willkommensseite Direktzugriff oder einen konfigurierten Relay-Knoten auswählen.
Relay deaktivieren und speichern, um die Option von der Willkommensseite zu entfernen.
</details>
### Abhängigkeiten und Hinweise zur Herkunft
- Der Relay-Dienst ist Bestandteil von WebSpeak und verwendet Node.js-Standardbibliotheken; GOST, sing-box oder ein anderes Proxy-Framework werden nicht verwendet.
- WebRTC verwendet [werift](https://github.com/shinyoshiaki/werift-webrtc) `0.24.4`; das Upstream-Projekt steht unter MIT-Lizenz.
- TeamSpeak verwendet das Upstream-Paket [HoneyBBQ/teamspeak-js](https://github.com/HoneyBBQ/teamspeak-js) `@honeybbq/teamspeak@1.0.0-beta.23`; ein eigener SDK-Fork muss nicht gebaut werden.
<a id="extensions"></a>
## Skins & funktionale Plugins
### Skin-Pakete `.wskin`
Skins gestalten Aussehen, Layout und zugehörige Widgets. Administratoren installieren, aktivieren und wählen den Standard-Skin. Autoren verwenden öffentliche Schnittstellen ohne Änderungen am WebSpeak-Quellcode.
[Entwicklungsleitfaden](./SKIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-skin-development/SKILL.md) · [Skin-Katalog](https://github.com/Huddle-Up-Forge/webspeak-skins) · [Discord-Voice-Beispiel](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice)
### Funktionale Plugins `.wplugin`
Funktionale Plugins sind unabhängige Anwendungen mit Browserfunktionen und optionalen Node-Backends, eigenen Routen, Daten und Zusammenarbeit. Administratoren prüfen Code und Abhängigkeiten vor der Aktivierung; Updates erfordern erneutes Vertrauen. Anwendungen unterstützen TS-Server- oder Instanz-Bereiche und eine separate Origin. API v2 ist ab v0.3.0 enthalten.
[Entwicklungsleitfaden](./PLUGIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-plugin-development/SKILL.md) · [Verteilungskatalog & Beispiel](https://github.com/Huddle-Up-Forge/webspeak-plugin)
<a id="troubleshooting"></a>
## Problemlösung
| Symptom | Prüfen |
| --- | --- |
| WebRTC fällt trotz Aktivierung zurück | Fehlercode im Sprachstatus, HTTPS, vollständigen UDP-Portbereich und öffentliche Medienadresse prüfen. Ein TCP-Tunnel transportiert diese UDP-Medien nicht. |
| Ziel wird als lokale Adresse blockiert | Der offene Modus beschränkt Loopback-/Privatadressen. Für einen TS-Server auf demselben Host den administrativ konfigurierten festen Servermodus verwenden. |
| Bildschirmfreigabe läuft ab oder bleibt schwarz | Sie verwendet eine eigene WebRTC-Verbindung. Aushandlung, ICE und Codec-Statistik prüfen; verbundenes Sprach-WebRTC bestätigt nicht die Bildschirmverbindung. |
| Daten fehlen oder lassen sich nach dem Update nicht entschlüsseln | Dasselbe Datenverzeichnis bzw. Volume mit passendem `master.key` verwenden. Nicht mit `docker compose down -v` aktualisieren. |
### ⚠️ Voraussetzungen und Hinweise
| Bereich | Hinweis |
| --- | --- |
| Browser | Aktuelles Chrome, Edge oder ein moderner WebRTC-fähiger Browser wird empfohlen. Mikrofon- und Fenster-Audio benötigen normalerweise HTTPS. |
| TeamSpeak-Netzwerk | Der WebSpeak-Host muss den Zielserver erreichen können; der Standard-Sprachport ist `9987`. |
| Webnetzwerk | Der Dienst verwendet `3040/TCP`; öffentlich sollte ein HTTPS-Reverse-Proxy für Seite und WebSocket verwendet werden. |
| IPv6 | Literale Ziele als `[2001:db8::1]#9987` eintragen. Host/Container benötigen geroutetes IPv6, aktiviertes IPv6 in Betriebssystem und Node.js sowie passende Firewall-Regeln. |
| WebRTC | Standardbereich `40000–40099/UDP`; den gesamten Bereich freigeben und WebRTC vor einer Änderung deaktivieren. |
| Gespeicherte Identität | Eine Browseridentität kann nur eine aktive gespeicherte Verbindung halten. Für parallele Verbindungen deaktivieren oder ein anderes Browserprofil verwenden. |
| Begleitton | Nur auf dem Desktop verfügbar und WebRTC erforderlich. Bei Fenster- oder Tab-Freigabe auch Audio freigeben. |
| Daten | Docker verwendet `webspeak-data`; Release-Pakete und Quellcode verwenden `data/`. Vor Updates sichern. |
| Sitzungslimit | Bis zu 100 aktive Browser-Sitzungen pro Instanz; dies ist ein Anwendungslimit, keine Leistungszusage oder TS-Lizenzgrenze. |
<a id="changelog"></a>
## Änderungsprotokoll
<a id="latest-release-notes"></a>
### [v0.3.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.3.0) · 2026-11-03
#### Plugin-Anwendungen
- Plugin-API v2 für eigenständige Browser-Anwendungen und optionale Node-Backends mit eigenen Routen, Zuständen, Kommunikationswegen und Funktionen.
- Installation über den GitHub-Store oder lokale `.wplugin`-Pakete. Administratoren verwalten öffentliche/private Konfigurationen, prüfen und aktivieren Anwendungen; Updates erfordern erneutes Vertrauen.
- Ein vom Design unabhängiger schwebender Einstieg und eine Anwendungsbibliothek. Fenster lassen sich verschieben, skalieren, minimieren, maximieren und wiederherstellen; Minimieren oder der Wechsel zur Bibliothek lädt die Anwendung nicht neu.
- Anwendungsvorlage, Entwicklungsanleitung und Agent Skill; P2P-Dateiübertragung und gemeinsames Videoschauen werden in eigenen Repositories verteilt.
#### Designs und Berechtigung
- Beim ersten Besuch wird gemeinsam nach der Berechtigung für Designs und Plugins dieser Instanz gefragt; Verbindungszugangsdaten sind ausgeschlossen. Der letzte Eintrag im Designmenü öffnet diese Einstellung erneut.
- Ohne Zustimmung bleiben nur Tag, Nacht und ILLUSIA verfügbar. KAAK, andere Designs und der Plugin-Einstieg werden ausgeblendet. Ein Widerruf stellt ein integriertes Design wieder her, bricht laufende Ladevorgänge ab und beendet zugehörige Komponenten und Anwendungsseiten.
- Manifest-Berechtigungen, Datenprojektion, Paketprüfsummen und Prüfungen von Host-Aktionen bleiben erhalten. Die Prüfung durch den Administrator gilt weiterhin separat.
#### Korrekturen und Aktualisierungen
- Native TS-Clients beantworteten reine Videoangebote bei Fenster-, Bildschirm- oder Freigaben ohne Ton nicht. Die erforderliche Audiosektion wird jetzt ausgehandelt, ohne ein Mikrofon aufzunehmen oder Ton zu erzeugen. Fenster- und Bildschirmvideo wurden im Benutzertest bestätigt.
- SDK auf `@honeybbq/teamspeak@1.0.0-beta.23` aktualisiert; optionale Mitgliedsfelder werden berücksichtigt und leere Pakete am Sprachende übersprungen.
- Upstream-Korrekturen für TSDNS, Query-Wiederholungen nach Flooding, Dateiübertragungen und Verbindungsabbau übernommen.
- Korrekturen für IPv6-Zielprüfung, begrenzte parallele Anmeldungen, Sitzungswiderruf nach Passwortwechsel, vertrauenswürdige Proxys und PCM-Uplink-Schutz übernommen.
- Der Kaltstart von Designs verwendet weiterhin die tatsächliche Build-Version. Desktop, Web und Android verwenden eine einheitliche Anwendungsversion.
#### Aktualisierung
- Plugin-API v2 ist nicht mit v1-Paketen kompatibel. Ersatzanwendungen aktualisieren, prüfen und aktivieren.
- Öffentliche Plugins benötigen einen separaten HTTPS-Ursprung, der im Administrationsbereich konfiguriert und an den Laufzeitport (Standard `3042`) weitergeleitet wird. Hauptseite und Anwendungen dürfen keinen Ursprung teilen.
- Die Instanzberechtigung muss neu gewählt werden; frühere Einzelberechtigungen gelten nicht als Zustimmung.
### [v0.2.9](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.9) · 2026-10-24
#### Erweiterungen
- Umstellung auf das Upstream-SDK 1.0.0-beta.19. Normale Sprachverbindungen verwenden das Live-Clientverzeichnis ohne Query-Listenberechtigungen.
- Neuer GitHub-Skin-Store mit Installation, Updates und Freigabe pro Instanz. Discord Voice wird als eigenständiges standardkonformes `.wskin`-Beispiel verteilt.
- Optionale TS-Verwaltung im Modus mit festem Server: WebQuery-, TCP- oder SSH-Query-Zugangsdaten ermöglichen die Verwaltung von Server, Kanälen, Mitgliedern, Servergruppen und Sperren.
- Relays können einen direkten Sprachendpunkt für Browser bereitstellen und die Sprachsitzung übernehmen; eine zusätzliche Weiterleitung zwischen Gateways entfällt.
- Allgemeine Schnittstellen zum Beibehalten des Arbeitsbereichs und zur Wiederverbindung; KAAK nutzt diese und bietet Zugänge zur Administration, zum Projekt-GitHub und zur QQ-Gruppe.
- Unterstützung für TeamSpeak-Kanaltrenner mit Ausrichtung, Wiederholung, Leerzeilen und Standardlinien sowie öffentlichen Darstellungsdaten für Skins.
#### Fehlerbehebungen
- Vollbildgröße der Bildschirmfreigabe und Bereinigung von Status und Wiedergaberessourcen ausgeschiedener Mitglieder korrigiert.
- Erfolgreiche Sperren werden nicht mehr als Fehler gemeldet; Query-Verbindungen zählen nicht als Mitglieder, und das Kanalpasswort ist korrekt beschriftet.
- Berechtigungs-, Ratenlimit- und Zeitüberschreitungsfehler werden unterschieden. Schlägt nur die Aktualisierung nach einer erfolgreichen Aktion fehl, erscheint eine eigene Warnung gegen doppelte Ausführung.
- Verhindert, dass das SDK fehlgeschlagene HTTP-Antworten als erfolgreiche WebQuery-Ergebnisse behandelt; Layoutfehler auf der DC-Startseite, im Chat und bei schmalen Ansichten behoben.
#### Bekannte Probleme
- Die in [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) beschriebene Sicherheitsabsicherung ist nicht enthalten; das Schließen des PRs bedeutet nicht, dass die gemeldeten Probleme behoben sind.
<details>
<summary>v0.2.8 und frühere Versionen anzeigen</summary>
### [v0.2.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.8) · 2026-10-17
#### Bildschirmfreigabe und Verbindungsstabilität
- Aushandlung und Verarbeitung der Videospur für Bildschirmfreigaben zwischen Browsern und nativen TeamSpeak-Clients korrigiert.
- Schnelle Kanalwechsel werden zuverlässiger verarbeitet, um inkonsistente Clientzustände zu vermeiden.
- Darstellungsfehler in einigen Skin-Komponenten und der KAAK-Übersetzung behoben.
#### Verbesserungen der Oberfläche
- Audiogerätenamen werden vollständig angezeigt und bei wenig Platz umgebrochen, damit lange Namen unterscheidbar bleiben.
- Unbeabsichtigte Textauswahl des Avatar-Platzhalters behoben.
### [v0.2.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.7) · 2026-10-13
#### Offeneres Skin-System
- Ein offenerer Skin-Editor und die zugehörige Laufzeit erlauben es nun, Stil und Position beliebiger Komponenten anzupassen und Widgets hinzuzufügen.
- Öffne nach dem Wechsel in den Sprachbereich im selben Browser ein neues Fenster mit der Administrationsoberfläche und melde dich an, um den Skin-Editor zu aktivieren.
- Der Skin „KAAK“ ist als Entwicklungsbeispiel enthalten.
- Der Agent Skill für die Skin-Entwicklung wurde aktualisiert.
#### Funktionserweiterungen
- Serveradressen können nun über SRV-Einträge und TeamSpeak-Nickname-Einträge aufgelöst werden.
- Im freien Modus lassen sich mehrere Server-Tabs verwalten; diese Schaltflächen sind im Modus „Fester Server“ nicht verfügbar.
- Eine Option für die Bitrate der Bildschirmfreigabe wurde hinzugefügt.
- WebSpeak speichert eingegebene Kanalpasswörter nun im Browser.
- Gesperrte Kanäle werden mit einem Schlosssymbol angezeigt.
- Der Chatverlauf wird nun dauerhaft gespeichert.
#### Fehlerbehebungen
- Fehler bei der Adressauflösung behoben.
- Fokuskonflikte zwischen Lautstärkeregelung und dem Ziehen von Mitgliedskarten behoben.
- Fehler behoben, durch den der Benutzerstatus fälschlich als unbekannt erkannt wurde.
### [v0.2.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.6) · 2026-10-08
Gegenüber 0.2.5 wurden Sprach-Gateway, gemeinsame Protokolle, Sprachoberfläche und Admin-Module umfassend umstrukturiert; #6/#7/#10 behoben, #9/#12 umgesetzt und der in PR #13 gemeldete Fall bereits aktiver TS6-Freigaben behoben. Opus- und Sitzungslebenszyklen sowie mobile Steuerung verbessert. Pakete: Windows x64, Linux x64/ARM64, Docker amd64/arm64 und Android arm64-v8a/armeabi-v7a/x86_64.
### [v0.2.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.5) · 2026-09-27
`.wskin`-Skins, Aktivierungs-/Standardverwaltung und geschützte Tages-, Nacht- und ILLUSIA-Skins ergänzt; unfertiges Aurora-Voice-Beispiel entfernt, Skin-Ladeblitze, dunkle Bedienelemente und Artwork-Ebenen im Sprachbereich korrigiert sowie offiziellen Skin-Entwicklungs-Agent-Skill hinzugefügt.
### [v0.2.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.4) · 2026-09-22
Plattformübergreifendes P2P-Bildschirmteilen zwischen Browsern und nativen TeamSpeak-6-Clients ergänzt; STUN-/externes-TURN-Konfiguration, Live-Player und Zuschauerstatus, Aufnahmeoptionen bis 1080p/60 FPS und WebRTC-Statistiken hinzugefügt; Bildschirmfreigabe-Interaktion verbessert und Besucherzählung ergänzt.
### [v0.2.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.3) · 2026-09-19
Mitgliederplanung und direkte Verschiebung nach Berechtigung ergänzt; Avatar-, Stummschaltstatus- und Identitätsunterstützung hinzugefügt; Screenshots und Dokumentation für alle fünf Sprachen aktualisiert.
### [v0.2.2](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.2) · 2026-09-17
Browserseitige Mikrofon-Geräuschunterdrückung, russische und japanische Oberfläche sowie sprachabhängige Begrüßungstexte ergänzt; Lautstärkeinteraktion und Fehlertexte/-codes auf Basis von PR #2 verbessert.
### [v0.2.1](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.1) · 2026-09-13
Verbindungsfehler auf der Willkommensseite verbessert, Fehlercodes erhalten und sicher gekürzt sowie IPv6-Ziele standardmäßig unterstützt.
### [v0.2.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.0) · 2026-09-10
Passwortabfrage, dedizierter Relay-Modus, Auswahl mehrerer Relays und Ursachendarstellung in der Administration ergänzt.
### [v0.1.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.8) · 2026-09-08
Docker-Bereitstellung vereinfacht, lokale TeamSpeak-Ziele unterstützt, 15-Sekunden-Timeout ergänzt und kontinuierliche Netzwerküberwachung eingeführt.
### [v0.1.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.7) · 2026-09-06
Deutsch, Telegram, Netzwerkleistung und Gesamtlautstärke ergänzt; Lautstärkeschwankungen beim Begleitton behoben.
### [v0.1.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.6) · 2026-09-04
Desktop-Begleitton, Hinweise zur gespeicherten Identität und Website-Symbol ergänzt; WebRTC-Mitgliederlautstärke korrigiert.
### [v0.1.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.5) · 2026-09-04
Identitätsspeicherung korrigiert und Designumschaltung verbessert.
### [v0.1.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.4) · 2026-09-03
WebRTC und Kanalchat korrigiert sowie Administration, Protokolle und Mobilansicht verbessert.
### [v0.1.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.3) · 2026-09-03
Integriertes WebRTC, aktualisiertes TeamSpeak-SDK und bessere Mitgliedersynchronisierung und Sprachpufferung.
</details>
<a id="contributors"></a>
## Mitwirkende & Herkunft
<details>
<summary>Upstream-Autoren und PR-Beiträge anzeigen</summary>
Diese Liste würdigt den Autor des zugrunde liegenden SDKs, Beiträge aus zusammengeführten GitHub-PRs sowie ursprüngliche Arbeiten, die in eigenständig verteilte Skin-Pakete übernommen wurden.
- [HoneyBBQ](https://github.com/HoneyBBQ) — Autor des [teamspeak-js-SDKs (`@honeybbq/teamspeak`)](https://github.com/HoneyBBQ/teamspeak-js), das den von WebSpeak verwendeten TeamSpeak-Protokollclient bereitstellt.
- [ph1gros](https://github.com/ph1gros) — [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) meldete Sicherheitsprobleme und lieferte Korrekturvorschläge sowie Regressionstests für IPv6-Zielprüfung, Admin-Anmeldung und Sitzungen, Proxy-Ratenlimits und PCM-Uplink. Der ursprüngliche Patch wurde nicht direkt übernommen; die Korrekturen wurden auf `dev` neu implementiert.
- [LainHE](https://github.com/LainHE) — [zusammengeführte PRs #2, #8, #28, #31–#35, #37, #38 und #40](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ALainHE): Browser-Fehlerübersetzungen, Skalierung und Startseitenlayout, Bildschirmfreigabe-Bitrate und Zuschaueravatare, Relay-Zielprüfung und Wiederverbindung, vertrauenswürdige Proxys, Weitergabe von Verbindungsfehlern, Audio-Fehlermeldungen und Ressourcenfreigabe bei WebRTC-Fehlern.
- [TimmySheep](https://github.com/TimmySheep) — [zusammengeführte PRs #13 und #15–#24](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ATimmySheep) zu vorhandenen TS6-Freigaben, Seitenverhältnis, mobiler Sprache/Bildschirm-Wachhalten/Skin-Menü, Kanaloptionen der Identität, PWA/Design, Chatverlauf, Mitglieder-Audiozuständen und Mikrofonberechtigungen.
- [yichen11818](https://github.com/yichen11818) — [PR #25](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/25) ermöglichte Verbindungen über registrierte TeamSpeak-Nicknames und bewahrte Nickname-Ziele; [PR #51](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/51) verbesserte das Beibehalten des KAAK-Arbeitsbereichs und die Wiederverbindung nach der ersten Verbindung. [PR #27](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/27) und [PR #52](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/52) lieferten das ursprüngliche Design und die Implementierung des Discord-Skins (Commit-Autor **yumi**), die das WebSpeak-Projekt in einen [eigenständig verteilten `.wskin`-Skin](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice) überführte.
</details>
## Community & verwandte Projekte
[GitHub Issues](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/issues) · [QQ-Gruppe 869500475](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=yhumUMDD9PmyYFWdXWUb_x7hM5trFQY8&authKey=Pw3HBGT7GwMinTQnuFGfnpf0aRSzXOJKcAiujVP1%2BXMpjheAKrncTRivicBJxpjV&noverify=0&group_code=869500475) · [Telegram](https://t.me/+8qShpTcuN9A3MWY9)
[NeteaseTSBot](https://github.com/yichen11818/NeteaseTSBot): TeamSpeak-Musikbot mit plattformübergreifender Wiedergabe und Webkonsole.
## Lizenz
WebSpeak wird unter [AGPL-3.0-only](../LICENSE) veröffentlicht. Lizenzen und Herkunft von Abhängigkeiten stehen in den jeweiligen Upstream-Projekten.
<p align="right"><a href="#readme-top">Nach oben ↑</a></p>
+517
View File
@@ -0,0 +1,517 @@
<a id="readme-top"></a>
<div align="center">
<img src="./assets/webspeak-logo.png" alt="WebSpeak" width="88" />
<h1>WebSpeak · English</h1>
<p><strong>Join your TeamSpeak community from a browser.</strong></p>
<p><a href="../README.md">Project home</a> · <a href="./README.zh-CN.md">简体中文</a> · <a href="./README.de.md">Deutsch</a> · <a href="./README.ru.md">Русский</a> · <a href="./README.ja.md">日本語</a></p>
<p>
<a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest"><img src="https://img.shields.io/github/v/release/EchoSixHIYA/WebSpeak-client-for-TeamSpeak?style=flat-square&amp;color=0f766e" alt="Release" /></a>
<a href="../LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0--only-0f766e?style=flat-square" alt="AGPL-3.0-only" /></a>
</p>
</div>
WebSpeak is a self-hosted browser client and voice gateway for TeamSpeak 3 and TeamSpeak 6. Visitors join voice, chat and screen sharing in a browser; operators manage target servers, access policy and data through the administration console.
Stable release: [v0.3.0 notes](#latest-release-notes) · [Download packages](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest). Includes plugin API v2, floating applications and unified instance authorization.
[Live demo](#demo) · [Features](#features) · [Screenshots](#screenshots) · [Deployment](#deployment) · [Administration](#administration) · [Advanced settings](#advanced) · [Skins & plugins](#extensions) · [Troubleshooting](#troubleshooting) · [Changelog](#changelog)
<a id="demo"></a>
## Live demo
- [Shanghai · shanghai.webspeak.online](https://shanghai.webspeak.online)
- [Hong Kong · webspeak.online](https://webspeak.online)
Try the welcome page and voice workspace. Network conditions, load and availability vary between demo nodes.
<a id="features"></a>
## Features
| Capability | What it provides |
| --- | --- |
| Realtime voice | Opus, optional WebRTC and WebSocket fallback; mute, VOX, device selection, browser noise suppression and per-member volume. |
| Channels & messaging | Channel tree and TeamSpeak spacers, member state, channel switching, channel/server/private chat, pokes, whispers and local chat history. |
| Screen & audio sharing | Screen sharing between browsers and supported native TeamSpeak 6 clients, with quality, bitrate and statistics controls; desktop window or tab audio sharing. |
| Identity & connections | Remembered identities, TS3 identity import/export, favorites and history, SRV and Nickname resolution, IPv4/IPv6 and invitation links. |
| Instance administration | Fixed or open targets, access policy, invitations, sessions, logs, diagnostics, backups and optional TeamSpeak management connections. |
| Skins & interface | Day, Night, ILLUSIA and KAAK, plus GitHub distribution of `.wskin` packages, five interface languages and responsive layouts. |
| Distributed voice | Browsers connect directly to the selected relay voice gateway while the page stays on the ingress instance URL. |
| Deployment | Docker amd64/arm64, Windows x64 and Linux x64/ARM64 server packages, plus Android preview APKs. |
### TeamSpeak version compatibility
Voice uses the standard TeamSpeak client protocol and needs no Query credentials. Optional TeamSpeak administration uses separate WebQuery / ServerQuery credentials.
- **TeamSpeak 3**: protocol detection recognizes the leading `3.x` version. Older server releases should be validated with the specific deployment because not every historical release has been independently tested.
- **TeamSpeak 6**: supported, including screen sharing with native TeamSpeak 6 clients.
- **Auto-detection**: the gateway reads the server's `version` response and records the detected protocol in connection diagnostics.
- The gateway uses the upstream [`@honeybbq/teamspeak`](https://github.com/HoneyBBQ/teamspeak-js) `1.0.0-beta.23` SDK; WebSpeak targets TeamSpeak 3 and TeamSpeak 6.
<a id="screenshots"></a>
## Screenshots
![WebSpeak · Voice workspace](./screenshots/webspeak-en.png)
<details>
<summary>Show the welcome page, audio controls and member menu</summary>
### Welcome page
![WebSpeak · Welcome page](./screenshots/webspeak-en-home.png)
### Audio controls
![WebSpeak · Audio controls](./screenshots/webspeak-en-audio.png)
### Member menu
![WebSpeak · Member menu](./screenshots/webspeak-en-menu.png)
</details>
<a id="deployment"></a>
## Deployment & first-time setup
The Compose configuration uses `network_mode: host` and targets Linux Docker hosts. Use the release package for a Windows server.
| Method | Best for | Environment |
| --- | --- | --- |
| Docker Compose (recommended) | Long-running servers, simple upgrades, and persistent data | Docker Engine + Docker Compose |
| Release package | Running without Node.js or build dependencies | Windows x64 or Linux x64/ARM64 |
| From source | Development, debugging, and customization | Node.js 22.12+, Git, and native build tools |
### Docker Compose (recommended)
```bash
git clone --depth 1 https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
docker compose pull
docker compose up -d
```
Open `http://<your-host>:3040` after startup. If using a reverse proxy, point it to that address. When WebRTC is enabled, allow the UDP range shown in the administration console. Data is stored in the `webspeak-data` volume.
```bash
docker compose ps
docker compose logs -f webspeak
```
Upgrade:
```bash
git pull --ff-only
docker compose pull
docker compose up -d
```
Do not run `docker compose down -v`; it removes the database and administrator settings.
### Release package
Download the matching `windows-x64.zip`, `linux-x64.tar.gz`, or `linux-arm64.tar.gz` from [GitHub Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest). Extract it and run the included launcher. Packages include the Node.js runtime and production dependencies. Docker images support amd64/arm64.
Android APKs for `arm64-v8a`, `armeabi-v7a`, and `x86_64` are also attached. They use debug signing for sideload testing; they are not Google Play packages, and real-device voice still needs validation.
### From source
```bash
git clone https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
npm ci --ignore-scripts
npm rebuild @discordjs/opus --foreground-scripts
npm --prefix web ci
npm --prefix web run build
npm run build
npm start
```
Building `@discordjs/opus` requires Python, Make, and a C/C++ toolchain.
### First-time setup
1. Open `http://<your-host>:3040/admin`.
2. Sign in with `admin` / `admin` and immediately set a new password of at least 12 characters.
3. Configure the TeamSpeak target and access mode under **Servers**, for example `voice.example.com#9987`.
4. Configure HTTPS for public access; when WebRTC is enabled, allow the UDP range shown in the console.
### HTTPS & persistent data
Expose the public page and WebSocket over HTTPS. For example, point your hostname to the host and configure Caddy to reverse-proxy WebSpeak:
```caddyfile
webspeak.example.com {
reverse_proxy 127.0.0.1:3040
}
```
Replace the example hostname with your own. A working reverse proxy or Tunnel does not make WebRTC UDP media reachable; see [Advanced settings](#advanced). Release/source installs use `data/`, while Docker uses the `webspeak-data` volume. Keep `webspeak.db` and its matching `master.key` together when backing up or moving an instance.
<a id="administration"></a>
## Administration
Open `/admin` to manage servers and access, WebRTC and relays, invitations, active sessions, logs and backups. The skin store is at `/admin/skins`; the functional plugin store is at `/admin/plugins`.
### Optional TeamSpeak administration
WebSpeak administration and visitor voice do not depend on this feature. In fixed-server mode, open `/admin/ts-admin` to configure the TS management connection.
1. Enable WebQuery on the TS server and have an authorized TS administrator create an API key. Enter the WebQuery HTTP/HTTPS URL and key. This is the TS Query endpoint, not the WebSpeak website. TS3 (3.12+) and TS6 are supported.
2. Virtual server ID `0` selects the fixed target's voice port. For a restricted key, enter its authorized server ID. Read-only keys support viewing; changes require writable scope and the corresponding TS permissions.
3. Alternatively, choose ServerQuery SSH, or ServerQuery TCP for TS3. Enter the Query host (blank uses the fixed target), Query port, username and password; SSH also requires a trusted host-key fingerprint. This is the TS Query service, not an operating-system SSH login. TCP is unencrypted and suitable only for trusted networks. HTTPS certificates must be trusted by the gateway.
4. Save and connect or refresh to inspect the server, channels, members, server groups and bans. Actions include server settings, channel creation/renaming/deletion, moving/kicking/banning members by identity, group assignment and removing bans. Actions require confirmation and TS permission checks; lists refresh manually.
Credentials are encrypted on the server and never returned by the API. Back up both the database and `master.key`. A failed management connection does not affect WebSpeak administration or ordinary voice. UID bans avoid banning other users sharing the gateway IP.
<a id="advanced"></a>
## Advanced settings
These features are optional. WebSpeak continues to work with the compatibility voice transport when they are disabled. Configure them under **Administration → Servers**; saved changes apply to new connections.
### WebRTC low-latency voice
WebRTC moves browser voice to a realtime media path and also enables desktop accompaniment. The current WebSpeak gateway provides it directly; no separate media server is required.
1. Sign in at `/admin` and open **Advanced settings** on the **Servers** page.
2. While WebRTC is disabled, choose the UDP start and end ports. The default range is `40000–40099`.
3. Allow the complete UDP range in the WebSpeak host's security group and firewall.
4. Enable **WebRTC** and save. New visitors will negotiate WebRTC; unsupported browsers and networks fall back to the compatibility transport.
The port range is locked while WebRTC is enabled. Disable and save WebRTC before changing it, then update the firewall rules. Public deployments also need HTTPS.
### Voice WebRTC behind a reverse proxy or TCP tunnel
The WebRTC advanced settings now include a **public media address**, **IPv6 candidates**, and a **voice STUN server**. The media address must be a gateway IP or hostname reachable over UDP, without a scheme, path or port. It overrides the address inferred from `Origin`, `X-Forwarded-Host`, or `Host`; DNS names are resolved into IP candidates. IPv6 is opt-in and retains IPv4 candidates.
Set a UDP STUN URL such as `stun:turn.teamspeak.com:3478` to use the same discovery service in the browser and gateway. Empty preserves the previous behavior: the gateway library uses its built-in STUN service while the browser has none. The gateway requires an IPv4-reachable UDP STUN hostname or IPv4 address; IPv6 literals and TURN credentials are not accepted. IPv6 media candidates work independently of STUN. Save and reconnect to apply changes.
HTTP/WebSocket reachability does not imply media reachability. Allow the complete configured UDP range and preserve port numbers when using static port forwarding. STUN discovers mappings but cannot relay audio or traverse every NAT. Deployments with only a TCP tunnel and no usable UDP/IPv6 path still fall back to compatibility transport.
### Screen-share ICE candidates
Screen-share media still prefers a direct browser-to-browser path; WebSpeak only relays negotiation signaling. By default it uses TeamSpeak's public STUN services to discover server-reflexive candidates; STUN does not carry media. If the deployment has an authorized external TURN service, set `WEBSPEAK_SCREEN_SHARE_ICE_SERVERS` before starting WebSpeak with a JSON array, for example:
```json
[{"urls":"stun:turn.teamspeak.com:3478"},{"urls":"turns:turn.example.com:5349","username":"<username>","credential":"<credential>"}]
```
With TURN configured, media may use that external TURN service but never the WebSpeak gateway; without it, only direct ICE paths and STUN are used.
### Cross-platform P2P screen sharing
Browser users and native TeamSpeak 6 clients can discover, start, and watch each other's screen shares. Screen media between browsers, and between a browser and a native client, is sent over a WebRTC/ICE peer-to-peer path whenever possible; WebSpeak handles session authorization, share state, and SDP/ICE signaling, but does not carry the screen media. The UI includes live status, viewer count, player volume, fullscreen, and exit controls. Share settings support up to 1080p and 60 FPS, with live WebRTC statistics for diagnosis.
### Relay mode
Use a relay when a TeamSpeak server rejects connections from another region or when the direct path is unstable. It is not a VPN: it forwards only the TeamSpeak traffic of the current WebSpeak session, while the visitor still chooses the target server in the web page.
A relay instance runs both the legacy UDP compatibility forwarder and a separate voice gateway, with no visitor page or administration console. The ingress gateway signs and delegates a one-time voice ticket with the shared token; the browser then connects directly to the relay, and the relay connects to TeamSpeak. The page stays on the ingress gateway URL. Use a random token of at least 16 characters.
<details>
<summary>Show relay startup and configuration examples</summary>
#### Run from source
```bash
git clone --depth 1 https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
npm ci --ignore-scripts
npm rebuild @discordjs/opus --foreground-scripts
npm run build
WEBSPEAK_MODE=relay \
WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token' \
WEBSPEAK_RELAY_HOST='0.0.0.0' \
WEBSPEAK_RELAY_PORT='39087' \
node dist/index.js
```
Windows PowerShell:
```powershell
$env:WEBSPEAK_MODE = "relay"
$env:WEBSPEAK_RELAY_TOKEN = "replace-with-a-long-random-token"
$env:WEBSPEAK_RELAY_HOST = "0.0.0.0"
$env:WEBSPEAK_RELAY_PORT = "39087"
node .\dist\index.js
```
#### Run from a release package
Download and extract the appropriate package from [Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest):
```bash
# Linux
export WEBSPEAK_MODE=relay
export WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token'
export WEBSPEAK_RELAY_HOST='0.0.0.0'
export WEBSPEAK_RELAY_PORT='39087'
./runtime/node ./dist/index.js
```
On Windows PowerShell, set the same variables and run `.\runtime\node.exe .\dist\index.js`.
#### Run with Docker
```bash
docker run -d --name webspeak-relay --restart unless-stopped --network host \
-e WEBSPEAK_MODE=relay \
-e WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token' \
-e WEBSPEAK_RELAY_PORT='39087' \
ghcr.io/echosixhiya/webspeak:latest
```
The voice gateway listens on `127.0.0.1:3041` by default. Give the relay an HTTPS hostname and reverse-proxy it to `127.0.0.1:3041` with Caddy or an equivalent proxy, for example:
```caddyfile
relay.example.com {
reverse_proxy 127.0.0.1:3041
}
```
In the ingress gateway's relay settings, set **Voice gateway address** to that HTTPS origin (for example, `https://relay.example.com`). The page remains on its original gateway, then opens a WSS connection to this relay hostname. WebRTC is enabled by default on the relay; also allow UDP `40000-40099` and set `WEBSPEAK_RELAY_WEBRTC_PUBLIC_HOST` to a public relay IP or directly reachable hostname. Update firewall rules if you change the WebRTC UDP range. Keep UDP `39087` open for compatibility with older forwarding.
#### Enable it in the gateway
1. Open **Administration → Servers → Relay server** and add one or more nodes.
2. Set a display name, UDP endpoint such as `relay.example.com#39087`, HTTPS voice gateway origin such as `https://relay.example.com`, and matching token for each node, then save.
3. Visitors can choose direct access or one of the configured relays on the welcome page.
Disable and save the relay configuration to remove the relay option from the welcome page.
</details>
### Dependencies and attribution
- The relay service is built into WebSpeak with Node.js standard libraries; it does not use GOST, sing-box, or another proxy framework.
- WebRTC uses [werift](https://github.com/shinyoshiaki/werift-webrtc) `0.24.4`, whose upstream project is licensed under MIT.
- TeamSpeak connectivity uses the upstream [HoneyBBQ/teamspeak-js](https://github.com/HoneyBBQ/teamspeak-js) package `@honeybbq/teamspeak@1.0.0-beta.23`; a project SDK fork build is not required.
<a id="extensions"></a>
## Skins & functional plugins
### Skin packages `.wskin`
Skins own appearance, layout and their attached widgets. Administrators install, enable and choose the default skin. Authors use the public contract without changing WebSpeak source code.
[Development guide](./SKIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-skin-development/SKILL.md) · [Skin catalog](https://github.com/Huddle-Up-Forge/webspeak-skins) · [Discord Voice example](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice)
### Functional plugins `.wplugin`
Functional plugins are independent applications using standard browser capabilities and optional Node backends with their own routes, state and collaboration. Administrators review code and dependencies before enabling; updates require renewed trust. Applications support TS server or instance scope and run on a separate origin. API v2 is included starting with v0.3.0.
[Development guide](./PLUGIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-plugin-development/SKILL.md) · [Distribution catalog & example](https://github.com/Huddle-Up-Forge/webspeak-plugin)
<a id="troubleshooting"></a>
## Troubleshooting
| Symptom | What to check |
| --- | --- |
| WebRTC falls back after being enabled | Check the voice-status error code, HTTPS, the complete UDP firewall range and the public media address. A TCP Tunnel does not carry this UDP media path. |
| A target is blocked as a local address | Open mode restricts loopback/private targets. Use the administrator-configured fixed-server mode for a co-located TS server; visitor-defined targets need a reachable address. |
| Screen sharing times out or stays black | Screen sharing has a separate WebRTC connection. Inspect its negotiation, ICE and codec statistics; connected voice WebRTC does not prove screen-media reachability. |
| Data is missing or cannot be decrypted after upgrading | Reuse the data directory or volume and its matching `master.key`. Do not upgrade with `docker compose down -v`. |
### ⚠️ Requirements and notes
| Area | Requirement or note |
| --- | --- |
| Browser | Use a current Chrome, Edge, or other modern browser with WebRTC support. Microphone and window audio normally require HTTPS. |
| TeamSpeak network | The WebSpeak host must reach the target TeamSpeak server; the default voice port is `9987`. |
| Web network | The service uses `3040/TCP`; public deployments should expose the page and WebSocket through an HTTPS reverse proxy. |
| IPv6 | Write literal targets as `[2001:db8::1]#9987`. The host/container needs routed IPv6, IPv6 enabled in the OS and Node.js, and the relevant firewall rules. |
| WebRTC | The default range is `40000–40099/UDP`; allow it and disable WebRTC before changing the range. |
| Remembered identity | One browser identity can hold one active remembered connection. Disable it for parallel connections or use another browser profile. |
| Accompaniment | Desktop only and requires WebRTC. Enable audio sharing when selecting a window or tab. |
| Data | Docker data is in `webspeak-data`; release packages and source installs use `data/`. Back up before upgrades. |
| Session limit | One instance admits up to 100 active browser sessions; this is an application limit, not a performance guarantee or TS license allowance. |
<a id="changelog"></a>
## Changelog
<a id="latest-release-notes"></a>
### [v0.3.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.3.0) · 2026-11-03
#### Plugin applications
- Release plugin API v2 for independent browser applications and optional Node backends, with author-defined routes, state, communication and business logic.
- Install applications from the GitHub store or local `.wplugin` packages. Administrators manage public/private configuration, review and enable applications; updates require renewed trust.
- Add a skin-independent floating launcher and application library. Windows support dragging, resizing, minimize, maximize and restore; minimizing or returning to the library keeps the active application loaded.
- Provide an application template, development guide and Agent Skill. P2P file transfer and Watch Together are distributed from separate repositories.
#### Skins and authorization
- Ask once on first entry for this instance’s third-party skins and plugins together, excluding connection credentials. The final Authorization item in the skin menu allows changes at any time.
- Without consent, offer only Day, Night and ILLUSIA; hide KAAK, other third-party skins and plugin access. Revocation restores a built-in skin, cancels pending loads and stops related components and application pages.
- Retain manifest permissions, data projection, package digests and host action checks. Administrator application review and trust remain independent.
#### Fixes and upgrades
- Fix native TS clients not answering video-only offers when sharing an application window, the entire screen or without shared audio. Negotiate the required audio section without capturing a microphone or fabricating shared sound. Window and full-screen video were confirmed by user retesting.
- Upgrade to `@honeybbq/teamspeak@1.0.0-beta.23`, handle optional member fields and skip empty audio packets that mark the end of speech.
- Include upstream TSDNS resolution, Query flooding retries, file transfer and disconnect cleanup fixes.
- Include IPv6 target validation, bounded concurrent login, password-change session revocation, trusted-proxy rate limiting and PCM uplink protection fixes.
- Retain and verify the skin cold-start fix that uses the real build version. Align application versions across desktop, web and Android.
#### Upgrading
- Plugin API v2 is incompatible with API v1 packages. Update, review and enable replacement applications.
- Public plugin deployment requires a separate HTTPS application origin configured in administration and proxied to the runtime port (default `3042`). The application and main site must not share an origin.
- Users must make a new instance authorization choice; old per-skin approvals do not imply consent.
### [v0.2.9](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.9) · 2026-10-24
#### Enhancements
- Migrated to upstream SDK 1.0.0-beta.19. Ordinary voice connections use the live client directory without Query list permissions.
- Added a GitHub skin store and instance-level installation, updates and availability controls. Discord Voice is distributed independently as a standard `.wskin` example.
- Added optional TS administration in fixed-instance mode, with WebQuery, TCP or SSH Query credentials for managing the server, channels, members, server groups and bans.
- Relays can advertise a direct browser voice endpoint and own the voice session, avoiding an extra gateway forwarding hop.
- Added generic persistent-workspace and reconnect APIs, adopted by KAAK alongside administrator, project GitHub and QQ group shortcuts.
- Added TeamSpeak channel spacers with alignment, repeated fill, blank rows and standard line patterns, including public presentation data for skins.
#### Fixes
- Fixed screen-share fullscreen sizing and cleanup of departed members' state and playback resources.
- Fixed successful bans being reported as failures, Query connections appearing in member counts and the channel-password label.
- Distinguished permission, rate-limit and timeout errors. A refresh failure after a successful action now has its own warning to prevent duplicate actions.
- Guarded against the SDK treating failed HTTP responses as successful WebQuery results, and fixed DC home, chat and narrow-screen control layouts.
#### Known issues
- The security hardening described in [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) is not included in this release; closing that PR does not mean the reported issues are fixed.
<details>
<summary>Show v0.2.8 and earlier releases</summary>
### [v0.2.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.8) · 2026-10-17
#### Screen sharing and connection reliability
- Fixed negotiation and video-track handling for screen sharing between browsers and native TeamSpeak clients.
- Improved handling of rapid channel switches to reduce inconsistent client state.
- Fixed content rendering in some skin components and localization in the KAAK skin.
#### Interface improvements
- Audio device names now display in full and wrap when space is limited, making long names easier to distinguish.
- Fixed avatar fallback text being selected unintentionally.
### [v0.2.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.7) · 2026-10-13
#### A more open skin system
- A more open skin editor and runtime now let authors customize the style and position of any component and add widgets.
- After entering the voice panel, open a new administrator-console window in the same browser and sign in to activate the skin editor.
- The KAAK skin is included as a development example.
- Updated the skin development Agent Skill.
#### Enhancements
- Server addresses can now be resolved through SRV records and TeamSpeak Nickname entries.
- Free mode supports managing multiple server tabs; these controls are unavailable in fixed-server mode.
- Added a screen-share bitrate option.
- WebSpeak now saves entered channel passwords in the browser.
- Locked channels now show a lock icon.
- Chat history is now stored persistently.
#### Bug fixes
- Fixed address parsing.
- Fixed focus conflicts between volume controls and dragging member cards.
- Fixed user status being incorrectly parsed as unknown.
### [v0.2.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.6) · 2026-10-08
Relative to 0.2.5, broadly refactored gateway voice, shared protocol, frontend voice workspace, and admin modules; fixed #6/#7/#10, implemented #9/#12 settings, and fixed the existing-TS6-share discovery case reported in PR #13. Improved Opus/session lifecycles and mobile controls. Packages: Windows x64, Linux x64/ARM64, Docker amd64/arm64, and Android arm64-v8a/armeabi-v7a/x86_64.
### [v0.2.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.5) · 2026-09-27
Added `.wskin` skins, administrator enable/default controls, and protected Day/Night/ILLUSIA built-ins; removed the unfinished Aurora Voice sample, fixed skin-load flashes, dark-control contrast, and voice-room artwork layering, and added the official skin-development Agent Skill.
### [v0.2.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.4) · 2026-09-22
Added cross-platform P2P screen sharing between browsers and native TeamSpeak 6 clients; added STUN/external-TURN configuration, live player and viewer state, 1080p/60 FPS capture settings, and WebRTC statistics; refined screen-share interactions and added visitor numbering.
### [v0.2.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.3) · 2026-09-19
Added channel member scheduling and permission-aware direct moves; added avatar, mute-state, and remembered-identity support; refreshed feature screenshots and documentation for all five languages.
### [v0.2.2](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.2) · 2026-09-17
Added browser-side microphone noise suppression, Russian and Japanese UI, and per-language welcome text; refined volume interaction and error messages/codes on top of PR #2.
### [v0.2.1](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.1) · 2026-09-13
Improved welcome-page connection errors, preserved and safely truncated error codes, and added default IPv6 target support.
### [v0.2.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.0) · 2026-09-10
Added server-password prompts, formal relay mode, multiple relay selection, and administrator connection-reason reporting.
### [v0.1.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.8) · 2026-09-08
Simplified Docker deployment, supported local TeamSpeak targets, added a 15-second connection timeout, and made network monitoring continuous.
### [v0.1.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.7) · 2026-09-06
Added German, Telegram, network performance, and master-volume features; fixed accompaniment volume fluctuation.
### [v0.1.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.6) · 2026-09-04
Added desktop accompaniment, remembered-identity guidance, and the site icon; fixed WebRTC member volume.
### [v0.1.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.5) · 2026-09-04
Fixed identity persistence and refined the theme toggle.
### [v0.1.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.4) · 2026-09-03
Fixed WebRTC and channel chat and refined administration, logs, and mobile layouts.
### [v0.1.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.3) · 2026-09-03
Added bundled WebRTC, migrated the TeamSpeak SDK, and improved member synchronization and voice buffering.
</details>
<a id="contributors"></a>
## Contributors & attribution
<details>
<summary>Show upstream authors and PR contributions</summary>
This list acknowledges the upstream SDK author, contributions through merged GitHub PRs, and original work adapted into independently distributed skin packages.
- [HoneyBBQ](https://github.com/HoneyBBQ) — Author of the upstream [teamspeak-js (`@honeybbq/teamspeak`)](https://github.com/HoneyBBQ/teamspeak-js) SDK, which provides the TeamSpeak protocol client used by WebSpeak.
- [ph1gros](https://github.com/ph1gros) — [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) reported security issues and supplied proposed fixes and regression tests for open-target IPv6 validation, admin authentication/sessions, proxy-aware limits and PCM uplink boundaries. The original patch was not merged directly; the fixes were reimplemented on `dev`.
- [LainHE](https://github.com/LainHE) — [merged PRs #2, #8, #28, #31–#35, #37, #38 and #40](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ALainHE), covering browser error translations, scaling and home layout, screen-share bitrate and viewer avatars, relay target validation and recovery, trusted proxy handling, connection-failure propagation, audio fault reporting, and WebRTC failure cleanup.
- [TimmySheep](https://github.com/TimmySheep) — [merged PRs #13 and #15–#24](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ATimmySheep), covering existing TS6 share discovery, share aspect ratio, mobile voice/wake/skin-menu behavior, identity channel options, PWA/theme work, chat history, member audio states, and microphone permission.
- [yichen11818](https://github.com/yichen11818) — [PR #25](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/25) added registered TeamSpeak nickname connections and preserved nickname targets; [PR #51](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/51) improved KAAK workspace retention and reconnection after the first connection. [PR #27](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/27) and [PR #52](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/52) supplied the original Discord skin design and implementation (commit author **yumi**), later adapted by the WebSpeak project into an [independently distributed `.wskin` skin](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice).
</details>
## Community & related projects
[GitHub Issues](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/issues) · [QQ group 869500475](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=yhumUMDD9PmyYFWdXWUb_x7hM5trFQY8&authKey=Pw3HBGT7GwMinTQnuFGfnpf0aRSzXOJKcAiujVP1%2BXMpjheAKrncTRivicBJxpjV&noverify=0&group_code=869500475) · [Telegram](https://t.me/+8qShpTcuN9A3MWY9)
[NeteaseTSBot](https://github.com/yichen11818/NeteaseTSBot): a TeamSpeak music bot with multi-platform playback and a web console.
## License
WebSpeak is distributed under [AGPL-3.0-only](../LICENSE). See each upstream project for third-party licenses and attribution.
<p align="right"><a href="#readme-top">Back to top ↑</a></p>
+452
View File
@@ -0,0 +1,452 @@
<a id="readme-top"></a>
<div align="center">
<img src="./assets/webspeak-logo.png" alt="WebSpeak" width="88" />
<h1>WebSpeak · 日本語</h1>
<p><strong>ブラウザーから、いつもの TeamSpeak へ。</strong></p>
<p><a href="../README.md">プロジェクトトップ</a> · <a href="./README.zh-CN.md">简体中文</a> · <a href="./README.en.md">English</a> · <a href="./README.de.md">Deutsch</a> · <a href="./README.ru.md">Русский</a></p>
<p>
<a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest"><img src="https://img.shields.io/github/v/release/EchoSixHIYA/WebSpeak-client-for-TeamSpeak?style=flat-square&amp;color=0f766e" alt="Release" /></a>
<a href="../LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0--only-0f766e?style=flat-square" alt="AGPL-3.0-only" /></a>
</p>
</div>
WebSpeak はセルフホスト型の TeamSpeak 3 / TeamSpeak 6 ブラウザークライアント兼音声ゲートウェイです。ユーザーはブラウザーで音声、チャット、画面共有に参加でき、運営者は管理コンソールで接続先、アクセス方針、データを管理できます。
安定版:[v0.3.0 更新内容](#latest-release-notes) · [ダウンロード](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest)。API v2、フローティングアプリ、インスタンス単位の許可に対応。
[オンラインデモ](#demo) · [機能](#features) · [画面プレビュー](#screenshots) · [デプロイ](#deployment) · [管理](#administration) · [詳細設定](#advanced) · [スキンとプラグイン](#extensions) · [トラブル対処](#troubleshooting) · [更新履歴](#changelog)
<a id="demo"></a>
## オンラインデモ
- [上海 · shanghai.webspeak.online](https://shanghai.webspeak.online)
- [香港 · webspeak.online](https://webspeak.online)
ホームと音声ワークスペースを体験できます。デモのネットワーク、負荷、稼働状況は変動します。
<a id="features"></a>
## 主な機能
| 機能 | 内容 |
| --- | --- |
| リアルタイム音声 | Opus、任意の WebRTC、WebSocket へのフォールバック。ミュート、VOX、デバイス選択、ブラウザー側ノイズ抑制、メンバー別音量に対応。 |
| チャンネルとメッセージ | チャンネルツリーと TeamSpeak 区切り、メンバー状態、移動、チャンネル・サーバー・個人チャット、Poke、ささやき、ローカル履歴。 |
| 画面と音声の共有 | ブラウザー間および対応する TeamSpeak 6 クライアントとの画面共有。品質、ビットレート、統計を設定でき、デスクトップではウィンドウやタブの音声も共有可能。 |
| ID と接続 | ID 保持、TS3 ID インポート・エクスポート、お気に入りと履歴、SRV・Nickname 名前解決、IPv4/IPv6、招待リンク。 |
| インスタンス管理 | 固定・公開接続先、アクセス方針、招待、セッション、ログ、診断、バックアップ、任意の TeamSpeak 管理接続。 |
| スキンと画面 | 昼・夜・ILLUSIA・KAAK、GitHub 経由の `.wskin` 配布、5 言語、レスポンシブ表示。 |
| 分散音声 | ブラウザーが選択した中継の音声ゲートウェイに直接接続し、ページの URL は入口インスタンスのまま維持。 |
| デプロイ方法 | Docker amd64/arm64、Windows x64・Linux x64/ARM64 サーバーパッケージ、Android プレビュー APK。 |
### TeamSpeak のバージョン互換性
音声接続には標準の TeamSpeak クライアントプロトコルを使い、Query の認証情報は不要です。任意の TS 管理機能では、別途 WebQuery / ServerQuery の認証情報を使用します。
- **TeamSpeak 3**: 先頭の `3.x` バージョンを使ってプロトコルを判定します。すべての旧バージョンを個別に検証しているわけではないため、古いサーバーは実際の環境で確認してください。
- **TeamSpeak 6**: 対応しています。TeamSpeak 6 ネイティブクライアントとの画面共有も可能です。
- **自動検出**: ゲートウェイはサーバーの `version` 応答を読み取り、接続診断に判定結果を記録します。
- ゲートウェイは上流 SDK `1.0.0-beta.23` の [`@honeybbq/teamspeak`](https://github.com/HoneyBBQ/teamspeak-js) を使用し、WebSpeak は TeamSpeak 3 と 6 を対象とします。
<a id="screenshots"></a>
## 画面プレビュー
![WebSpeak · 音声ワークスペース](./screenshots/webspeak-ja.png)
<details>
<summary>ホーム、オーディオ設定、メンバーメニューを表示</summary>
### ホーム
![WebSpeak · ホーム](./screenshots/webspeak-ja-home.png)
### オーディオ設定
![WebSpeak · オーディオ設定](./screenshots/webspeak-ja-audio.png)
### メンバーメニュー
![WebSpeak · メンバーメニュー](./screenshots/webspeak-ja-menu.png)
</details>
<a id="deployment"></a>
## デプロイと初期設定
Compose は `network_mode: host` を使う Linux Docker ホスト向けの構成です。Windows サーバーには Release パッケージを使用してください。
| 方法 | 用途 |
| --- | --- |
| Docker Compose | 常時稼働サーバーと簡単な更新 |
| Release パッケージ | Node.js やビルドツールを使わない起動 |
| ソースから | 開発やカスタマイズ |
### Docker Compose
```bash
git clone --depth 1 https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
docker compose pull
docker compose up -d
```
起動後に `http://<your-host>:3040/admin` を開き、`admin` / `admin` でログインして直ちにパスワードを変更し、TeamSpeak を設定します。データは `webspeak-data` volume に保存されます。データベースを消さない場合は `docker compose down -v` を実行しないでください。
```bash
docker compose ps
docker compose logs -f webspeak
```
データを保持して更新:
```bash
git pull --ff-only
docker compose pull
docker compose up -d
```
### Release パッケージ
[Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest) から `windows-x64.zip`、`linux-x64.tar.gz`、`linux-arm64.tar.gz` のいずれかを取得し、同梱ランチャーを実行します。Docker は amd64/arm64 に対応します。`arm64-v8a`、`armeabi-v7a`、`x86_64` の Android APK もあります。APK は手動インストールとテスト向けのデバッグ署名で、Google Play 用ではありません。実機 TeamSpeak 音声は未検証です。
### ソースから
```bash
git clone https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
npm ci --ignore-scripts
npm rebuild @discordjs/opus --foreground-scripts
npm --prefix web ci
npm run web:build
npm run build
npm start
```
ビルドには Node.js `>=22.12`、Python、Make、C/C++ コンパイラーが必要です。
### 初期設定
1. `http://<your-host>:3040/admin` を開きます。
2. `admin` / `admin` でログインし、直ちに 12 文字以上の新しいパスワードに変更します。
3. **サーバー**で `voice.example.com#9987` などの接続先とアクセスモードを設定します。
4. 公開時は HTTPS を設定し、WebRTC 有効時は指定した UDP 範囲全体を許可します。
### HTTPS とデータ保持
公開ページと WebSocket は HTTPS で提供してください。例えば、自分のドメインをホストに向け、Caddy から WebSpeak へ転送します。
```caddyfile
webspeak.example.com {
reverse_proxy 127.0.0.1:3040
}
```
例のドメインは自分のものに置き換えてください。リバースプロキシや Tunnel でページが開けても、WebRTC の UDP が到達可能とは限りません。[詳細設定](#advanced)を確認してください。パッケージとソースは `data/`、Docker は `webspeak-data` volume を使用します。移行・バックアップ時は `webspeak.db` と対応する `master.key` を一緒に保存します。
<a id="administration"></a>
## 管理コンソール
`/admin` で接続先、アクセス、WebRTC、中継、招待、アクティブセッション、ログ、バックアップを管理します。スキンストアは `/admin/skins`、機能プラグインストアは `/admin/plugins` です。
### 任意の TeamSpeak 管理
WebSpeak 管理画面と音声接続は、この機能に依存しません。固定サーバーモードで `/admin/ts-admin` を開き、TS 管理用の接続を設定します。
1. TS サーバーで WebQuery を有効にし、権限のある TS 管理者に API キーを作成してもらいます。WebQuery の HTTP/HTTPS URL とキーを入力します。WebSpeak のサイトではなく、TS Query サービスの URL です。TS3(3.12 以降)と TS6 に対応します。
2. 仮想サーバー ID `0` は固定接続先の音声ポートから選択します。制限付きキーでは許可された ID を入力してください。読み取りキーでは閲覧ができ、変更には書き込み可能なスコープと対応する TS 権限が必要です。
3. ServerQuery SSH、または TS3 の ServerQuery TCP も選べます。Query ホスト(空欄は固定接続先)、ポート、ユーザー名、パスワードを入力し、SSH では信頼できるホストキーのフィンガープリントも指定します。OS への SSH ログインではありません。TCP は暗号化されないため信頼できるネットワークで使用します。HTTPS 証明書はゲートウェイで信頼されている必要があります。
4. 保存して接続または更新します。サーバー設定、チャンネル管理、メンバーの移動・退出・ID による BAN、グループ割り当て、BAN 解除に対応します。操作には確認が必要で、TS が権限を検証します。リストは手動更新します。
認証情報はサーバーで暗号化され、API から返されません。データベースと `master.key` を一緒にバックアップしてください。管理接続の失敗は WebSpeak 管理画面や音声に影響しません。UID による BAN で同じゲートウェイ IP を使う他のユーザーへの影響を避けます。
<a id="advanced"></a>
## 詳細設定
### WebRTC
**管理コンソール → サーバー → 詳細設定** で有効にします。無効の状態で UDP ポート範囲(初期値 `40000–40099`)を設定し、ファイアウォールで許可して保存してください。有効中は範囲がロックされ、新しい接続で WebRTC を使用します。非対応のブラウザは互換トランスポートに戻ります。公開サイトでは HTTPS が必要です。
### リバースプロキシ・TCP Tunnel 経由の音声 WebRTC
**サーバー → 詳細設定** の**公開メディアアドレス**には、UDP で到達可能な音声ゲートウェイの IP またはドメインを入力します。スキーム、パス、ポートは含めません。ページのリクエストから推測する接続先より優先され、プロキシのドメインが音声にも到達可能とは限りません。
**IPv6 候補**は任意で、IPv4 も維持します。IPv6 の経路とファイアウォール許可が必要です。**音声 STUN** に `stun:turn.teamspeak.com:3478` を設定すると、ブラウザーとゲートウェイが同じサービスを使います。空欄では従来どおり、ゲートウェイのライブラリ内蔵 STUN を使い、ブラウザーには設定しません。IPv4 で到達可能な UDP STUN ドメイン・IPv4 アドレスに対応し、IPv6 リテラルや TURN 認証情報は指定できません。
保存後に再接続してください。UDP 範囲全体を許可し、固定ポート転送では番号を維持します。STUN はアドレスを検出するだけで音声を中継しません。利用可能な UDP/IPv6 経路のない TCP Tunnel だけでは、互換転送に戻ります。
### 画面共有の ICE 候補
画面共有のメディアは引き続きブラウザ間の直接接続を優先し、WebSpeak はシグナリングだけを中継します。初期状態では TeamSpeak の公開 STUN サービスで外部候補を検出します。STUN はメディアを運びません。認可済みの外部 TURN を使う場合は、起動前に `WEBSPEAK_SCREEN_SHARE_ICE_SERVERS` を JSON 配列で設定できます。
```json
[{"urls":"stun:turn.teamspeak.com:3478"},{"urls":"turns:turn.example.com:5349","username":"<username>","credential":"<credential>"}]
```
TURN を設定した場合、メディアは外部 TURN サービスを経由することがありますが、WebSpeak ゲートウェイは経由しません。未設定時は直接接続と STUN のみを使用します。
### クロスプラットフォーム P2P 画面共有
ブラウザユーザーと TeamSpeak 6 ネイティブクライアントは、互いの画面共有を検出・開始・視聴できます。ブラウザ間、およびブラウザとネイティブクライアント間の画面メディアは、可能な限り WebRTC/ICE の直接接続で送信されます。WebSpeak はセッション認証、共有状態、SDP/ICE シグナリングを担当しますが、画面メディア自体は転送しません。画面には配信中の状態と視聴者数が表示され、音量、全画面、終了を操作できます。取得設定は最大 1080p / 60 FPS に対応し、WebRTC 統計も確認できます。
### 中継サーバー
入口ゲートウェイが署名付きの一度限りのチケットを発行し、ブラウザーは中継の音声ゲートウェイに直接接続します。中継が TeamSpeak に接続し、ページの URL はそのままです。中継ノードはホームや管理コンソールを提供しません。
<details>
<summary>中継の起動と設定</summary>
```bash
docker run -d --name webspeak-relay --restart unless-stopped --network host \
-e WEBSPEAK_MODE=relay \
-e WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token' \
-e WEBSPEAK_RELAY_PORT='39087' \
-e WEBSPEAK_RELAY_WEBRTC_PUBLIC_HOST='relay.example.com' \
ghcr.io/echosixhiya/webspeak:latest
```
共通トークンはランダムな 16 文字以上にします。音声ゲートウェイは `127.0.0.1:3041` で待ち受けるため、Caddy などで HTTPS/WSS ドメインから転送します。
```caddyfile
relay.example.com {
reverse_proxy 127.0.0.1:3041
}
```
入口側の**サーバー → 中継**で、名前、UDP 接続先 `relay.example.com#39087`、音声接続先 `https://relay.example.com`、同じトークンを設定して保存します。ユーザーは直接接続か中継を選べます。UDP `39087` と WebRTC の `40000–40099` を許可してください。公開メディアアドレスは HTTP プロキシではなく、中継に直接到達できる必要があります。
ソースや Release パッケージでも同じ環境変数を指定します。ビルド後は `node dist/index.js`、パッケージでは `./runtime/node ./dist/index.js`(Windows:`.\runtime\node.exe .\dist\index.js`)で起動します。
</details>
### 依存ライブラリ
中継は WebSpeak に組み込まれ、Node.js 標準ライブラリを使います。WebRTC は [werift](https://github.com/shinyoshiaki/werift-webrtc) `0.24.4`、TeamSpeak は上流 [HoneyBBQ/teamspeak-js](https://github.com/HoneyBBQ/teamspeak-js) の `@honeybbq/teamspeak@1.0.0-beta.23` を使用し、fork のビルドは不要です。
<a id="extensions"></a>
## スキンと機能プラグイン
### スキンパッケージ `.wskin`
スキンは外観、配置、付属ウィジェットを扱います。管理者がインストール、有効化、デフォルト選択を行い、開発者は WebSpeak のソースを変更せず公開 API で制作します。
[開発ガイド](./SKIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-skin-development/SKILL.md) · [スキン一覧](https://github.com/Huddle-Up-Forge/webspeak-skins) · [Discord Voice サンプル](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice)
### 機能プラグイン `.wplugin`
機能プラグインは標準ブラウザー機能と任意の Node バックエンドを使う独立アプリです。ルート、状態、共同作業は作者が実装します。管理者はコードと依存関係を審査して有効化し、更新後は再び信頼を確認します。TS サーバーまたはインスタンス範囲に対応し、別オリジンで動作します。API v2 は v0.3.0 から利用できます。
[開発ガイド](./PLUGIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-plugin-development/SKILL.md) · [配布一覧とサンプル](https://github.com/Huddle-Up-Forge/webspeak-plugin)
<a id="troubleshooting"></a>
## トラブル対処
| 症状 | 確認する内容 |
| --- | --- |
| WebRTC を有効にしてもフォールバックする | 音声状態のエラーコード、HTTPS、UDP 範囲全体、公開メディアアドレスを確認します。TCP Tunnel はこの UDP メディア経路を転送しません。 |
| ローカルアドレス保護で接続先が拒否される | 公開モードはループバック・プライベートアドレスを制限します。同じホストの TS には、管理者が設定する固定サーバーモードを使います。 |
| 画面共有がタイムアウトする・黒いまま | 画面共有は独立した WebRTC 接続です。共有統計のネゴシエーション、ICE、コーデックを確認します。音声の接続成功だけでは画面の到達性を確認できません。 |
| 更新後にデータがない・復号できない | 元のデータディレクトリまたは volume と対応する `master.key` を使います。`docker compose down -v` で更新しないでください。 |
### ⚠️ 要件と注意
- ソースからのビルドには Node.js `>=22.12` が必要です。Docker と Release には必要な実行環境が含まれます。
- WebRTC に対応した最新の Chrome、Edge などを使用してください。マイクとウィンドウ音声には通常 HTTPS が必要です。
- WebSpeak のホストから TeamSpeak に到達できる必要があります。標準音声ポートは `9987` です。
- Web サービスは `3040/TCP` を使用します。公開時は HTTPS と WebSocket をリバースプロキシ経由で公開してください。
- IPv6 にはルーティング可能な IPv6、OS/コンテナで有効な IPv6、適切なファイアウォール設定が必要です。リテラルは `[2001:db8::1]#9987` の形式です。
- 保存したブラウザ ID は同じブラウザで同時に1接続だけ使用できます。
- BGM共有はデスクトップのみで、WebRTC が必要です。
- WebRTC の初期範囲は UDP `40000–40099` です。全体を許可し、変更前に WebRTC を無効化して保存します。
- アプリケーションの上限は 1 インスタンス 100 ブラウザーセッションです。性能保証や TS ライセンス上限を示すものではありません。
<a id="changelog"></a>
## 更新履歴
<a id="latest-release-notes"></a>
### [v0.3.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.3.0) · 2026-11-03
#### プラグインアプリ
- 独立したブラウザアプリと任意の Node バックエンドに対応するプラグイン API v2 を公開。作者がルート、状態、通信、機能を実装できます。
- GitHub ストアまたはローカルの `.wplugin` からインストール。管理者が公開・非公開設定を管理し、確認して有効化します。更新後は再度信頼の確認が必要です。
- スキンに依存しないフローティング起動ボタンとアプリライブラリを追加。ウィンドウの移動、サイズ変更、最小化、最大化、復元に対応し、最小化やライブラリへの移動でもアプリを再読み込みしません。
- アプリテンプレート、開発ガイド、Agent Skill を提供。P2P ファイル転送と動画の同時視聴は独立リポジトリで配布します。
#### スキンと許可
- 初回アクセス時に、インスタンスのサードパーティ製スキンとプラグインをまとめて確認します。接続用の認証情報は含みません。スキンメニュー末尾の「許可」から変更できます。
- 同意しない場合は昼・夜・ILLUSIA のみ利用でき、KAAK、その他のスキン、プラグイン入口は非表示になります。許可を取り消すと内蔵スキンに戻り、読み込み処理、関連コンポーネント、アプリページを停止します。
- マニフェストの権限、データ投影、ファイルハッシュ、ホスト操作の検証は維持します。管理者による確認と信頼は別途必要です。
#### 修正と更新
- ウィンドウ、画面全体、音声なしの共有で、映像のみの offer にネイティブ TS クライアントが応答しない問題を修正。必要な音声セクションを交渉しますが、マイクの収録や音声の生成は行いません。ウィンドウと画面全体での表示はユーザーの再テストで確認済みです。
- SDK を `@honeybbq/teamspeak@1.0.0-beta.23` に更新。省略可能なメンバーフィールドに対応し、発話終了を表す空の音声パケットを除外します。
- upstream の TSDNS、Query の制限時リトライ、ファイル転送、切断処理の修正を取り込みました。
- IPv6 の接続先検証、並列ログイン制限、パスワード変更時のセッション失効、信頼済みプロキシの制限、PCM 送信保護を修正しました。
- スキンの初回読み込みに実際のビルドバージョンを使用する修正を維持。デスクトップ、Web、Android のアプリバージョンを統一しました。
#### アップグレード
- API v2 は v1 のプラグインと互換性がありません。対応アプリへ更新し、確認後に有効化してください。
- 公開環境のプラグインには、管理画面で設定した独立 HTTPS オリジンと実行ポート(既定 `3042`)へのプロキシが必要です。メインサイトと同じオリジンは使用できません。
- インスタンス単位の許可を改めて選択してください。旧スキン単位の許可は同意として引き継がれません。
### [v0.2.9](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.9) · 2026-10-24
#### 機能追加
- 上流 SDK 1.0.0-beta.19 へ移行しました。通常の音声接続はクライアントのライブ一覧を使用し、Query の一覧取得権限を必要としません。
- GitHub スキンストアと、インスタンスごとのインストール、更新、有効化の管理を追加しました。Discord Voice は標準 `.wskin` の独立したサンプルとして配布します。
- 固定サーバーモードに任意の TS 管理パネルを追加しました。WebQuery、TCP または SSH Query の認証情報を設定し、サーバー、チャンネル、メンバー、サーバーグループ、BAN を管理できます。
- 中継ノードがブラウザー向けの音声接続先を公開し、音声セッションを担当できるようになりました。ゲートウェイ間の余分な転送を減らせます。
- ワークスペース保持と再接続の共通 API を追加し、KAAK に適用しました。管理画面、プロジェクトの GitHub、QQ グループへの入口も追加しました。
- TeamSpeak のチャンネル区切りに対応しました。配置、繰り返し、空白行、標準線種を扱い、表示データをスキンにも公開します。
#### 修正
- 画面共有の全画面サイズと、退出したメンバーの状態および再生リソースの解放を修正しました。
- BAN 成功時の誤った失敗表示、Query 接続の人数への混入、チャンネルパスワードのラベルを修正しました。
- 権限不足、レート制限、タイムアウトを区別します。操作成功後の更新だけが失敗した場合は別の警告を表示し、重複操作を防ぎます。
- SDK が失敗した HTTP 応答を WebQuery 成功とみなすことを防止し、DC のホーム、チャット、狭い画面の操作部品の配置を修正しました。
#### 既知の問題
- [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) のセキュリティ強化は本リリースに含まれません。PR のクローズは、報告された問題の修正完了を意味しません。
<details>
<summary>v0.2.8 以前の履歴を表示</summary>
### [v0.2.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.8) · 2026-10-17
#### 画面共有と接続の安定性
- ブラウザーと TeamSpeak ネイティブクライアント間の画面共有で、接続ネゴシエーションと映像トラックの処理を修正しました。
- チャンネルをすばやく切り替えた際の処理を改善し、クライアント状態の不整合を減らしました。
- 一部スキンコンポーネントの内容表示と KAAK の多言語表示を修正しました。
#### インターフェースの改善
- 音声デバイス名を省略せず表示し、幅が足りない場合は折り返して、長い名前を判別しやすくしました。
- アバターの代替テキストが誤って選択される問題を修正しました。
### [v0.2.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.7) · 2026-10-13
#### より開かれたスキンシステム
- より開かれたスキン編集・実行環境を提供し、任意のコンポーネントのスタイルや配置を変更したり、ウィジェットを追加したりできるようになりました。
- 音声パネルに入った後、同じブラウザーで管理画面を新しいウィンドウに開いてログインすると、スキンエディターが有効になります。
- 開発例として「KAAK」スキンを同梱しました。
- スキン開発 Agent Skill を更新しました。
#### 機能強化
- SRV レコードと TeamSpeak Nickname 形式のサーバーアドレス解決に対応しました。
- 自由モードでは複数サーバーのタブを管理できます。このボタンは「固定サーバー」モードでは使用できません。
- 画面共有にビットレート設定を追加しました。
- 入力したチャンネルパスワードを WebSpeak がブラウザーに保存するようになりました。
- ロックされたチャンネルの前に鍵アイコンを表示します。
- チャット履歴を永続的に保存するようになりました。
#### バグ修正
- アドレス解析の不具合を修正しました。
- 音量操作とメンバーカードのドラッグでフォーカスが競合する問題を修正しました。
- ユーザーステータスが誤って「不明」と解析される問題を修正しました。
### [v0.2.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.6) · 2026-10-08
0.2.5 から音声ゲートウェイ、共有プロトコル、音声ワークスペース、管理モジュールを大規模に再構成。#6/#7/#10 を修正し、#9/#12 を実装。PR #13 が報告した既存 TS6 画面共有の検出漏れも修正しました。Opus、セッションのライフサイクル、モバイル操作を改善。Windows x64、Linux x64/ARM64、Docker amd64/arm64、Android arm64-v8a/armeabi-v7a/x86_64 APK を提供。
### [v0.2.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.5) · 2026-09-27
`.wskin` スキン、管理者向けの有効化/デフォルト設定、保護された昼・夜・ILLUSIA 内蔵スキンを追加。未完成の Aurora Voice サンプルを削除し、読み込み時のちらつき、ダークモードの視認性、音声画面のアートレイヤーを修正。公式スキン開発 Agent Skill も追加しました。
### [v0.2.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.4) · 2026-09-22
ブラウザと TeamSpeak 6 ネイティブクライアント間のクロスプラットフォーム P2P 画面共有を追加しました。STUN/外部 TURN 設定、プレーヤーと視聴者状態、1080p/60 FPS 取得設定、WebRTC 統計に対応し、共有操作と訪問者番号も改善しました。
### [v0.2.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.3) · 2026-09-19
チャンネルメンバーの移動操作と権限に応じた直接移動を追加し、アバター表示、ミュート状態の同期、保存 ID の復元に対応しました。5 言語のスクリーンショットとドキュメントも更新しました。
### [v0.2.2](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.2) · 2026-09-17
ブラウザ側マイクノイズ抑制、ロシア語・日本語 UI、言語別ウェルカム文を追加。音量操作と PR #2 を基にしたエラー表示・エラーコードを改善しました。
### [v0.2.1](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.1) · 2026-09-13
接続エラー表示を改善し、IPv6 接続先を標準対応しました。
### [v0.2.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.0) · 2026-09-10
パスワード案内、正式な中継モード、複数中継選択、接続診断を追加しました。
### [v0.1.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.8) · 2026-09-08
Docker 起動を簡略化し、15秒の接続タイムアウトと継続的なネットワーク監視を追加しました。
### [v0.1.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.7) · 2026-09-06
ドイツ語、Telegram、ネットワーク統計、全体音量を追加し、BGM 音量の変動を修正しました。
### [v0.1.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.6) · 2026-09-04
ウィンドウ・タブ音声の共有、ID 保持の案内、サイトアイコンを追加し、WebRTC のメンバー別音量を修正しました。
### [v0.1.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.5) · 2026-09-04
ID 保存処理を修正し、テーマ切り替えを改善しました。
### [v0.1.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.4) · 2026-09-03
WebRTC とチャンネルチャットを修正し、管理画面、ログ、モバイル配置を改善しました。
### [v0.1.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.3) · 2026-09-03
内蔵 WebRTC を追加し、TeamSpeak SDK を移行しました。メンバー同期と音声バッファーを改善しました。
</details>
<a id="contributors"></a>
## 貢献者と主な貢献
<details>
<summary>上流作者と PR の貢献を表示</summary>
上流 SDK の作者、マージ済みの GitHub PR、および独立配布のスキンパッケージへ移植された原作の貢献を記載しています。
- [HoneyBBQ](https://github.com/HoneyBBQ) — 上流 SDK [teamspeak-js(`@honeybbq/teamspeak`)](https://github.com/HoneyBBQ/teamspeak-js) の作者。WebSpeak の TeamSpeak プロトコル通信を支えるクライアントライブラリを提供。
- [ph1gros](https://github.com/ph1gros) — [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) で IPv6 接続先検証、管理者認証とセッション、プロキシ配下の制限、PCM 送信境界の問題を報告し、修正案と回帰テストを提供。元のパッチは直接マージせず、`dev` で改めて修正を実装しました。
- [LainHE](https://github.com/LainHE) — [マージ済み PR #2、#8、#28、#31–#35、#37、#38、#40](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ALainHE)。ブラウザのエラー翻訳、拡大縮小とホームのレイアウト、画面共有のビットレートと視聴者アバター、中継先の検証と再接続、信頼済みプロキシの扱い、接続失敗の通知、音声エラー報告、WebRTC 失敗時のリソース解放を改善。
- [TimmySheep](https://github.com/TimmySheep) — [マージ済み PR #13、#15–#24](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ATimmySheep)。既存 TS6 共有の検出、画面比率、モバイル音声・画面点灯・スキンメニュー、ID のチャンネル設定、PWA/テーマ、チャット履歴、メンバー音声状態、マイク権限などに貢献。
- [yichen11818](https://github.com/yichen11818) — [PR #25](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/25) で TeamSpeak の登録済みニックネーム接続と接続先の保持に対応し、[PR #51](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/51) で初回接続後の KAAK ワークスペース保持と再接続を改善。[PR #27](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/27) と [PR #52](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/52) では Discord スキンの原作デザインと実装を提供(コミット名義 **yumi**)。その後、WebSpeak プロジェクトが[独立配布の `.wskin` スキン](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice)へ移植。
</details>
## コミュニティと関連プロジェクト
[GitHub Issues](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/issues) · [QQ グループ 869500475](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=yhumUMDD9PmyYFWdXWUb_x7hM5trFQY8&authKey=Pw3HBGT7GwMinTQnuFGfnpf0aRSzXOJKcAiujVP1%2BXMpjheAKrncTRivicBJxpjV&noverify=0&group_code=869500475) · [Telegram](https://t.me/+8qShpTcuN9A3MWY9)
[NeteaseTSBot](https://github.com/yichen11818/NeteaseTSBot):複数サービスの再生と Web コンソールに対応した TeamSpeak 音楽ボット。
## ライセンス
WebSpeak は [AGPL-3.0-only](../LICENSE) で公開しています。依存ライブラリのライセンスと帰属は各上流プロジェクトを参照してください。
<p align="right"><a href="#readme-top">先頭へ ↑</a></p>
+452
View File
@@ -0,0 +1,452 @@
<a id="readme-top"></a>
<div align="center">
<img src="./assets/webspeak-logo.png" alt="WebSpeak" width="88" />
<h1>WebSpeak · Русский</h1>
<p><strong>Ваше сообщество TeamSpeak — прямо в браузере.</strong></p>
<p><a href="../README.md">Главная проекта</a> · <a href="./README.zh-CN.md">简体中文</a> · <a href="./README.en.md">English</a> · <a href="./README.de.md">Deutsch</a> · <a href="./README.ja.md">日本語</a></p>
<p>
<a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest"><img src="https://img.shields.io/github/v/release/EchoSixHIYA/WebSpeak-client-for-TeamSpeak?style=flat-square&amp;color=0f766e" alt="Release" /></a>
<a href="../LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0--only-0f766e?style=flat-square" alt="AGPL-3.0-only" /></a>
</p>
</div>
WebSpeak — самостоятельно размещаемый браузерный клиент и голосовой шлюз для TeamSpeak 3 и TeamSpeak 6. Пользователи подключаются к голосу, чату и демонстрации экрана через браузер, а оператор управляет серверами, доступом и данными в веб-консоли.
Стабильный выпуск: [изменения v0.3.0](#latest-release-notes) · [Скачать](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest). API v2, плавающие приложения и единое разрешение для экземпляра.
[Онлайн-демо](#demo) · [Возможности](#features) · [Скриншоты](#screenshots) · [Развёртывание](#deployment) · [Управление](#administration) · [Расширенные настройки](#advanced) · [Скины и плагины](#extensions) · [Решение проблем](#troubleshooting) · [История изменений](#changelog)
<a id="demo"></a>
## Онлайн-демо
- [Шанхай · shanghai.webspeak.online](https://shanghai.webspeak.online)
- [Гонконг · webspeak.online](https://webspeak.online)
Попробуйте главную страницу и голосовое пространство. Сеть, нагрузка и доступность демонстрационных узлов могут меняться.
<a id="features"></a>
## Возможности
| Возможность | Описание |
| --- | --- |
| Голос | Opus, необязательный WebRTC и резервный WebSocket; отключение микрофона, VOX, выбор устройств, шумоподавление в браузере и громкость участников. |
| Каналы и сообщения | Дерево и разделители каналов TeamSpeak, состояние участников, переходы, чат канала/сервера/личный чат, толчки, шёпот и локальная история. |
| Экран и аудио | Обмен экраном между браузерами и поддерживаемыми нативными клиентами TeamSpeak 6, настройки качества, битрейта и статистика; звук окна или вкладки на компьютере. |
| Идентичность и подключения | Сохранение идентичности, импорт/экспорт TS3, избранное и история, разрешение SRV и Nickname, IPv4/IPv6 и приглашения. |
| Управление экземпляром | Фиксированные или открытые цели, доступ, приглашения, сессии, журналы, диагностика, резервные копии и необязательное управление TeamSpeak. |
| Скины и интерфейс | Дневная, ночная, ILLUSIA и KAAK, пакеты `.wskin` через GitHub, пять языков и адаптивная вёрстка. |
| Распределённый голос | Браузер подключается напрямую к выбранному голосовому ретранслятору, сохраняя URL входного экземпляра. |
| Развёртывание | Docker amd64/arm64, серверные пакеты Windows x64 и Linux x64/ARM64, а также предварительные Android APK. |
### Совместимость версий TeamSpeak
Голосовые соединения используют стандартный клиентский протокол TeamSpeak и не требуют учётных данных Query. Необязательное управление TS использует отдельные данные WebQuery / ServerQuery.
- **TeamSpeak 3**: определение распознаёт ведущую версию `3.x`. Старые версии сервера следует проверять отдельно в конкретной среде: не каждая историческая версия тестировалась независимо.
- **TeamSpeak 6**: поддерживается, включая демонстрацию экрана с нативными клиентами TeamSpeak 6.
- **Автоопределение**: шлюз читает ответ сервера `version` и записывает распознанный протокол в диагностику подключения.
- Шлюз использует upstream SDK `1.0.0-beta.23` [`@honeybbq/teamspeak`](https://github.com/HoneyBBQ/teamspeak-js); WebSpeak рассчитан на TeamSpeak 3 и 6.
<a id="screenshots"></a>
## Скриншоты
![WebSpeak · Голосовое пространство](./screenshots/webspeak-ru.png)
<details>
<summary>Показать главную страницу, настройки аудио и меню участника</summary>
### Главная страница
![WebSpeak · Главная страница](./screenshots/webspeak-ru-home.png)
### Настройки аудио
![WebSpeak · Настройки аудио](./screenshots/webspeak-ru-audio.png)
### Меню участника
![WebSpeak · Меню участника](./screenshots/webspeak-ru-menu.png)
</details>
<a id="deployment"></a>
## Развёртывание и первый запуск
Compose использует `network_mode: host` и рассчитан на Linux-хосты Docker. Для сервера Windows используйте пакет Release.
| Способ | Подходит для |
| --- | --- |
| Docker Compose | Постоянного сервера и простых обновлений |
| Пакет Release | Запуска без Node.js и инструментов сборки |
| Из исходников | Разработки и настройки проекта |
### Docker Compose
```bash
git clone --depth 1 https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
docker compose pull
docker compose up -d
```
После запуска откройте `http://<ваш-хост>:3040/admin`, войдите с `admin` / `admin`, сразу смените пароль и настройте TeamSpeak. Данные хранятся в volume `webspeak-data`. Не используйте `docker compose down -v`, если не хотите удалить базу и настройки.
```bash
docker compose ps
docker compose logs -f webspeak
```
Обновление с сохранением данных:
```bash
git pull --ff-only
docker compose pull
docker compose up -d
```
### Пакет Release
Скачайте подходящий пакет `windows-x64.zip`, `linux-x64.tar.gz` или `linux-arm64.tar.gz` из [Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest) и запустите приложенный скрипт. Docker поддерживает amd64/arm64. Также доступны Android APK для `arm64-v8a`, `armeabi-v7a` и `x86_64`; они подписаны отладочным ключом для ручной установки и тестирования, а не для Google Play. Голос TeamSpeak на реальных устройствах пока не проверен.
### Из исходников
```bash
git clone https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
npm ci --ignore-scripts
npm rebuild @discordjs/opus --foreground-scripts
npm --prefix web ci
npm run web:build
npm run build
npm start
```
Для сборки нужны Node.js `>=22.12`, Python, Make и компилятор C/C++.
### Первый запуск
1. Откройте `http://<your-host>:3040/admin`.
2. Войдите с `admin` / `admin` и сразу задайте новый пароль длиной не менее 12 символов.
3. В разделе **Сервер** настройте цель, например `voice.example.com#9987`, и режим доступа.
4. Для публичного доступа настройте HTTPS; при включении WebRTC откройте весь указанный диапазон UDP.
### HTTPS и постоянные данные
Публичную страницу и WebSocket следует предоставлять по HTTPS. Например, направьте свой домен на хост и настройте Caddy как обратный прокси:
```caddyfile
webspeak.example.com {
reverse_proxy 127.0.0.1:3040
}
```
Замените домен примера своим. Рабочий обратный прокси или Tunnel не гарантирует доступность UDP-медиа; см. [расширенные настройки](#advanced). Пакеты и исходники используют `data/`, Docker — volume `webspeak-data`. При переносе и резервном копировании сохраняйте вместе `webspeak.db` и соответствующий `master.key`.
<a id="administration"></a>
## Панель администратора
Откройте `/admin` для управления серверами, доступом, WebRTC, ретрансляторами, приглашениями, активными сессиями, журналами и резервными копиями. Магазин скинов: `/admin/skins`; магазин функциональных плагинов: `/admin/plugins`.
### Необязательное управление TeamSpeak
Панель WebSpeak и голосовые соединения работают независимо от этой функции. В режиме фиксированного сервера откройте `/admin/ts-admin` для настройки управления TS.
1. Включите WebQuery на сервере TS и попросите уполномоченного администратора TS создать API-ключ. Укажите HTTP/HTTPS-адрес WebQuery и ключ. Это Query-служба TS, а не сайт WebSpeak. Поддерживаются TS3 начиная с 3.12 и TS6.
2. ID виртуального сервера `0` выбирает сервер по голосовому порту фиксированной цели. Для ограниченного ключа укажите разрешённый ID. Ключ чтения позволяет просматривать данные; изменения требуют области с правом записи и соответствующих прав TS.
3. Можно выбрать ServerQuery SSH или ServerQuery TCP для TS3. Укажите Query-хост (пустое поле использует фиксированную цель), порт, имя пользователя и пароль; SSH также требует доверенный отпечаток ключа хоста. Это не SSH-вход в операционную систему. TCP не шифруется и подходит только для доверенных сетей. HTTPS-сертификат должен быть доверенным для шлюза.
4. Сохраните и подключитесь или обновите данные. Доступны настройки сервера, управление каналами, перемещение/исключение/блокировка участников, назначение групп и снятие блокировок. Действия требуют подтверждения и проверяются TS; списки обновляются вручную.
Учётные данные хранятся на сервере в зашифрованном виде и не возвращаются API. Сохраняйте базу данных вместе с `master.key`. Ошибка управления не влияет на панель WebSpeak и голос. Блокировка по UID не затрагивает других пользователей с общим IP шлюза.
<a id="advanced"></a>
## Расширенные настройки
### WebRTC
Включается в **Панель администратора → Сервер → Расширенные настройки**. До включения задайте диапазон UDP-портов (по умолчанию `40000–40099`), откройте его в firewall и сохраните. При включённом WebRTC диапазон заблокирован; новые подключения используют WebRTC, а неподдерживаемые браузеры переходят на совместимый транспорт. Для публичного доступа нужен HTTPS.
### Голосовой WebRTC за обратным прокси или TCP Tunnel
В **Сервер → Расширенные настройки** задайте **публичный адрес медиа**: доступный по UDP IP или домен голосового шлюза без схемы, пути и порта. Он заменяет адрес, определяемый по запросу страницы. Домен прокси не обязательно доступен для медиатрафика.
**IPv6-кандидаты** включаются отдельно и сохраняют IPv4; необходимы маршрутизация IPv6 и правила firewall. В поле **голосовой STUN** можно указать `stun:turn.teamspeak.com:3478`: браузер и шлюз используют один сервис. Пустое поле сохраняет прежнее поведение: встроенный STUN библиотеки шлюза и отсутствие STUN в браузере. Поле принимает доступный по IPv4 UDP STUN с доменом или IPv4, но не IPv6-литералы и не учётные данные TURN.
Сохраните настройки и подключитесь заново. Откройте весь диапазон UDP и сохраняйте номера портов при статическом пробросе. STUN обнаруживает отображения адресов, но не ретранслирует звук. Один TCP Tunnel без доступного UDP/IPv6 не предотвращает переход на совместимый транспорт.
### ICE для демонстрации экрана
Медиа демонстрации экрана по-прежнему предпочитает прямое соединение между браузерами; WebSpeak только передаёт сигнальные сообщения. По умолчанию используются публичные STUN-серверы TeamSpeak для поиска внешних кандидатов, STUN не передаёт медиаданные. Авторизованный внешний TURN можно задать через `WEBSPEAK_SCREEN_SHARE_ICE_SERVERS` в виде JSON-массива, например:
```json
[{"urls":"stun:turn.teamspeak.com:3478"},{"urls":"turns:turn.example.com:5349","username":"<username>","credential":"<credential>"}]
```
При настроенном TURN медиа может идти через этот внешний сервис, но не через шлюз WebSpeak. Без TURN используются только прямые ICE-пути и STUN.
### Кроссплатформенная P2P-трансляция экрана
Пользователи браузера и нативные клиенты TeamSpeak 6 могут обнаруживать, запускать и смотреть трансляции друг друга. Между браузерами, а также между браузером и нативным клиентом, экран передаётся по прямому соединению WebRTC/ICE, когда это возможно; WebSpeak отвечает за авторизацию сессии, состояние трансляции и передачу SDP/ICE-сигналов, но не переносит медиаданные экрана. Интерфейс показывает статус трансляции и число зрителей и предоставляет регулировку громкости, полноэкранный режим и выход. Для захвата доступны настройки до 1080p и 60 FPS, а также статистика WebRTC.
### Ретрансляторы
Входной шлюз выдаёт подписанный одноразовый билет, после чего браузер подключается прямо к голосовому шлюзу ретранслятора, а тот — к TeamSpeak. URL страницы остаётся прежним. Узел не предоставляет главную страницу и панель администратора.
<details>
<summary>Запуск и настройка ретранслятора</summary>
```bash
docker run -d --name webspeak-relay --restart unless-stopped --network host \
-e WEBSPEAK_MODE=relay \
-e WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token' \
-e WEBSPEAK_RELAY_PORT='39087' \
-e WEBSPEAK_RELAY_WEBRTC_PUBLIC_HOST='relay.example.com' \
ghcr.io/echosixhiya/webspeak:latest
```
Используйте случайный общий токен длиной не менее 16 символов. Голосовой шлюз слушает `127.0.0.1:3041`; направьте на него HTTPS/WSS-домен через Caddy:
```caddyfile
relay.example.com {
reverse_proxy 127.0.0.1:3041
}
```
В **Сервер → Ретрансляторы** входного экземпляра задайте имя, UDP-адрес `relay.example.com#39087`, голосовой адрес `https://relay.example.com` и тот же токен. После сохранения посетитель выбирает прямое подключение или узел. Откройте UDP `39087` и WebRTC `40000–40099`; публичный адрес медиа должен разрешаться непосредственно в доступный ретранслятор, а не в HTTP-прокси.
Для запуска из исходников или пакета задайте те же переменные. После сборки выполните `node dist/index.js`, а в пакете — `./runtime/node ./dist/index.js` (Windows: `.\runtime\node.exe .\dist\index.js`).
</details>
### Зависимости
Ретранслятор встроен в WebSpeak и использует стандартные библиотеки Node.js. WebRTC использует [werift](https://github.com/shinyoshiaki/werift-webrtc) `0.24.4`. TeamSpeak использует upstream [HoneyBBQ/teamspeak-js](https://github.com/HoneyBBQ/teamspeak-js), пакет `@honeybbq/teamspeak@1.0.0-beta.23`; сборка форка не нужна.
<a id="extensions"></a>
## Скины и функциональные плагины
### Пакеты скинов `.wskin`
Скины задают оформление, компоновку и связанные виджеты. Администратор устанавливает, включает и выбирает скин по умолчанию. Авторы используют публичный интерфейс без изменения исходников WebSpeak.
[Руководство](./SKIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-skin-development/SKILL.md) · [Каталог скинов](https://github.com/Huddle-Up-Forge/webspeak-skins) · [Пример Discord Voice](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice)
### Функциональные плагины `.wplugin`
Функциональные плагины — самостоятельные приложения с API браузера, необязательными сервисами Node, своими маршрутами, данными и совместной работой. Администратор проверяет код и зависимости перед включением; обновления требуют повторного доверия. Приложения работают на отдельном источнике в области TS-сервера или экземпляра. API v2 доступен начиная с v0.3.0.
[Руководство](./PLUGIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-plugin-development/SKILL.md) · [Каталог распространения и пример](https://github.com/Huddle-Up-Forge/webspeak-plugin)
<a id="troubleshooting"></a>
## Решение проблем
| Проблема | Что проверить |
| --- | --- |
| WebRTC включён, но используется резервный транспорт | Код ошибки голосового статуса, HTTPS, весь диапазон UDP и публичный адрес медиа. TCP Tunnel не переносит этот UDP-трафик. |
| Цель заблокирована как локальный адрес | Открытый режим ограничивает loopback и частные адреса. Для TS на том же хосте используйте настроенный администратором режим фиксированного сервера. |
| Тайм-аут или чёрный экран трансляции | Экран использует отдельное WebRTC-соединение. Проверьте согласование, ICE и кодек в статистике трансляции; работающий голос не подтверждает доступность видео. |
| После обновления нет данных или они не расшифровываются | Используйте прежний каталог/volume и соответствующий `master.key`. Не обновляйте через `docker compose down -v`. |
### ⚠️ Требования и замечания
- Node.js `>=22.12` нужен для сборки из исходников; Docker и Release уже содержат необходимые компоненты.
- Нужен современный Chrome, Edge или другой браузер с WebRTC. Микрофон и звук окна обычно требуют HTTPS.
- WebSpeak должен иметь доступ к TeamSpeak; стандартный голосовой порт — `9987`.
- Веб-сервис использует `3040/TCP`; для публичного сайта направьте HTTPS и WebSocket через обратный прокси.
- Для IPv6 нужен маршрутизируемый IPv6, включённый IPv6 в ОС/контейнере и правила firewall. Литерал задаётся как `[2001:db8::1]#9987`.
- Одна сохранённая браузерная идентичность может использоваться только одним активным подключением.
- Фоновая музыка доступна только на компьютере и требует WebRTC.
- WebRTC использует UDP `40000–40099` по умолчанию; откройте весь диапазон. Для смены диапазона сначала выключите WebRTC и сохраните.
- Лимит приложения — 100 активных браузерных сессий на экземпляр; это не гарантия производительности и не лимит лицензии TS.
<a id="changelog"></a>
## История изменений
<a id="latest-release-notes"></a>
### [v0.3.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.3.0) · 2026-11-03
#### Приложения-плагины
- Выпущен API v2 для самостоятельных браузерных приложений и необязательных Node-бэкендов со своими маршрутами, состоянием, обменом данными и логикой.
- Установка через магазин GitHub или локальные `.wplugin`. Администратор проверяет приложения, задаёт публичные/закрытые настройки и включает их; обновление требует повторного подтверждения доверия.
- Добавлены независимые от темы плавающий вход и библиотека приложений. Окна можно перемещать, изменять в размере, сворачивать и разворачивать; сворачивание и возврат в библиотеку не перезагружают приложение.
- Добавлены шаблон, руководство и Agent Skill. P2P-передача файлов и совместный просмотр видео распространяются в отдельных репозиториях.
#### Темы и разрешение
- При первом входе запрашивается единое разрешение для сторонних тем и плагинов экземпляра, без учётных данных подключения. Последний пункт меню тем позволяет изменить решение.
- Без согласия доступны только дневная, ночная и ILLUSIA; KAAK, другие сторонние темы и вход в плагины скрыты. Отзыв разрешения возвращает встроенную тему, отменяет загрузки и останавливает связанные компоненты и страницы приложений.
- Сохраняются права манифеста, фильтрация данных, проверка хешей и действий хоста. Проверка и доверие администратора остаются отдельными.
#### Исправления и обновления
- Исправлено отсутствие ответа нативного TS-клиента на offer только с видео при показе окна, всего экрана или без звука. Добавляется необходимая аудиосекция без захвата микрофона и создания звука. Пользователь подтвердил изображение при показе окна и экрана.
- SDK обновлён до `@honeybbq/teamspeak@1.0.0-beta.23`; учтены необязательные поля участников и пустые пакеты конца речи.
- Включены исправления TSDNS, повторов Query при ограничении частоты, передачи файлов и завершения соединений из upstream.
- Включены исправления проверки IPv6-целей, параллельных входов, отзыва сеансов после смены пароля, ограничений через доверенные прокси и защиты PCM-входа.
- Сохранено исправление первой загрузки темы с фактической версией сборки. Версии приложения для настольных платформ, веба и Android согласованы.
#### Обновление
- API v2 несовместим с пакетами v1. Обновите приложения, проверьте и включите их заново.
- Для публичных плагинов нужен отдельный HTTPS-origin, настроенный в панели администратора и направленный на порт среды выполнения (по умолчанию `3042`). Основной сайт и приложения не должны использовать один origin.
- Пользователю нужно заново выбрать разрешение для экземпляра; старые разрешения отдельных тем не считаются согласием.
### [v0.2.9](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.9) · 2026-10-24
#### Новые возможности
- Переход на upstream SDK 1.0.0-beta.19. Обычные голосовые подключения используют актуальный каталог клиентов без разрешений Query на получение списков.
- Добавлен магазин скинов GitHub с установкой, обновлением и управлением доступностью для экземпляра. Discord Voice распространяется отдельно как стандартный пример `.wskin`.
- В режиме фиксированного сервера доступна необязательная панель TS: учётные данные WebQuery, TCP или SSH Query позволяют управлять сервером, каналами, участниками, серверными группами и блокировками.
- Ретрансляторы могут предоставлять браузеру прямую голосовую точку подключения и обслуживать голосовую сессию без лишнего перехода через основной шлюз.
- Добавлены общие интерфейсы сохранения рабочего пространства и переподключения; KAAK использует их и предлагает вход в администрирование, GitHub проекта и группу QQ.
- Поддержаны разделители каналов TeamSpeak: выравнивание, повторяемое заполнение, пустые строки и стандартные линии. Данные оформления доступны скинам.
#### Исправления
- Исправлены размер полноэкранного показа экрана и очистка состояния и ресурсов воспроизведения ушедших участников.
- Успешная блокировка больше не отображается как ошибка; Query-подключения исключены из числа участников, исправлена подпись пароля канала.
- Разделены ошибки разрешений, ограничения частоты и тайм-аута. Ошибка обновления после успешной операции показывается отдельно, чтобы избежать повторного выполнения.
- Добавлена защита от ошибочного распознавания SDK неуспешных HTTP-ответов как успешных результатов WebQuery; исправлена компоновка DC на главной странице, в чате и на узких экранах.
#### Известные проблемы
- Усиление безопасности из [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) не вошло в выпуск; закрытие PR не означает исправления описанных проблем.
<details>
<summary>Показать v0.2.8 и более ранние версии</summary>
### [v0.2.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.8) · 2026-10-17
#### Демонстрация экрана и стабильность соединения
- Исправлены согласование соединения и обработка видеопотока при демонстрации экрана между браузерами и нативными клиентами TeamSpeak.
- Улучшена обработка быстрых переключений каналов, чтобы избежать несогласованного состояния клиента.
- Исправлено отображение содержимого некоторых компонентов скинов и локализации KAAK.
#### Улучшения интерфейса
- Названия аудиоустройств теперь отображаются полностью и переносятся при нехватке места, чтобы длинные названия было легче различать.
- Исправлено случайное выделение текста-заглушки аватара.
### [v0.2.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.7) · 2026-10-13
#### Более открытая система скинов
- Более открытый редактор и среда выполнения скинов позволяют настраивать стиль и расположение любых компонентов, а также добавлять виджеты.
- Откройте голосовую панель, затем в том же браузере откройте новое окно панели администратора и войдите в систему, чтобы активировать редактор скинов.
- Скин KAAK включён в комплект как пример для разработки.
- Обновлён Agent Skill по разработке скинов.
#### Улучшения функций
- Добавлено разрешение серверных адресов через записи SRV и записи TeamSpeak Nickname.
- В свободном режиме можно управлять вкладками нескольких серверов; эти кнопки недоступны в режиме фиксированного сервера.
- Добавлен выбор битрейта демонстрации экрана.
- WebSpeak теперь сохраняет введённые пароли каналов в браузере.
- Перед закрытыми паролем каналами отображается значок замка.
- История чата теперь хранится постоянно.
#### Исправления ошибок
- Исправлена ошибка разбора адресов.
- Устранён конфликт фокуса между регулировкой громкости и перетаскиванием карточек участников.
- Исправлена ошибочная классификация состояния пользователя как неизвестного.
### [v0.2.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.6) · 2026-10-08
Относительно 0.2.5 масштабно перестроены голосовой шлюз, общие протоколы, голосовая область и модули администратора; исправлены #6/#7/#10, реализованы #9/#12 и случай с обнаружением уже активной демонстрации TS6 из PR #13. Улучшены Opus, жизненные циклы сессий и мобильное управление. Пакеты: Windows x64, Linux x64/ARM64, Docker amd64/arm64, Android arm64-v8a/armeabi-v7a/x86_64.
### [v0.2.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.5) · 2026-09-27
Добавлены скины `.wskin`, управление включением и темой по умолчанию, а также защищённые темы «День», «Ночь» и ILLUSIA; удалён незавершённый пример Aurora Voice, исправлены мерцание при загрузке скина, контраст элементов в тёмном режиме и слои иллюстраций в голосовом пространстве; добавлен официальный Agent Skill для разработки скинов.
### [v0.2.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.4) · 2026-09-22
Добавлена кроссплатформенная P2P-трансляция экрана между браузерами и нативными клиентами TeamSpeak 6; добавлены настройка STUN/внешнего TURN, проигрыватель и состояние зрителей, захват до 1080p/60 FPS и статистика WebRTC; улучшено управление трансляцией и добавлен номер посетителя.
### [v0.2.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.3) · 2026-09-19
Добавлены управление перемещением участников и прямое перемещение с учётом прав; поддержаны аватары, синхронизация микрофона и восстановление идентичности; обновлены скриншоты и документация для пяти языков.
### [v0.2.2](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.2) · 2026-09-17
Добавлены браузерное шумоподавление микрофона, русский и японский интерфейсы и отдельные тексты приветствия; улучшены управление громкостью и сообщения/коды ошибок на основе PR #2.
### [v0.2.1](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.1) · 2026-09-13
Улучшены ошибки на странице входа и добавлена поддержка IPv6-целей по умолчанию.
### [v0.2.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.0) · 2026-09-10
Добавлены подсказки пароля, режим ретранслятора, выбор нескольких узлов и диагностика подключений.
### [v0.1.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.8) · 2026-09-08
Упрощён Docker-запуск, добавлен тайм-аут подключения 15 секунд и непрерывный сетевой мониторинг.
### [v0.1.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.7) · 2026-09-06
Добавлены немецкий язык, Telegram, панель сетевой статистики и общая громкость; исправлены колебания громкости фоновой музыки.
### [v0.1.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.6) · 2026-09-04
Добавлены передача звука окна/вкладки, напоминание о сохранении идентичности и значок сайта; исправлена индивидуальная громкость в WebRTC.
### [v0.1.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.5) · 2026-09-04
Исправлено сохранение идентичности и улучшено переключение тем.
### [v0.1.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.4) · 2026-09-03
Исправлены WebRTC и чат канала, улучшены панель управления, журналы и мобильная компоновка.
### [v0.1.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.3) · 2026-09-03
Добавлен встроенный WebRTC, заменён TeamSpeak SDK, улучшены синхронизация участников и буферизация голоса.
</details>
<a id="contributors"></a>
## Участники и вклад в проект
<details>
<summary>Показать авторов SDK и вклад через PR</summary>
Список отмечает автора SDK, используемого в основе проекта, вклад через объединённые PR на GitHub и исходные работы, перенесённые в отдельно распространяемые пакеты скинов.
- [HoneyBBQ](https://github.com/HoneyBBQ) — Автор SDK [teamspeak-js (`@honeybbq/teamspeak`)](https://github.com/HoneyBBQ/teamspeak-js), который предоставляет используемый WebSpeak клиент протокола TeamSpeak.
- [ph1gros](https://github.com/ph1gros) — В [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) сообщил о проблемах безопасности и предложил исправления с регрессионными тестами для проверки IPv6, входа и сессий администратора, лимитов за прокси и PCM-аудио. Исходный патч не объединён напрямую; исправления реализованы заново в `dev`.
- [LainHE](https://github.com/LainHE) — [объединённые PR #2, #8, #28, #31–#35, #37, #38 и #40](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ALainHE): переводы ошибок браузера, масштабирование и компоновка главной страницы, битрейт трансляции и аватары зрителей, проверка целей и восстановление ретранслятора, доверенные прокси, передача ошибок подключения, сообщения об ошибках аудио и освобождение ресурсов при сбоях WebRTC.
- [TimmySheep](https://github.com/TimmySheep) — [объединённые PR #13 и #15–#24](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ATimmySheep): обнаружение активных трансляций TS6, пропорции экрана, мобильное аудио/подсветка экрана/меню скинов, канал в настройках идентичности, PWA/темы, история чата, состояние аудио участников и разрешение микрофона.
- [yichen11818](https://github.com/yichen11818) — [PR #25](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/25) добавил подключение по зарегистрированным именам TeamSpeak с сохранением имени цели; [PR #51](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/51) улучшил сохранение рабочего пространства KAAK и повторное подключение после первого соединения. [PR #27](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/27) и [PR #52](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/52) содержали исходный дизайн и реализацию скина Discord (автор коммитов **yumi**), которые проект WebSpeak перенёс в [отдельно распространяемый скин `.wskin`](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice).
</details>
## Сообщество и проекты
[GitHub Issues](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/issues) · [QQ-группа 869500475](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=yhumUMDD9PmyYFWdXWUb_x7hM5trFQY8&authKey=Pw3HBGT7GwMinTQnuFGfnpf0aRSzXOJKcAiujVP1%2BXMpjheAKrncTRivicBJxpjV&noverify=0&group_code=869500475) · [Telegram](https://t.me/+8qShpTcuN9A3MWY9)
[NeteaseTSBot](https://github.com/yichen11818/NeteaseTSBot) — музыкальный бот TeamSpeak с поддержкой разных платформ и веб-консолью.
## Лицензия
WebSpeak распространяется по [AGPL-3.0-only](../LICENSE). Лицензии и авторство сторонних зависимостей указаны в соответствующих проектах.
<p align="right"><a href="#readme-top">Наверх ↑</a></p>
+521
View File
@@ -0,0 +1,521 @@
<a id="readme-top"></a>
<div align="center">
<img src="./assets/webspeak-logo.png" alt="WebSpeak" width="88" />
<h1>WebSpeak · 简体中文</h1>
<p><strong>打开浏览器,就能加入你的 TeamSpeak。</strong></p>
<p><a href="../README.md">项目首页</a> · <a href="./README.en.md">English</a> · <a href="./README.de.md">Deutsch</a> · <a href="./README.ru.md">Русский</a> · <a href="./README.ja.md">日本語</a></p>
<p>
<a href="https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest"><img src="https://img.shields.io/github/v/release/EchoSixHIYA/WebSpeak-client-for-TeamSpeak?style=flat-square&amp;color=0f766e" alt="Release" /></a>
<a href="../LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0--only-0f766e?style=flat-square" alt="AGPL-3.0-only" /></a>
</p>
</div>
WebSpeak 是可自行部署的 TeamSpeak 3 / TeamSpeak 6 网页客户端与语音网关。用户通过浏览器加入语音、聊天和屏幕共享;部署者通过管理员控制台管理目标服务器、访问策略和数据。
稳定版:[v0.3.0 更新日志](#latest-release-notes) · [下载发布包](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest)。包含功能插件 API v2、悬浮应用界面和实例统一授权。
[在线演示](#demo) · [功能](#features) · [界面预览](#screenshots) · [部署](#deployment) · [管理](#administration) · [高级配置](#advanced) · [皮肤与插件](#extensions) · [常见问题](#troubleshooting) · [更新日志](#changelog)
<a id="demo"></a>
## 在线演示
- [上海 · shanghai.webspeak.online](https://shanghai.webspeak.online)
- [香港 · webspeak.online](https://webspeak.online)
可直接体验欢迎页与语音工作区。演示节点的网络、负载和可用性会变化。
<a id="features"></a>
## 主要功能
| 能力 | 说明 |
| --- | --- |
| 实时语音 | Opus 音频、可选 WebRTC、兼容 WebSocket 回退;支持闭麦、VOX、设备选择、浏览器降噪和成员独立音量。 |
| 频道与消息 | 频道树、TeamSpeak 频道分隔栏、成员状态、频道切换、频道/服务器/私聊消息、戳一戳、耳语及本地聊天历史。 |
| 屏幕与音频共享 | 浏览器之间及与受支持的 TeamSpeak 6 原生客户端共享屏幕;提供采集质量、码率和统计面板,桌面端还可分享窗口或标签页音频。 |
| 身份与连接 | 身份保持、TS3 身份导入/导出、收藏和历史连接、SRV 与 Nickname 地址解析、IPv4/IPv6 及邀请链接。 |
| 实例管理 | 固定或公开目标、访问策略、邀请、会话、日志、诊断、备份及可选的 TeamSpeak 管理连接。 |
| 皮肤与界面 | 日间、夜间、ILLUSIA 和 KAAK;可通过 GitHub 皮肤商店管理 `.wskin` 包,支持五种语言和响应式布局。 |
| 分布式语音 | 配置中继后,浏览器直接连接所选中继的语音网关,网页地址仍保留在入口实例。 |
| 部署方式 | Docker amd64/arm64、Windows x64 与 Linux x64/ARM64 发布包;另有 Android 预览 APK。 |
### TeamSpeak 版本兼容性
语音连接使用标准 TeamSpeak 客户端协议,无需 Query 凭据。可选的 TS 管理功能使用独立的 WebQuery / ServerQuery 凭据。
- **TeamSpeak 3**:协议识别会读取版本号开头的 `3.x`。并非所有历史服务器版本都经过独立验证,部署旧版本时请针对实际服务器进行测试。
- **TeamSpeak 6**:支持,也支持与 TeamSpeak 6 原生客户端进行屏幕共享。
- **自动探测**:网关读取服务器的 `version` 响应并在连接诊断中记录识别到的协议。
- 网关使用上游 [`@honeybbq/teamspeak`](https://github.com/HoneyBBQ/teamspeak-js) `1.0.0-beta.23` SDK;WebSpeak 面向 TeamSpeak 3 和 TeamSpeak 6。
<a id="screenshots"></a>
## 界面预览
![WebSpeak · 语音工作区](./screenshots/webspeak-zh.png)
<details>
<summary>展开欢迎页、音频设置与成员菜单</summary>
### 欢迎页
![WebSpeak · 欢迎页](./screenshots/webspeak-zh-home.png)
### 音频设置
![WebSpeak · 音频设置](./screenshots/webspeak-zh-audio.png)
### 成员菜单
![WebSpeak · 成员菜单](./screenshots/webspeak-zh-menu.png)
</details>
<a id="deployment"></a>
## 部署与首次配置
以下 Compose 配置使用 `network_mode: host`,适用于 Linux Docker 主机。Windows 服务端可使用发布包。
| 方案 | 适用场景 | 环境 |
| --- | --- | --- |
| Docker Compose(推荐) | 长期运行、升级简单、数据持久化 | Docker Engine + Docker Compose |
| 发布包 | 不安装 Node.js 和构建依赖 | Windows x64 或 Linux x64/ARM64 |
| 源码运行 | 开发、调试和二次开发 | Node.js 22.12+、Git 和本地编译工具 |
### Docker Compose(推荐)
```bash
git clone --depth 1 https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
docker compose pull
docker compose up -d
```
启动后访问 `http://<你的主机>:3040`。使用反向代理时将上游指向该地址;启用 WebRTC 时放行控制台显示的 UDP 端口范围。数据保存在 `webspeak-data` volume 中。
```bash
docker compose ps
docker compose logs -f webspeak
```
升级:
```bash
git pull --ff-only
docker compose pull
docker compose up -d
```
不要执行 `docker compose down -v`,否则会删除数据库和管理员设置。
### 发布包
从 [GitHub Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest) 下载与系统和架构匹配的 `windows-x64.zip`、`linux-x64.tar.gz` 或 `linux-arm64.tar.gz`,解压后运行对应启动脚本。发布包自带 Node.js 运行时和生产依赖。Docker 镜像支持 amd64/arm64。
Release 同时提供 Android `arm64-v8a`、`armeabi-v7a` 和 `x86_64` APK。它们使用 debug 签名,可手动侧载测试;不是 Google Play 发布包,Android 真机语音仍需验收。
### 源码运行
```bash
git clone https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
npm ci --ignore-scripts
npm rebuild @discordjs/opus --foreground-scripts
npm --prefix web ci
npm --prefix web run build
npm run build
npm start
```
构建 `@discordjs/opus` 需要 Python、Make 和 C/C++ 编译工具。
### 首次配置
1. 打开 `http://<你的主机>:3040/admin`。
2. 使用默认账号 `admin` / `admin` 登录,并立即设置至少 12 位的新密码。
3. 在“服务器”页配置 TeamSpeak 目标和访问方式,例如 `voice.example.com#9987`。
4. 公网使用时配置 HTTPS;启用 WebRTC 时放行控制台显示的 UDP 范围。
### HTTPS 与持久化
公网部署应通过 HTTPS 提供网页和 WebSocket。例如,将已解析到主机的域名配置到 Caddy,反向代理到 WebSpeak:
```caddyfile
webspeak.example.com {
reverse_proxy 127.0.0.1:3040
}
```
以上域名仅为配置示例,请替换成自己的域名。网页能通过反向代理或 Tunnel 打开,并不表示 WebRTC 的 UDP 媒体可达;相关配置见[高级配置](#advanced)。发布包和源码的数据默认位于 `data/`,Docker 位于 `webspeak-data` volume;备份和迁移时同时保留 `webspeak.db` 与 `master.key`。
<a id="administration"></a>
## 管理员控制台
实例配置位于 `/admin`:管理服务器与访问策略、WebRTC 与中继、邀请、活动会话、运行日志和备份。皮肤商店位于 `/admin/skins`;功能插件商店位于 `/admin/plugins`。
### 可选的 TeamSpeak 管理
WebSpeak 后台和访客语音不依赖此功能。在固定服务器模式下,打开 `/admin/ts-admin`,可集中配置 TS 管理连接。
1. 在 TS 服务端启用 WebQuery,并由有权限的 TS 管理员创建 API Key。填写 WebQuery 的 HTTP/HTTPS 地址和 API Key;地址指向 TS Query 服务,而非 WebSpeak 网页。支持 TS3(3.12+)和 TS6。
2. 虚拟服务器 ID 填 `0` 时,按固定目标的语音端口选择;受限 Key 应填写其被授权的服务器 ID。只读 Key 可查看,修改需要可写作用域及相应的 TS 权限。
3. 也可选择 ServerQuery SSH 或 TS3 ServerQuery TCP,填写 Query 主机(留空沿用固定目标)、Query 端口、用户名和密码;SSH 还需要可信的主机密钥指纹。这是 TS 的 Query 服务,并非服务器操作系统的 SSH。TCP 不加密,仅适合可信网络;HTTPS 证书须受网关信任。
4. 保存后连接或刷新,可查看服务器、频道、成员、服务器组和封禁,执行服务器设置、频道创建/重命名/删除、成员移动/移出/身份封禁、服务器组分配和解封。操作需确认,由 TS 核验权限;列表手动刷新。
凭据仅加密保存在服务端,接口不返回密码或 API Key;备份时同时保留数据库和 `master.key`。管理连接失败不影响 WebSpeak 后台和普通语音。封禁按 UID 创建,避免误封共用网关 IP 的其他用户。
<a id="advanced"></a>
## 高级配置
高级功能均为可选项;关闭时仍可使用兼容语音传输。配置入口在管理员控制台的“服务器”页,保存后对新连接生效。
### WebRTC 低延迟语音
WebRTC 将浏览器语音切换到实时媒体通道,也支持桌面端伴奏。媒体服务由当前 WebSpeak 网关直接提供,不需要另设媒体服务器。
1. 登录 `/admin`,打开“服务器”页的“高级参数”。
2. 关闭 WebRTC 时设置 UDP 起止端口,默认范围为 `40000–40099`。
3. 在 WebSpeak 主机的安全组和防火墙中放行整个 UDP 范围。
4. 勾选“启用 WebRTC”并保存,用户重新进入后即可协商;不支持时会回退到兼容传输。
WebRTC 启用后端口范围会锁定。要修改端口,先关闭 WebRTC 并保存,再修改端口并同步防火墙规则。公网使用还需要 HTTPS。
### 反向代理 / TCP 隧道下的语音 WebRTC
在管理后台的 WebRTC 高级参数中可设置:
- **公网媒体地址**:WebSpeak 网关可被 UDP 访问的 IP 或域名,不含协议、路径或端口。优先于网页入口推断;留空时按 `Origin`、`X-Forwarded-Host`、`Host` 推断。域名会解析为 IP 候选。反代域名不一定是媒体地址。
- **启用 IPv6 候选**:默认关闭;开启后保留 IPv4,同时收集 IPv6。需确保 IPv6 路由及 UDP 防火墙放行。
- **语音 STUN 服务**:可设置 `stun:turn.teamspeak.com:3478`,浏览器和网关使用同一服务发现公网映射。留空保留旧行为:werift 网关仍使用库内置 STUN,浏览器不配置 STUN。当前字段仅支持可通过 IPv4 访问的 UDP STUN 域名或 IPv4 地址,不接受 IPv6 字面量、TURN 或凭据;IPv6 媒体候选独立于 STUN 开关。
保存后重新连接。网页和 WebSocket 经反代可达,不代表媒体 UDP 可达;STUN 仅发现地址,不中继音频,也不保证穿透所有 NAT。只有 TCP 隧道而无可用 UDP/IPv6 路径时,仍会回退兼容传输。应开放配置的整个 UDP 端口范围;静态端口转发需保持相同端口映射。
### 屏幕共享的 ICE 候选
屏幕共享媒体仍优先走浏览器之间的直连,WebSpeak 只转发协商信令。默认使用 TeamSpeak 官方 STUN 服务发现公网候选地址;STUN 不承载媒体。若部署者有合规的外部 TURN 服务,可在启动 WebSpeak 前设置 `WEBSPEAK_SCREEN_SHARE_ICE_SERVERS`,值为 JSON 数组,例如:
```json
[{"urls":"stun:turn.teamspeak.com:3478"},{"urls":"turns:turn.example.com:5349","username":"<username>","credential":"<credential>"}]
```
配置 TURN 后,媒体可能经过该外部 TURN 服务,但不会经过 WebSpeak 网关;未配置时只使用直连和 STUN。
### 跨端 P2P 屏幕共享
浏览器用户与 TeamSpeak 6 原生客户端可以互相发现、发起和观看屏幕共享。浏览器之间以及浏览器与原生客户端之间的屏幕媒体优先通过 WebRTC/ICE 端到端传输;WebSpeak 负责会话鉴权、共享状态和 SDP/ICE 信令转发,不承载屏幕媒体流量。页面提供直播状态、观众人数、播放器音量、全屏和退出控制,也可在共享设置窗口中选择最高 1080p 与 60 FPS,并查看 WebRTC 统计。
### 中继模式
中继适用于 TeamSpeak 拒绝境外连接或直连不稳定的情况。它不是 VPN,只转发当前 WebSpeak 会话的 TeamSpeak 数据;目标服务器仍由用户在网页中选择。
中继实例同时运行 UDP 兼容转发和独立语音网关,不提供访客首页或管理员后台。网关收到用户的入场请求后,会用共享令牌签名并转交一次性语音票据;浏览器随后直接连接中继节点,语音网关再从中继节点连接 TeamSpeak。网页地址仍保持在入口网关,不需要跳转。令牌至少使用 16 个字符的随机值。
<details>
<summary>展开中继启动与配置示例</summary>
#### 源码启动
```bash
git clone --depth 1 https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
cd WebSpeak-client-for-TeamSpeak
npm ci --ignore-scripts
npm rebuild @discordjs/opus --foreground-scripts
npm run build
WEBSPEAK_MODE=relay \
WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token' \
WEBSPEAK_RELAY_HOST='0.0.0.0' \
WEBSPEAK_RELAY_PORT='39087' \
node dist/index.js
```
Windows PowerShell:
```powershell
$env:WEBSPEAK_MODE = "relay"
$env:WEBSPEAK_RELAY_TOKEN = "replace-with-a-long-random-token"
$env:WEBSPEAK_RELAY_HOST = "0.0.0.0"
$env:WEBSPEAK_RELAY_PORT = "39087"
node .\dist\index.js
```
#### 发布包启动
从 [Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest) 下载并解压对应平台的包:
```bash
# Linux
export WEBSPEAK_MODE=relay
export WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token'
export WEBSPEAK_RELAY_HOST='0.0.0.0'
export WEBSPEAK_RELAY_PORT='39087'
./runtime/node ./dist/index.js
```
Windows PowerShell 使用同名环境变量后运行 `.\runtime\node.exe .\dist\index.js`。
#### Docker 启动
```bash
docker run -d --name webspeak-relay --restart unless-stopped --network host \
-e WEBSPEAK_MODE=relay \
-e WEBSPEAK_RELAY_TOKEN='replace-with-a-long-random-token' \
-e WEBSPEAK_RELAY_PORT='39087' \
ghcr.io/echosixhiya/webspeak:latest
```
放行中继主机的 UDP 监听端口,默认是 `39087`。
语音网关默认监听 `127.0.0.1:3041`。为中继节点配置 HTTPS 域名,并让 Caddy 等反向代理把该域名转发到 `127.0.0.1:3041`,例如:
```caddyfile
relay.example.com {
reverse_proxy 127.0.0.1:3041
}
```
管理员后台的中继节点设置中,将“语音网关地址”填写为该 HTTPS 源站(例如 `https://relay.example.com`)。网页仍从原入口网关加载,之后会通过 WSS 连接这个中继域名。语音网关默认启用 WebRTC;还需放行 UDP `40000-40099`,并设置 `WEBSPEAK_RELAY_WEBRTC_PUBLIC_HOST` 为可从用户网络直接访问的中继公网 IP 或直连域名。若修改了 WebRTC UDP 范围,同时更新防火墙规则。UDP `39087` 保留给旧版兼容转发。
#### 在网关中启用
1. 管理员控制台 → “服务器” → “中继服务器”,添加一个或多个节点。
2. 为每个节点填写自定义名称、UDP 地址(例如 `relay.example.com#39087`)、HTTPS 语音网关源站(例如 `https://relay.example.com`)和匹配令牌并保存。
3. 访客欢迎页即可选择直连或其中一个中继。
关闭并保存中继配置后,访客页面不会显示中继选项。
</details>
### 依赖与归属
- 中继服务是 WebSpeak 自带实现,使用 Node.js 标准库,不依赖 GOST、sing-box 或其他代理框架。
- WebRTC 使用 [werift](https://github.com/shinyoshiaki/werift-webrtc) `0.24.4`,上游采用 MIT 许可证。
- TeamSpeak 协议使用上游 [HoneyBBQ/teamspeak-js](https://github.com/HoneyBBQ/teamspeak-js) 发布的 `@honeybbq/teamspeak@1.0.0-beta.23`,无需构建项目 SDK fork。
<a id="extensions"></a>
## 皮肤与功能插件
### 皮肤包 `.wskin`
皮肤包负责外观、布局及其附属小组件。管理员可安装、启用和设置默认皮肤;开发时遵循公开接口,无需修改 WebSpeak 源码。
[开发指南](./SKIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-skin-development/SKILL.md) · [皮肤索引仓库](https://github.com/Huddle-Up-Forge/webspeak-skins) · [Discord Voice 示例](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice)
### 功能插件 `.wplugin`
功能插件是独立应用,使用标准浏览器能力和可选 Node 后端,自行实现路由、状态与协作。管理员审核代码和依赖后启用;更新须重新信任。支持 TS 服务器或实例范围,运行于独立源。v0.3.0 起提供 API v2。
[开发指南](./PLUGIN_DEVELOPMENT.md) · [Agent Skill](../.agents/skills/webspeak-plugin-development/SKILL.md) · [分发索引与示例](https://github.com/Huddle-Up-Forge/webspeak-plugin)
<a id="troubleshooting"></a>
## 常见问题
| 现象 | 检查方向 |
| --- | --- |
| WebRTC 启用后仍回退 | 检查语音状态中的错误代码、HTTPS、整段 UDP 防火墙规则和公网媒体地址。TCP Tunnel 不能转发这条 UDP 媒体路径。 |
| 连接目标被本地地址保护拦截 | 公开模式限制回环和私网目标。连接同机 TS 时使用管理员配置的固定服务器模式;面向访客的目标应填实际可访问的地址。 |
| 屏幕共享超时或黑屏 | 屏幕共享使用独立的 WebRTC 连接;检查共享统计中的协商、ICE 和编码信息。语音 WebRTC 已连接不代表屏幕媒体可达。 |
| 升级后数据丢失或无法解密 | 复用原数据目录或 volume,并保留匹配的 `master.key`;不要用 `docker compose down -v` 升级。 |
### ⚠️ 要求和注意事项
| 项目 | 要求或注意事项 |
| --- | --- |
| 浏览器 | 建议使用最新版 Chrome、Edge 或其他支持 WebRTC 的现代浏览器。麦克风和窗口音频通常要求 HTTPS。 |
| TeamSpeak 网络 | WebSpeak 主机必须能够访问目标 TeamSpeak;默认语音端口为 `9987`。 |
| Web 服务网络 | 服务使用 `3040/TCP`,公网建议通过 HTTPS 反向代理提供网页和 WebSocket。 |
| IPv6 | IPv6 字面量写为 `[2001:db8::1]#9987`。主机/容器需要可路由 IPv6、启用 IPv6 的操作系统和 Node.js,以及相应防火墙放行。 |
| WebRTC | 默认使用 `40000–40099/UDP`,启用后需放行整个范围;修改范围前先关闭 WebRTC。 |
| 身份保持 | 同一浏览器身份同时只能保持一条活动连接;并行连接请关闭第二条的身份保持或使用其他浏览器配置文件。 |
| 伴奏 | 仅桌面端提供且要求 WebRTC;选择窗口或标签页时还要勾选共享音频。 |
| 数据 | Docker 数据在 `webspeak-data` volume;发布包和源码运行数据在 `data/`。升级前建议备份。 |
| 会话上限 | 单实例最多允许 100 个活动网页会话;这是应用准入上限,不是性能保证或 TS 许可证额度。 |
<a id="changelog"></a>
## 更新日志
<a id="latest-release-notes"></a>
### [v0.3.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.3.0) · 2026-11-03
#### 插件系统
- 发布功能插件 API v2:支持独立浏览器应用和可选 Node 后端,作者可自行实现路由、状态、通信和业务逻辑。
- 管理员可通过 GitHub 插件商店或本地 `.wplugin` 包安装应用,配置公开/私密设置并审核启用;更新后需要重新信任。
- 新增独立于皮肤的悬浮入口和应用库。插件窗口支持拖动、调整大小、最小化、最大化与还原,最小化或返回应用库不会重载当前应用。
- 提供应用模板、插件开发指南与 Agent Skill;P2P 文件传输和视频同看通过独立仓库分发。
#### 皮肤与授权
- 首次进入时统一确认当前实例第三方皮肤与插件的授权,不包含连接凭据;皮肤菜单末尾增加“授权”,可随时更改。
- 未同意时仅显示日间、夜间、ILLUSIA 三款官方皮肤,隐藏 KAAK 等其他皮肤及插件入口。撤回后切回内置皮肤、取消待完成加载并停止相关组件和插件页面。
- 保留皮肤清单权限、数据投影、文件摘要及宿主动作校验,管理员的应用审核与信任设置仍独立生效。
#### 修复与升级
- 修复窗口、整个屏幕及关闭共享音频时,TS 原生客户端不应答纯视频 offer 的问题:补充必要的音频协商段,不采集麦克风,也不伪造共享声音。窗口与全屏已由用户复测出画面。
- SDK 升级至 `@honeybbq/teamspeak@1.0.0-beta.23`,适配可选成员字段,并跳过代表说话结束的空音频数据包。
- 纳入上游 TSDNS 解析、查询限流重试、文件传输及断开连接清理等修复。
- 纳入 IPv6 目标校验、并发登录限制、改密后的会话撤销、可信代理限流与 PCM 上行保护修复。
- 保留并验证皮肤首次加载使用真实构建版本的修复,统一桌面、网页及 Android 的应用版本号。
#### 升级说明
- 插件 API v2 不兼容旧 API v1 应用包,请更新插件后重新审核并启用。
- 公网使用功能插件时,需要在管理员面板配置独立的 HTTPS 应用源并代理运行端口(默认 `3042`);主站与应用不能使用同一个源。
- 本次统一授权需要用户重新选择,旧的逐皮肤授权记录不会自动视为同意。
### [v0.2.9](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.9) · 2026-10-24
#### 功能增强
- 接入上游 SDK 1.0.0-beta.19,普通语音连接使用客户端实时目录,不再依赖 Query 列表权限。
- 管理员控制台新增 GitHub 皮肤商店,以及按实例管理、更新和启停皮肤的入口;Discord Voice 作为标准 `.wskin` 示例独立分发。
- 指定实例模式支持可选 TS 管理面板,可配置 WebQuery、TCP 或 SSH Query 凭据,管理服务器、频道、成员、服务器组和封禁。
- 中继可配置浏览器直连的语音入口,将语音会话交给中继节点处理,减少网关间的额外转发。
- 提供通用工作区保留与重连接口,KAAK 同步接入,并新增管理员、项目 GitHub 和 QQ 群入口。
- 支持 TeamSpeak 频道分隔栏,包括左中右对齐、重复填充、空白及标准线型;向皮肤开放格式化数据。
#### 问题修复
- 修复屏幕共享播放器的全屏尺寸,以及断线成员的状态、播放资源清理。
- 修复 TS 管理中封禁成功却报错、Query 连接混入成员统计和频道密码标签错误的问题。
- 区分权限、限流和超时提示;操作完成后的刷新失败单独提示,避免用户重复执行操作。
- 防止 SDK 将 HTTP 失败响应误判为 WebQuery 成功;修复 DC 首页、聊天区与窄屏控件布局。
#### 已知问题
- [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) 记录的安全加固尚未纳入本版本,关闭该 PR 不代表相关问题已修复。
<details>
<summary>展开 v0.2.8 及更早版本</summary>
### [v0.2.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.8) · 2026-10-17
#### 屏幕共享与连接稳定性
- 修复网页与 TeamSpeak 原生客户端之间屏幕共享的协商和视频轨道处理问题。
- 改善快速切换频道时的队列处理,减少客户端状态错乱。
- 修复部分皮肤组件内容和 KAAK 皮肤多语言显示问题。
#### 界面改进
- 音频设备名称会完整显示;空间不足时自动换行,便于区分名称较长的设备。
- 修复头像占位文字被意外选中的问题。
### [v0.2.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.7) · 2026-10-13
#### 更开放的皮肤系统
- 现在提供更开放的皮肤编辑系统与运行支持,可以自定义任意组件的样式与位置并可添加小组件。
- 进入语音面板后,在同一个浏览器中新开并登录一个管理员后台窗口即可激活皮肤编辑器。
- 随包提供一款“KAAK”皮肤作为开发示例。
- 更新了皮肤开发 Agent Skill。
#### 功能增强
- 现在支持 SRV 和 Nickname 形式的服务器地址解析。
- 自由模式下,允许用户进行多服务器标签管理(这些按钮在“固定服务器”的模式下不可用)。
- 屏幕共享新增码率选项。
- 现在 WebSpeak 会将输入过的频道密码保存到浏览器中。
- 现在会在上锁的频道前显示带锁的图标。
- 现在聊天记录能够持久化存储了。
#### Bug 修复列表
- 修复了解析 bug。
- 修复了音量和卡片拖动争抢焦点的问题。
- 修复了用户状态被错误地解析为未知的问题。
### [v0.2.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.6) · 2026-10-08
相对 0.2.5 大范围重构语音网关、共享协议、前端语音工作区与管理模块;修复 #6/#7/#10,完成 #9/#12 配置,并修复 PR #13 报告的既有 TS6 屏幕共享漏发现问题;改善 Opus/重连生命周期和移动端控制。提供 Windows x64、Linux x64/ARM64、Docker amd64/arm64,以及 Android arm64-v8a、armeabi-v7a、x86_64 APK。
### [v0.2.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.5) · 2026-09-27
新增 `.wskin` 皮肤系统、管理员启用/默认管理和受保护的日间/夜间/ILLUSIA 内置皮肤;移除未完成 Aurora Voice 样例,修复皮肤加载闪烁、暗色控件可读性与语音界面美术层级,并加入官方皮肤开发 Agent Skill。
### [v0.2.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.4) · 2026-09-22
新增浏览器与 TeamSpeak 6 原生客户端之间的跨端 P2P 屏幕共享;提供 STUN/外部 TURN 配置、直播播放器、观众状态、1080p/60 FPS 采集设置和 WebRTC 统计;优化屏幕共享交互并新增访客编号。
### [v0.2.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.3) · 2026-09-19
新增频道成员调度与按权限直接移动;支持头像、静音状态同步和身份恢复;更新五种语言的功能截图与文档。
### [v0.2.2](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.2) · 2026-09-17
提供浏览器端麦克风降噪、俄语和日语支持及按语言欢迎词配置;优化音量交互和 PR #2 基础上的错误提示与错误代码。
### [v0.2.1](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.1) · 2026-09-13
优化首页连接错误显示,保留并安全截断错误代码;默认支持 IPv6 TeamSpeak 目标。
### [v0.2.0](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.2.0) · 2026-09-10
增加服务器密码提示、正式中继部署模式、多中继选择和管理员日志原因显示。
### [v0.1.8](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.8) · 2026-09-08
简化 Docker 部署,支持同机 TeamSpeak,增加 15 秒连接超时和持续网络监测。
### [v0.1.7](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.7) · 2026-09-06
增加德语、Telegram、网络性能面板和整体音量;修复伴奏音量波动。
### [v0.1.6](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.6) · 2026-09-04
增加桌面端伴奏、身份保持提醒和网站图标;修复 WebRTC 成员独立音量。
### [v0.1.5](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.5) · 2026-09-04
修复身份保存逻辑并优化主题切换。
### [v0.1.4](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.4) · 2026-09-03
修复 WebRTC、频道聊天并优化管理页、日志和移动端布局。
### [v0.1.3](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/tag/v0.1.3) · 2026-09-03
引入内置 WebRTC、迁移 TeamSpeak SDK 并改善成员同步和语音缓冲。
</details>
<a id="contributors"></a>
## 贡献者与贡献来源
<details>
<summary>查看上游作者与 PR 贡献说明</summary>
以下列出上游 SDK 作者、已合并的 GitHub PR,以及已移植为独立皮肤包的原始贡献。
- [HoneyBBQ](https://github.com/HoneyBBQ) — 上游 [teamspeak-js(`@honeybbq/teamspeak`)](https://github.com/HoneyBBQ/teamspeak-js) SDK 的作者,为 WebSpeak 提供底层 TeamSpeak 协议客户端能力。
- [ph1gros](https://github.com/ph1gros) — [PR #48](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/48) 提供公开目标 IPv6 校验、管理员认证与会话、代理限流及 PCM 上行边界的安全审查、补丁和回归测试;原补丁未直接合并,相关修复已在 `dev` 中重新实现。
- [LainHE](https://github.com/LainHE) — [已合并 PR #2、#8、#28、#31–#35、#37、#38、#40](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ALainHE),涉及浏览器报错翻译、缩放与首页布局、屏幕共享码率与观看者头像、中继目标校验与异常重连、可信代理校验、连接失败传递、音频故障报告及 WebRTC 失败时的资源清理。
- [TimmySheep](https://github.com/TimmySheep) — [已合并 PR #13、#15–#24](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pulls?q=is%3Apr+is%3Amerged+author%3ATimmySheep),涉及 TS6 既有屏幕共享发现、屏幕比例、移动端语音/常亮/皮肤菜单、身份频道选项、PWA/主题、聊天历史、成员音频状态和麦克风权限等改进。
- [yichen11818](https://github.com/yichen11818) — [PR #25](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/25) 支持 TeamSpeak 注册昵称连接并保留昵称目标;[PR #51](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/51) 改进 KAAK 首次连接后的工作区保留与重连;[PR #27](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/27) 和 [PR #52](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/pull/52) 提供 Discord 皮肤的原始设计与实现(提交署名 **yumi**),后由 WebSpeak 项目移植为[独立分发的 `.wskin` 皮肤](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice)。
</details>
## 社区与相关项目
[GitHub Issues](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/issues) · [QQ 群 869500475](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=yhumUMDD9PmyYFWdXWUb_x7hM5trFQY8&authKey=Pw3HBGT7GwMinTQnuFGfnpf0aRSzXOJKcAiujVP1%2BXMpjheAKrncTRivicBJxpjV&noverify=0&group_code=869500475) · [Telegram](https://t.me/+8qShpTcuN9A3MWY9)
[NeteaseTSBot](https://github.com/yichen11818/NeteaseTSBot):支持多平台点歌和 Web 控制台的 TeamSpeak 音乐机器人。
## 许可证
WebSpeak 按 [AGPL-3.0-only](../LICENSE) 发布。第三方依赖的许可与归属见各自项目。
<p align="right"><a href="#readme-top">返回顶部 ↑</a></p>
+532
View File
@@ -0,0 +1,532 @@
# WebSpeak 0.2.8 皮肤系统开发指南
本文是 WebSpeak 0.3.0 的唯一皮肤开发说明,整合原皮肤开发规范与开放皮肤系统规格。它覆盖仍受支持的 v1/v2 兼容皮肤、v3 声明式开放皮肤和 v4 插件包,以及当前公开数据、宿主动作、授权、校验与开发流程。v4 有界 Wasm 已在生产构建开放;皮肤 JavaScript 仍只校验和缓存,不会执行。本文件是当前包格式和运行时接口的唯一文档来源。
## 目标:皮肤是可移植的外挂包
`.wskin` 是皮肤唯一的交付物。页面结构、样式、文案、布局、图片、字体和皮肤自己的组件/逻辑都应随包分发;导入皮肤不应要求为某款皮肤单独修改、部署或配置 WebSpeak 核心代码。宿主只提供稳定、通用且版本化的渲染和能力接口,皮肤包声明如何使用它们。
开发皮肤时,优先在包内完成工作:用 `skin.css` 和包内资源做视觉,用 `content.json` 提供皮肤文案,用 `layout.json` 提供默认排布,用 `components.json` 描述页面组件、数据绑定和已支持的交互;需要本地逻辑时,根据当前支持情况使用 v4 有界 Wasm。所有图片、字体、CSS 和插件文件都放进 `.wskin`,引用包内相对路径。不要为了单款皮肤给 `WebClient.vue`、宿主控件注册表、共享协议、服务端或其他核心运行时添加专用实现。
运行时数据和安全敏感的 TeamSpeak 行为仍由 WebSpeak 提供。皮肤只能读取当前协议明确公开的数据,并调用已支持、经用户授权和宿主复核的动作;包内 UI 消费这些输入并负责呈现。若多个皮肤确实缺少同一项通用数据或动作,应另立平台接口工作:先定义稳定字段/动作、权限和兼容版本,再由皮肤包使用。不要把平台接口改动伪装成某款皮肤的必要步骤,也不要为单个皮肤新增专用宿主控件。
可移植性由 WebSpeak 运行时与皮肤协议版本决定。清单的 `minAppVersion`、组件 schema、插件 `apiVersion` 必须对应实际使用的接口;兼容同一协议版本的 WebSpeak 实例应能导入并运行相同字节的 `.wskin`,无需单独部署该皮肤的前端代码。实例配置、公开服务器数据、屏幕尺寸和用户授权可以影响显示结果,但不改变包的实现。旧包继续遵循其声明的 schema 和宿主兼容规则。
开发者 Skill:[WebSpeak Skin Development](../.agents/skills/webspeak-skin-development/SKILL.md)。它给 Agent 提供皮肤任务的决策和交付步骤;本文件是格式、接口与安全边界的事实来源。
示例展示公开皮肤接口的用法,不代表未记录的运行时接口也可依赖;发现、活动、广告、商城和管理后台不属于语音皮肤范围。
完整的 KOOK 语音端体验测试皮肤见 [KAAK](./examples/KAAK-VOICE.md):它复用 WebSpeak 可信宿主控件和公开 TeamSpeak 会话数据,不包含站点素材、运营页面或后台。Harbor Voice 保留为通用 surface 格式验证样例。
v3 保留安全的标准元素和属性白名单;组件可通过完整页面 surface 自己构建界面,不需要把聊天、音频或成员 UI 锁在固定宿主面板里。条件可比较权限化公开数据、重复项和皮肤本地状态,也可判断已登记公开集合是否为空。表单输入先留在宿主渲染的本地状态;宿主动作不能在逐字输入时触发,可在已提交的 `change`、表单提交或显式点击上触发。作者自定义代码逻辑由 v4 有界 Wasm 路径提供。生产构建中的 v4 Wasm 运行时已接入本地摘要授权、页面生命周期、动态 HTML/SVG 节点渲染、插件 CSS、权限化只读数据投影、宿主动作桥、语义挂载槽位和全局 worker 资源治理;目前支持 `session.status.read`、频道/成员/聊天、收藏/最近列表和音频/共享状态读取权限,以及 `ui.surface.replace`、`ui.input.read`。每份公开数据投影最多 48 KiB,只传清单准许的字段;Wasm 可生成自定义节点树、有限本地状态并响应命名 UI 事件。宿主动作只接受可信 UI 事件触发的同一轮输出中的单个请求,并重新检查插件权限、参数和当前会话;`dblclick` 可绑定到加入频道等已授权宿主动作。JavaScript 仍只校验和缓存,不执行。每个 v4 插件有独立布局根,用户可调整插件整体、组件根和 DOM 节点的位置、尺寸、显隐、安全外观及 Flex/Grid 同级显示顺序;`plugins.json` 可将 widget 放到公开页面的注册槽位,也可通过 surface 重做整页。这个边界能承载完整自定义客户端界面,但不等于已完成插件商城和作者管理平台;跨浏览器测试与独立安全审查尚未完成。
`.wskin` 包可为公开页面定制艺术表现。v1 提供 CSS 与美术资源;v2 另外携带受校验的布局 JSON;v3 可自由安排公开组件,并用 components.json 声明由宿主渲染的安全组件。所有版本均由 WebSpeak 保留基础组件的业务逻辑和 TeamSpeak 行为。
页面结构、必要控件和所有基础翻译均由 WebSpeak 提供。皮肤包不必携带文案;如果只包含样式与美术素材,所有界面文字仍由 WebSpeak 按当前语言显示。`content.json` 仅用于可选覆盖,缺少的语言或字段回退到 WebSpeak 的基础内容。皮肤不注入 HTML 或 JavaScript;授权后的交互只调用 WebSpeak 登记并校验过的 TeamSpeak 功能。**管理后台 `/admin/**` 不属于皮肤范围,始终使用 WebSpeak 自己的固定样式。**
可直接查看 [ILLUSIA 风示例源码](examples/illusia-voice/) 与 [示例说明](examples/ILLUSIA-VOICE.md)。它使用本地美术素材和 CSS 完整定制首页、语音房间、成员区、聊天空状态及播放器,同时沿用 WebSpeak 提供的基础翻译;也是管理控制台内置且不可移除的示例皮肤。
## 使用与发布
管理员在 `/admin/skins` 查看三款随 WebSpeak 提供的内置皮肤,并可导入、替换、启用/停用或删除实例自定义皮肤;还可指定访客首次访问时使用的默认皮肤。默认日间、默认夜间和 ILLUSIA 风为受保护内置项,不可替换、停用或移除。访客手动选择的皮肤保存在该浏览器,后续实例默认值变更不会覆盖该明确选择;仅自动套用过旧默认值的浏览器会采用最新实例默认值。皮肤包会缓存在浏览器本地;页面启动时会查询实例目录,目录可用且版本更新时拉取新包。若网络不可用,已缓存的版本仍可使用。
选择器提供默认日间、默认夜间、内置 ILLUSIA 风和已启用的实例皮肤;没有“跟随系统”选项。停用的实例皮肤不向访客展示,也不能从服务端下载;若它是当前默认皮肤,系统会安全回退到默认日间。管理员设置的默认值只影响未手动选择皮肤的访客。自定义皮肤是独立的外观选择,不继承之前的日间或夜间模式;皮肤未覆盖的部件回退到浅色基础外观,避免一套组件混入另一套模式。自定义皮肤可自行声明 `color-scheme` 并定义深色外观;切换为日间或夜间时,会停用当前自定义包。文档级 `data-theme` 仍由 WebSpeak 保留给管理后台使用。
### GitHub 皮肤商店分发
管理员在 `/admin/skins` 的“皮肤商店”页安装仓库分发的皮肤;“实例皮肤”页负责导入、启停、删除和设置默认值。安装和更新不改变默认皮肤,更新保留原启停状态。商店网络故障不会影响已安装皮肤。访客仍需自行批准皮肤组件权限,管理员安装不能替访客授权。
官方索引为 [Huddle-Up-Forge/webspeak-skins](https://github.com/Huddle-Up-Forge/webspeak-skins) 的 `master/index.json`。索引仅登记稳定的皮肤 ID 和公开 GitHub 仓库地址,不包含皮肤实现:
```json
{
"schemaVersion": 1,
"skins": [{
"id": "community.discord-voice",
"repository": "https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice"
}]
}
```
每个皮肤仓库的默认分支根目录提供 `skin.json`(位于 `.wskin` **之外**),例如:
```json
{
"schemaVersion": 1,
"id": "community.example-skin",
"name": "Example skin",
"version": "1.0.0",
"author": "Example author",
"license": "CC-BY-4.0",
"description": "A portable WebSpeak skin.",
"minAppVersion": "0.2.8",
"package": {
"ref": "v1.0.0",
"path": "example.wskin",
"sha256": "填写最终归档文件的 64 位小写 SHA-256"
}
}
```
`package.ref` 使用已发布 tag 或完整提交 SHA,`path` 指向该 ref 中的 `.wskin` 文件。推荐 tag 一经发布不再移动。`skin.json` 必须与归档清单的 ID、名称、版本、作者、许可证和最低应用版本一致。版本和最低应用版本使用语义化版本;`description` 必须是字符串,可以留空。仓库无需提供 GitHub 令牌,实例从 GitHub 的公开原始文件服务读取;不支持私有仓库、任意下载域名或重定向。
发布步骤:先构建并用客户端和服务端导入器验证最终归档;计算 SHA-256;提交源码、归档、许可证和 `skin.json`;为这个提交创建版本 tag;最后提交中央索引条目。后续更新只需在皮肤仓库发布新版本并更新默认分支的 `skin.json`,无需同步修改中央索引。安装时服务端重新检查索引及元数据,核对摘要并运行普通 `.wskin` 校验;校验失败不替换实例皮肤。同 ID 已安装且版本相同或更新时,不提供覆盖或降级操作。多个管理员同时修改实例皮肤时,过期的安装请求会被拒绝,需刷新后重试。
仓库地址限定为 `https://github.com/owner/repository`。索引最多 50 项;索引最大 128 KiB,单个 `skin.json` 最大 16 KiB,归档最大 20 MiB,下载有超时限制。商店不执行皮肤构建脚本,也不从仓库加载未打入归档的资源。
### 工作区接口 v1(WebSpeak 0.2.8 当前运行时)
v3/v4 开放皮肤可在 `manifest.json` 中声明 `"workspace": { "apiVersion": 1, "mode": "persistent" }`。未声明时保留原先的首页流程。该通用接口不识别皮肤 ID,也不授予额外网络或存储权限;皮肤包本身不能读写此偏好。旧运行时不认识该字段或权限时会拒绝导入,不能仅凭应用版本号认定支持;使用它的包需要 `minAppVersion: "0.2.8"` 及工作区接口 v1。
首次使用仍显示连接表单;只有成功连接才记录 `hasConnected`。旧的成功连接历史会迁移为已使用状态,只有昵称或失败尝试不算。启用此策略的皮肤在主动断开或刷新回访后仍进入工作区,但不会自动连接、采集麦克风或切换服务器。普通回访可由宿主恢复最近目标;显式邀请、目标或频道链接优先。切换到未声明策略的皮肤恢复其原有流程,清除本地数据会重置此记录。
可信控件 `voice.connection-status` 需要 `session.status.read` 与 `voice.connect`,显示本地化的连接/失败状态、可编辑昵称与重连按钮;忙碌时禁用重复提交,服务器密码和新增服务器对话框仍由宿主管理。公开部件为 `voice.connection-status`、`voice.connection-status.message`、`voice.connection-status.nickname`、`voice.connection-status.nickname.input`、`voice.connection-status.reconnect`。皮肤负责这些部件的位置、响应式布局和外观。
声明式动作 `voice.connect` 使用同名权限且不接受参数;它只在明确可信点击后连接宿主当前选定的目标,不能携带地址、密码、身份材料、邀请令牌或自动执行。服务器配置和身份未就绪、正在连接/重连、已经连接或对话框尚待处理时,宿主拒绝重复发起。它和既有的 `quickServers.switch`、服务器栏加号共用宿主连接流程;异步读取浏览器已保存密码不会被误判为连接失败。
## 包结构
`.wskin` 是标准 ZIP 容器,推荐把下列文件直接放在 ZIP 根目录:
```text
manifest.json # 必需:身份、版本与入口
skin.css # 必需:皮肤样式
content.json # 可选:首页内容与多语言界面文案
assets/preview.jpg # 可选:管理后台显示的预览图,也可在 CSS 中使用
assets/background.webp # 可选:页面艺术素材
assets/brand.woff2 # 可选:自带字体
components.json # v3 可选:声明式组件或完整页面 surface
plugins.json # v4 必需:插件入口、页面、模式、权限与包内文件
plugins/<plugin-id>/index.js # v4 插件代码,目前只校验和缓存
plugins/<plugin-id>/index.wasm # v4 有界 Wasm 插件入口
plugins/<plugin-id>/style.css # v4 可选:插件样式,目前只校验和缓存
plugins/<plugin-id>/assets/ # v4 插件专属的本地图片或字体素材
```
所有资源路径使用 `/`,区分大小写,并相对于包根目录。CSS 的 `url()` 使用同样的包根相对路径,例如 `url("assets/background.webp")`。不得使用机器本地路径、站点绝对路径或远程 URL。说明文档放在源码目录旁边,不能打进 `.wskin`;导入器会拒绝 `README.md` 等未声明文件。
### `manifest.json`
```json
{
"schemaVersion": 1,
"id": "community.example-skin",
"name": "Example skin",
"version": "1.0.0",
"author": "Example author",
"license": "CC-BY-4.0",
"description": "A visual-only art skin using the WebSpeak interface translations.",
"entry": "skin.css",
"preview": "assets/background-composite.webp",
"minAppVersion": "0.2.7"
}
```
| 字段 | 规则 |
| --- | --- |
| `schemaVersion` | 当前必须为数字 `1`。 |
| `id` | 必需,最多 80 个字符;只允许小写字母、数字、点和连字符;不能以 `builtin.` 开头,也不能使用受保护 ID `builtin.light`、`builtin.dark` 或 `community.illusia-voice`。发布后不要更改。 |
| `name`、`author`、`license` | 必需,各最多 80 个字符。资源授权由作者负责确认。 |
| `version`、`minAppVersion` | 必需,使用语义化版本号,例如 `1.2.0`。 |
| `entry` | 必需,包内 CSS 文件路径,最多 120 个字符。 |
| `content` | 可选,包内 JSON 文件路径,最多 120 个字符。 |
| `preview` | 可选,包内 PNG、JPG/JPEG、WebP、AVIF 或 GIF 图片路径,最多 120 个字符。 |
| `description` | 可选,最多 400 个字符。 |
清单不得重复声明同一个文件为 CSS、内容或预览入口。
### schemaVersion 2:声明式布局皮肤
v2 为 v1 增加一个必需布局文件。清单和布局 JSON 会在导入端及服务端分别验证;未知清单字段、权限、组件、布局字段及越界数值都会导致包被拒绝。v2 不支持 HTML、JavaScript、WebAssembly、远程资源或扩展插件代码。皮肤 CSS 仍使用当前解析器规则,不能控制几何布局和交互区域。
```json
{
"schemaVersion": 2,
"packageType": "layout-skin",
"id": "community.example-layout",
"name": "Example layout",
"version": "1.0.0",
"author": "Example author",
"license": "CC-BY-4.0",
"entry": "skin.css",
"layout": "layout.json",
"permissions": [],
"minAppVersion": "0.2.7"
}
```
布局只引用 WebSpeak 登记的稳定组件 ID。当前支持 `home`、`voice`、`demo` 页面及 `desktop`、`tablet`、`mobile` 三种设备配置。组件位置使用有界的水平/垂直偏移,尺寸使用缩放、宽、高,外观字段只接受六位十六进制颜色和受限圆角;`visible` 控制显示状态;`order` 在 -100 到 100 之间,仅当父容器使用 Flex 或 Grid 时改变同级显示顺序,不改变 DOM 和键盘焦点顺序。`home.security-note`、身份安全提示、连接状态与屏幕共享错误属于可信宿主 UI,不允许布局隐藏或改写。
示例 `layout.json`:
```json
{
"schemaVersion": 1,
"pages": {
"home": {
"desktop": {
"home.feature": { "x": 12, "y": 8, "scale": 1.05, "order": -1 },
"home.features": { "visible": false }
},
"tablet": { "home.join-card": { "width": 680 } },
"mobile": { "home.header": { "x": 0, "y": 4 } }
}
}
}
```
作者包中的布局是初始默认值。用户编辑内容单独存放在本地浏览器,覆盖作者默认值;支持撤销/重做、单个组件重置、整套布局恢复、导入和导出。更换设备宽度会选择对应设备配置,不会删除其他设备的值。恢复入口由宿主在皮肤根节点之外绘制,即使用户隐藏了页面组件,也能再次打开编辑器并恢复默认值。
v1 和 v2 都只支持公开页面。`/admin/**` 不加载布局、用户覆盖和皮肤组件编辑器。布局包没有数据/API 权限;后续插件必须另行设计独立沙箱与授权协议,不能通过增加 v2 清单字段取得能力。
### schemaVersion 3:开放皮肤和完整声明式页面
v3 清单的 packageType 固定为 open-skin,entry 指向 CSS,components 可选指向 components.json;与 v2 不同,v3 不声明 permissions,但可以可选声明 layout 指向作者默认布局 `layout.json`。组件文件可以省略。仅 v3 开放公开页面的 CSS 排版能力,v1/v2 仍按旧 CSS 规则校验。客户端导入和服务端登记使用同一共享组件 schema 与权限白名单。
components.json 顶层接受 schemaVersion 1、2 或 3 和 components 数组。schema v1 维持旧兼容;schema v2 引入 `mode: "widget"`(默认)或 `mode: "surface"`,并提供可选宿主控件节点;schema v3 保持这些能力,扩大声明式 UI 的节点/状态/动作边界,并增加用户操作事件和语音功能动作。v3 仍使用固定元素/属性、公开数据集合和宿主动作白名单,不是任意 HTML 或任意脚本。每个组件需声明 id、name、page、accessibleName、permissions、actions 和 root,可选 state。page 接受 home、voice、demo;surface 仅可用于 home 和 voice,并且必须请求 `ui.surface.replace`。用户批准前不会显示 surface,撤销后宿主立即恢复普通页面。所有皮肤组件根节点及其中的每个可见元素都以动态布局项加入本地布局编辑器,可独立移动、缩放、改尺寸、改外观或隐藏。按钮、输入框及显式用户操作节点保留 44 px 最小触控区域。为让用户覆盖在树结构调整后仍能指向同一元素,请给重要节点设置稳定的 `part` 名称;未设置时按组件树位置生成标识。v4 插件格式与运行时见本指南的 v4 章节;Wasm 生产运行已开启,作者 JavaScript 仍关闭。
普通节点使用白名单 HTML/SVG 元素。节点可包含 text、part、className、受限 attributes、包内图片 asset、bindValue、本地 repeat/when、events 和 children。文本与属性支持简单的双大括号数据路径;不支持表达式、HTML 字符串或脚本。重复列表可使用注册的公开集合;频道重复项仅能再重复其 `channel.members`,并且需要额外批准 `session.members.read`。宿主每个组件的实际渲染节点最多 8192 个,防止嵌套集合放大界面。v3/v4 的作者默认布局使用与 v2 相同的有界 layout schema;可通过 `skin.<page>.<component-id>` 指定声明式自定义组件,通过 `skin.<page>.runtime_plugin_root_<plugin-id>` 指定 v4 插件根。用户的本地布局覆盖优先于包默认值。schema v2 另允许固定宿主控件节点,例如:
申请 `session.channels.read` 的 `session.channels` 列表还提供 `memberCount`、两位数显示用的 `memberCountLabel`、`maxClients` 和 `maxClientsLimited`。后两个字段仅在 TeamSpeak 返回有效上限数据时出现;`maxClientsLimited: false` 表示频道不限人数。它们与频道树一起属于公开只读数据,不会授予服务器写入能力。
频道显示接口增补(0.2.8):同一权限下新增 `displayName`、`isSpacer`、`spacerAlignment` 与 `spacerStyle`,声明式 v3 和 Wasm v4 均可读取。`name` 始终保留服务器原名,`displayName` 仅对永久、顶层且名称以 `[spacer…]`、`[lspacer…]`、`[cspacer…]`、`[rspacer…]` 或 `[*spacer…]` 开头的频道移除前缀(大小写不敏感,省略或自定义标识均可)。分隔栏的 `spacerAlignment` 为 `left`、`center`、`right` 或 `repeat`;`spacerStyle` 为 `text`、`solid`、`dashed`、`dotted`、`dash-dot` 或 `dash-dot-dot`,五种线型对应 `___`、`---`、`...`、`-.-`、`-..`。普通频道的 `displayName` 等于 `name`、`isSpacer: false`、两个格式字段为空字符串。旧运行时可能不含新增字段;兼容包应回退到 `name`,不能只凭相同的 0.2.8 版本号推断字段存在。分隔栏仍为真实 TS 频道,不增加加入限制,不隐藏其中的成员或子频道;管理编辑继续使用原名。
宿主 `voice.channel-tree` 与 `voice.channel-panel` 自动使用上述显示规则;分隔栏隐藏普通频道图标和人数,不显示空成员提示。新增稳定部件 `voice.channel-spacer`,提供 `data-alignment` 与 `data-spacer-style` 属性;频道树行 `voice.channel-tree.row` 和成员面板标题 `voice.channel-group.heading` 在分隔栏上提供 `data-spacer="true"`。颜色和字体继承皮肤,文字及重复填充在可用宽度内裁剪,空文本保留分隔间距。皮肤无需新增权限或修改传输逻辑。
```json
{
"schemaVersion": 2,
"components": [{
"id": "example-voice-surface",
"name": "Example voice surface",
"page": "voice",
"mode": "surface",
"accessibleName": "Example voice workspace",
"permissions": ["ui.surface.replace"],
"actions": {},
"root": {
"tag": "main",
"children": [
{ "widget": "voice.channel-panel" },
{ "widget": "voice.member-cards" },
{ "widget": "voice.chat-panel" },
{ "widget": "voice.audio-controls" },
{ "widget": "voice.disconnect-control" }
]
}
}]
}
```
当前可选宿主控件 ID:`home.connection-form`、`home.connection-status`、`home.visitor-count`、`home.server-announcement`、`home.social-links`、`home.identity-provider`、`app.skin-switcher`、`app.language-switcher`、`voice.channel-panel`、`voice.member-cards`、`voice.chat-panel`、`voice.audio-controls`、`voice.screen-share-player`、`voice.screen-share-start`、`voice.whisper-controls`、`voice.performance-panel`、`voice.connection-controls`、`voice.disconnect-control`、`voice.server-header`、`voice.server-banner`、`voice.server-switcher`、`voice.channel-tree`。未知控件和同页重复控件会被拒绝;每个控件的状态和业务动作仍由 WebSpeak 内部处理。`home.identity-provider` 是通用身份提供方入口,需用 `options.identityProviderId` 和 `options.identityProviderLabel` 指定稳定提供方标识与显示名;宿主会把点击转交给应用代码的 `registerIdentityProviderAdapter` 分发接口,皮肤只能发起请求、不能注册适配器。当前没有 MyTS 适配器,所以 MyTS 入口仍提示开发中;这不代表已经实现登录认证。schema v3 会检查受保护控件所需权限:音频控件需 `audio.status.read`、`audio.microphone.control` 和 `audio.output.control`;聊天需 `chat.channel.read` 与 `chat.channel.send`;成员卡片始终需 `session.members.read` 和 `session.memberAvatars.read`;schema v3 可为成员卡片设置 `options.memberActions: true`,在非本人卡片上显示可信宿主成员操作入口(包含现有个人音量控件);也可为 `voice.channel-tree` 设置该选项,在非本人频道树成员行上启用右键菜单;菜单仍由 WebSpeak 宿主处理,皮肤不获得额外动作或数据接口。频道树还可单独设置 `options.memberDragDrop: true`,将非本人成员拖到另一频道行时复用 WebSpeak 现有移动成员操作;悬停和拖入高亮由皮肤样式控制,此选项默认关闭且只适用于频道树。成员卡片或性能卡片可设置 `options.screenShare: false`,同时隐藏共享 UI/指标并免除成员卡片所需的屏幕共享权限;默认成员共享操作仍需屏幕共享读取/控制权限;头像只在可信宿主控件内显示,不暴露给皮肤代码;屏幕共享播放器需 `voice.screenShare.read` 与 `voice.screenShare.control`;悄悄话控件需对应状态读取和控制权限;断开/连接控件需 `voice.disconnect`。既有 v2 包维持旧校验行为,`voice.screen-share-start` 仍像此前一样要求 `voice.screenShare.control`。该控件仅能放在语音页;宿主按钮在可信点击处理器内直接启动屏幕采集,避免异步 Wasm 回调丢失浏览器瞬时用户激活。自定义 UI 可以完全用普通声明式节点搭建,不需要采用这些控件。只显示收藏时可用 `favorites.items` 和 `favorites.switch`;若要将收藏与最近连接放在同一自定义栏,可用 `servers.quickList` 数据与 `quickServers.switch` 动作。服务器目标始终使用本机生成的不透明令牌,不把地址、密码或身份材料交给组件。频道行也可把 `voice.joinChannel` 绑定到双击事件,切房继续走 TeamSpeak 原有权限和密码流程。v3 还提供经独立权限保护的麦克风/扬声器、输出音量、噪声抑制、伴奏、离开状态、悄悄话、断开连接和屏幕共享动作;噪声抑制使用 `audio.toggleNoiseSuppression` 与 `audio.microphone.control`,伴奏使用 `audio.toggleAccompaniment` 与 `audio.output.control`。它们只调用 WebSpeak 已有操作,屏幕采集仍由浏览器或操作系统询问用户。
首页访客统计使用公开宿主控件 `home.visitor-count`:它展示当前访客序号与累计访客数,文本跟随当前界面语言,并在统计数据尚不可用时隐藏;不需声明权限。该控件复用 WebSpeak 日间首页的同一结构与基础样式,皮肤通过包内 CSS 定位,不需要自建统计逻辑。组件节点可用稳定的 `part` 名称(例如 `visitor-stats`)控制位置;内部 `home.visitors`、`home.visitors.orbit`、`home.visitors.icon`、`home.visitors.label`、`home.visitors.divider`、`home.visitors.total` 和 `home.visitors.spark` 是稳定样式部件。控件只能放在 `home` 页面。
可信语音导航控件包括 `voice.channel-tree`、`voice.server-switcher` 和 `voice.server-header`。频道树要求 `session.channels.read`、`session.members.read`、`session.memberAvatars.read` 与 `session.channel.join`;头像只由宿主读取并在频道树中绘制。它可选 `layout: "server-sidebar"` 展示频道成员并让频道行与成员行分别控制折叠;未指定时保留默认呈现。独立服务器切换器要求 `servers.quickList.read` 与 `servers.quickList.switch`。服务器头部还要求 `session.status.read`,并在同一可信部件中组合服务器身份、状态、频道搜索和快速切换。两种入口都只接收不透明本地标识,点击后复用 WebSpeak 当前连接流程。v3 还可用 `session.invite.copy` 授权 `session.copyInviteLink`,让宿主复制当前公开服务器与频道的邀请链接并排除连接凭据。语音状态投影中的 `serverLabel` 会在看起来像 IP、域名或连接目标时省略,避免把地址显示为服务器名称。
示例包见 [KAAK voice 示例](./examples/KAAK-VOICE.md),其 components.json 使用完整首页与语音工作区 surface,展示收藏服务器、频道树、在线成员、聊天和可信语音控制的组合;[Open Voice Surface](./examples/OPEN-VOICE-SURFACE.md) 保留为通用格式验证脚手架。KAAK 的语音视觉参考来自用户授权进入的前两个语音房间;只记录布局,不保留服务器/房间标识、成员名或聊天内容。组件按本地用户授权后才渲染;权限对每个皮肤版本、页面和组件分别保存,可在宿主权限入口撤销。页面替换时,宿主会额外显示“返回标准界面”和“恢复内置皮肤”入口;拒绝授权或离开 surface 后,普通页面可立即恢复。
组件树有硬上限:components.json 256 KiB。schema v1/v2 上限为 32 个组件、每组件 256 个模板节点、16 层深度和 100 条重复记录;schema v3 上限为 128 个组件、每组件 2048 个模板节点、32 层深度和 250 个重复行,并允许 64 个本地标量状态与 64 个动作。Wasm 动态 UI 输出的 schema v4/v5/v6 有 256 KiB 总输出上限、最多 64 个组件、每个节点最多 64 个属性和 256 个子节点,并沿用每组件节点/深度限制;渲染器接受标准 HTML/SVG 元素及普通属性,而不是由元素/属性展示白名单限制。脚本、嵌入式浏览器、网络/导航属性、事件属性和行内 style 仍拒绝;样式通过经过隔离校验的插件 CSS 提供。包内图片通过专用资源字段引用,自定义元素映射为惰性 `div`。宿主只通过 `isTrusted` 用户事件发出剥离 DOM/Event 对象后的 `extension-event`,Wasm 侧只能经 `env.ui_input_read` 一次读取最多 64 KiB 的 JSON,包含插件本地状态、安全事件和宿主按插件读取权限投影的数据。每份数据投影最多 48 KiB,只含公开字段;地址、凭据、SDK 对象和未声明字段不会进入 guest。输入字段限长;生成界面中的 password/file/hidden 类型输入会拒绝。UI 循环已经接入 WebClient 授权生命周期,可把可信事件或最新数据快照作为下一次独立 Wasm 调用输入,最多串行排队 8 项并验证回调/状态归属;动作桥复核清单权限和会话状态。单个页面实例最多并发运行 2 个 Wasm worker,并限制最多排队 64 项。
图片资源只能从包内引用,CSS 不能读取外部 URL、脚本或浏览器存储。宿主动作需显式权限,并只能绑定可信的用户事件;输入或 change 事件不能触发宿主动作。focus/blur、hover 和 drag-start/over 等被动事件只可改动组件本地状态,不能触发语音操作。
注意:v3 CSS 和 surface 可以隐藏或遮挡普通语音控件。权限和返回标准界面提示由宿主在皮肤根之外绘制;其他界面控件仍受皮肤排版影响。测试时务必确保麦克风、设置、退出语音、屏幕共享操作和移动端导航仍有可达路径。组件演示页 /demo 使用合成数据,加入频道和聊天动作只更新演示状态;它不支持宿主控件或整页替换。
### 本地组件结构编辑器
公开客户端页可打开“组件结构”编辑器,直接管理当前皮肤版本的声明式组件树。它支持创建、复制、删除组件和节点、添加子节点或同级节点、调整顺序、编辑组件元数据与节点 JSON、撤销/重做,以及导入/导出 components.json。该编辑器不属于管理员面板,不加载到 /admin/**。
编辑器只保存本地 authoring 覆盖,键按皮肤 ID 和版本隔离;原始皮肤包不会被改写。导入及每次提交都会走 parseSkinPluginDocument 的同一 schema 和权限校验,运行时也再次验证从本地存储读出的文档。不能通过编辑器新增任意脚本、事件处理器属性、外部资源、未知数据路径、宿主保留的 data-ws-* 属性、未授权宿主动作或未登记的宿主控件。旧 v2 组件首次升级到 v3 时,编辑器会为受保护的内置宿主控件补齐对应权限声明;这不会自动批准权限,控件继续等待宿主授权 UI 明确确认。
旧 schema v1/v2 皮肤可以保持原样使用,第一次结构编辑时会把已验证的数据规范化为 schema v3;旧包自身不被升级或覆盖。schema v3 允许 components 为空:删除最后一个皮肤组件会恢复基础 WebSpeak 页面,宿主授权与恢复控件始终在皮肤内容之外。节点不能脱离组件根单独删除;重要节点应设置稳定 part 名称,避免树顺序变化后基于路径生成的布局覆盖指向其他节点。
### schemaVersion 4:插件包描述与有界 Wasm 运行时
v4 在 open-skin 包中增加必需的 `plugins` 路径,并允许沿用可选 `layout` 路径提供插件根和节点的作者默认布局。服务端登记和客户端导入共用 `plugins.json` schema v1 校验器;校验插件 ID、页面、模式、权限、文件归属、路径唯一性和包内文件大小,并将插件文件与普通皮肤素材分别缓存。客户端还会对 Wasm 入口执行固定导入/导出 ABI 预检。SHA-256 授权基础会绑定插件描述、入口、样式和全部素材;本机授权记录还会绑定皮肤/插件版本、API 版本和权限策略版本。摘要只能发现已授权内容被替换,不能证明发布者身份。WebClient 有本地授权对话框和 Wasm 运行生命周期;目前支持安全 UI 输出、可信 UI 事件回调、插件专属 CSS、按清单权限过滤的公开数据投影(单份最多 48 KiB)和首版单动作宿主桥。支持的数据读取权限包括 `session.status.read`、`session.channels.read`、`session.members.read`、`chat.channel.read`、`favorites.read`、`servers.quickList.read`、`audio.status.read`、`voice.whisper.status.read`、`voice.screenShare.status.read` 和 `voice.screenShare.read`,另支持 `ui.surface.replace`。`ui.input.read` 单独控制插件是否能收到用户在插件自有输入框中输入或被浏览器自动填入的值;未获授权时仍可收到事件类型,但不会收到文本或勾选值。密码、文件和隐藏输入始终拒绝。宿主动作仅可由可信 UI 事件触发,按清单权限、动作参数和会话状态再次校验;生产构建也有全局 worker 上限。跨浏览器验证和独立安全审查仍待完成。
```json
{
"schemaVersion": 4,
"packageType": "open-skin",
"id": "community.example-plugin-skin",
"name": "Example plugin skin",
"version": "1.0.0",
"author": "Example author",
"license": "MIT",
"entry": "skin.css",
"plugins": "plugins.json",
"minAppVersion": "0.2.7"
}
```
`plugins.json` 顶层 `schemaVersion` 当前为 `1`,并包含 1–64 个插件。每个插件声明 `id`、`name`、`version`、`apiVersion: 1`、`page`(`home` 或 `voice`)、`mode`(`widget` 或 `surface`)、必需的 `entry`、可选的 `mount`、`runtime`、`style`、素材路径数组 `assets` 和 `permissions`。入口扩展名 `.js` 默认对应 `javascript`,`.wasm` 默认对应 `wasm`;显式 `runtime` 必须与入口扩展名一致。入口及样式必须位于 `plugins/<id>/`;素材必须位于该插件自己的 `assets/` 子目录,只能是本地图片或 woff2 字体。插件不能共享文件;同一公开页面最多有一个 `surface`,且必须申请 `ui.surface.replace`。surface 不能声明 `mount`;widget 可选声明一个与 page 相符的宿主槽位。未指定时放在页面级插件宿主中。`ui.input.read` 是单独的输入值读取权限,授权提示会说明浏览器自动填入的值也可能被读取;不得让用户在皮肤输入框中输入密码或其他秘密。其余权限只能从 `src/shared/skin-plugin.ts` 的现有权限表中选择。
`plugins.json` 不超过 256 KiB;每个入口 JS 或 Wasm 不超过 256 KiB,每个样式 CSS 不超过 512 KiB;每个插件最多声明 32 个素材。客户端导入会拒绝不符合固定内存、导入、导出和 Wasm 模块结构限制的入口。皮肤包整体仍受通用 ZIP 文件数、展开大小、图像和字体限额约束。v1–v3 不接受插件代码。v4 JavaScript 仍只校验、缓存,不执行。生产 Wasm 仅在用户显式授权、摘要匹配时通过有界解释器启动一次性任务;它已支持上述权限化只读投影、安全 UI 更新和首版宿主动作桥。动作由可信 UI 事件引发、由宿主按插件权限和会话状态复核;浏览器瞬时手势不会跨越异步 Wasm 执行,因此屏幕采集必须通过可信宿主控件直接开始。数据变化会触发一轮新的有界执行。不要将有 DOM 的 iframe 当作网络沙箱:sandbox 不阻止 iframe 自己导航,`navigate-to` 也不能作为跨浏览器安全保证。
widget 的可选 `mount` 只接受这些公开锚点:`home.header.after`、`home.content.before`、`home.content.after`、`home.footer.before`、`voice.server-rail.before`、`voice.server-rail.after`、`voice.header.before`、`voice.header.after`、`voice.activity.before`、`voice.activity.after`、`voice.chat.before`、`voice.chat.after`、`voice.channel-panel.before`、`voice.channel-panel.after`、`voice.audio-dock.before`、`voice.audio-dock.after`、`voice.mobile-nav.before`、`voice.mobile-nav.after` 和 `voice.workspace.overlay`。它们提供初始语义位置;作者仍可用插件 CSS 和本地布局编辑器自由调整位置、尺寸、显隐、安全外观及同级顺序。surface 替换内置页面时,如果声明的槽位不存在,插件会回退到页面级宿主,避免 UI 丢失。专用的插件挂载管理界面仍未实现。布局权限只覆盖当前皮肤中实际渲染的插件节点,不能越过自身节点调整其他插件或宿主恢复控件。生产 v4 宿主已按 descriptor 管理当前页 widget/surface、授权、输出、事件循环、样式和清理。
## 当前运行时数据与权限
以下数据权限按组件或插件单独声明。授权按皮肤/插件版本、页面、组件和权限策略绑定;拒绝或撤销后,相应组件不再渲染或调用动作。服务端地址、密码、身份密钥、访问令牌、Cookie、私聊内容、原始音频和屏幕流不会传给皮肤。
| 权限 | 公开内容 |
| --- | --- |
| `session.status.read` | 当前连接状态、频道和显示名称。 |
| `session.channels.read` | 可见频道树、名称、层级、当前人数、服务器公布的人数上限和当前频道标记;不包含密码或服务器地址。 |
| `session.members.read` | 可见成员名称、频道、在线/说话状态及本人标记;不含头像图像。 |
| `session.memberAvatars.read` | 允许可信 `voice.member-cards` 控件在宿主内显示已缓存头像,图像字节和 URL 不进入皮肤数据。 |
| `chat.channel.read` | 当前公开文字频道中可见的消息,不含私聊。 |
| `favorites.read` | 收藏名称、类型、当前标记和不透明本地令牌,不含地址或凭据。 |
| `servers.quickList.read` | 收藏与最近服务器的名称、类型、当前标记和不透明本地令牌,不含地址或凭据。 |
| `audio.status.read` | 用户自己的麦克风/扬声器静音、降噪和伴奏状态,不含音频。 |
| `voice.whisper.status.read` | 悄悄话状态和已配置目标数量。 |
| `voice.screenShare.status.read` | 用户自己的屏幕共享状态。 |
| `voice.screenShare.read` | 当前可见共享的名称、来源、所有者名称、音频标记和观看人数,不含媒体流。 |
`ui.surface.replace` 授权公开首页或语音页的整页替换。`ui.input.read` 是独立的输入读取权限;用户同意后,插件可读取其输入框文本或浏览器自动填入值。密码、文件和隐藏输入始终不提供给插件。不要在插件输入框中要求用户输入密码或其他秘密。
宿主动作只允许从公开运行时 API 中选择,并在调用时重新核对权限、参数和当前会话:
- `session.copyInviteLink`(`session.invite.copy`)复制不含连接凭据的当前服务器/频道邀请链接。
- `voice.joinChannel`(`session.channel.join`)仅请求加入当前公开可见的频道,继续使用宿主的频道密码和权限流程。
- `favorites.switch`(`favorites.switch`)与 `quickServers.switch`(`servers.quickList.switch`)使用不透明令牌选择本机已有目标,并复用宿主连接流程。
- `chat.sendMessage`(`chat.channel.send`)只向当前公开文字频道发送消息,不包括私聊。
- `ui.setState` 和 schema v3 的 `ui.toggleState` 只修改该组件隔离的本地状态。
- schema v3 还支持经相应权限验证的本人麦克风/扬声器静音、降噪、伴奏、输出音量、音频设置、断开连接、离开状态、悄悄话和屏幕共享操作。`voice.startScreenShare` 必须通过可信宿主控件触发,以保留浏览器的用户操作授权。
- 屏幕共享成员标记可读取 `session.members` 中的 `screenSharing` 和 `screenShareStreamId`;观看操作 `voice.joinScreenShare` 还需 `voice.screenShare.control`。
控件节点将 WebSpeak 原生控件放进皮肤布局,但不会暴露其内部状态或数据对象。事件可包含 click、dblclick、键盘、焦点、指针和拖放等受限类型;被动事件只能改动组件本地状态,敏感动作必须由可信的明确用户操作触发。宿主再次校验目标、令牌、共享 ID 和当前权限。
## v4 Wasm 运行限制与恢复
每个 v4 插件使用按皮肤、插件、版本、API、文件摘要和权限策略绑定的本地授权。安装不等于运行;内容或权限变化后须重新授权。运行时通过宿主过滤权限字段后提供结构化快照,不传递 DOM、原生 TeamSpeak 对象或网络/持久化 API。
| 资源 | 当前上限 |
| --- | ---: |
| 单份插件数据快照 | 48 KiB |
| 单次 UI 输入 | 64 KiB |
| 单次动态 UI 输出 | 256 KiB |
| Wasm 客体线性内存 | 4 MiB |
| Wasm 指令燃料 | 10,000,000 |
| 每个页面实例并发运行 | 2 个 worker |
| 等待队列 | 64 个任务;等待 120 秒后拒绝 |
Wasm 每轮最多读取一次输入并提交一个 UI 输出;首版宿主动作桥只接受可信 UI 事件同一轮执行提出的一个动作。共享屏幕采集不允许从异步动作启动,必须走可信宿主按钮。动态输出由宿主校验后创建安全 HTML/SVG 节点,不按 HTML 字符串执行;作者 CSS 限定在皮肤或插件容器中。切页、撤权、超时或插件错误会停止相应任务并恢复宿主界面。插件不能创建 DOM iframe、调用外部资源、导航页面或读写任意浏览器存储。
## 首页内容和文案
`content.json` 完全可选。WebSpeak 自带中文、英语、德语、俄语和日语的基础内容,因此纯美术皮肤无需复制翻译文件。若希望为皮肤定制部分文案,可按 locale 覆盖连接首页内容和公开界面文案;未定义的语言、字段或翻译键会回退到 WebSpeak 内容,不要求皮肤重复提供整套文字。当前允许 1–20 个 locale,locale 写作 `en`、`zh-CN`、`ja-JP` 等形式。`defaultLocale` 必须指向一个已定义的 locale。示例:
声明式 `components.json` 也可以显示皮肤自己的多语言文案。文本节点、字符串属性,以及组件 `name` / `accessibleName` 可使用 `{{skin.messages.<key>}}` 绑定。WebSpeak 会把皮肤 `content.json` 中 `defaultLocale`、当前语言代码和完整语言代码的 `messages` 合并到 `skin.messages`,当前语言内容覆盖默认文案;这个绑定适用于首页、语音页和 Demo 页的声明式组件。没有匹配的 key 会显示为空字符串,因此组件引用的 key 应在默认语言中提供。该本地化路径只提供皮肤包自身的文案,不会扩展 Wasm 插件的权限化运行时数据。
```json
{
"defaultLocale": "en",
"locales": {
"en": {
"home": {
"eyebrow": "A room of your own",
"title": "Talk",
"titleAccent": "together",
"description": "Join a voice room from your browser.",
"welcomeTitle": "Join the room",
"welcomeDescription": "Choose a name and connect.",
"features": [
{ "title": "Clear voice", "description": "Low-latency Opus audio." }
]
},
"messages": {
"home.connect": "Enter the room",
"voice.activity-heading": "Voice activity",
"demo.heroLead": "A preview customized by this skin."
}
}
}
}
```
`home` 支持 `brandName`、`eyebrow`、`title`、`titleAccent`、`description`、`welcomeTitle`、`welcomeDescription` 和 `features`。普通文字最多 500 个字符;`features` 最多 8 项,每项的 `title` 最多 80 个字符、`description` 最多 240 个字符。功能卡片图标和状态由应用提供,皮肤不能通过 JSON 注入节点。
`messages` 的键是公开页面中翻译调用使用的键;首页/语音页键可在 `web/src/i18n/web-client.ts` 查找,演示页键使用 `demo.` 前缀加字段名(例如 `demo.heroLead`、`demo.speakingNow`)。每个 locale 最多覆盖 200 条,每条文案最多 500 个字符。键只能由小写字母开头,并包含字母、数字或点。语言回退顺序为默认 locale、当前语言和更具体的 locale;之后回退到 WebSpeak 原文。
管理后台的文字不读取皮肤包,不能通过 `messages` 修改。
## CSS 皮肤接口
### 自动隔离
运行时把 `skin.css` 的每个选择器限定在皮肤自己的公开页面根节点内:
```css
/* 选择器必须使用公开的页面/部件钩子;运行时再加上皮肤根作用域。 */
[data-ws-page="voice"] [data-ws-part="voice.member.avatar"] {
outline: 2px solid var(--skin-accent);
outline-offset: 4px;
}
```
实际规则会被限定在类似下面的根节点内,不会匹配 `/admin/**`:
```css
[data-ws-page="voice"] [data-ws-part="voice.member.avatar"]
```
也可以写 `:root { --skin-accent: ... }` 设置皮肤自己的变量;`:root` 会被转换成当前皮肤根。选择器必须包含 `:root`、`[data-ws-page]` 或 `[data-ws-part]`。不要写 `:global()`、`html`、`body` 或 Vue 内部 class 作为公开接口。组件 class 可能随版本调整,`data-ws-part` 才是皮肤作者接口。自定义变量名必须使用 `--skin-` 前缀,不能覆盖 WebSpeak 的内部令牌。
页面根节点使用 `data-ws-page` 区分 `home`、`voice` 和 `demo`。使用 `data-ws-state` 选择明确状态,如 `active`、`idle`、`current`、`open`、`closed`、`drag-over`、`dragging`、`speaking`、`connected`、`self`、`mine` 或 `other`。语音成员还提供 `data-ws-speaking="true|false"` 和 `data-ws-self="true|false"`。交互元素会带有 `data-ws-critical="true"`;没有专属部件名称的按钮、链接、输入框、滑块和可拖动成员会使用通用部件 `data-ws-part="control"`,并以 `data-ws-control-kind` 标出 `button`、`link`、`input`、`checkbox`、`range`、`select`、`textarea`、`menuitem` 或 `draggable`。
### 已发布的部件名称
下列名称来自当前前端模板。对新功能,作者可以先用通用 `control` 部件;后续新增稳定部件会更新本目录。
服务器和频道密码弹窗共用 `auth.password.backdrop`、`auth.password.dialog`、`auth.password.decoration`、`auth.password.eyebrow`、`auth.password.title`、`auth.password.lead`、`auth.password.form`、`auth.password.label`、`auth.password.field`、`auth.password.field-icon`、`auth.password.error` 和 `auth.password.actions`。
服务器和频道密码弹窗共用 `auth.password.backdrop`、`auth.password.dialog`、`auth.password.close`、`auth.password.close-icon`、`auth.password.decoration`、`auth.password.eyebrow`、`auth.password.title`、`auth.password.lead`、`auth.password.form`、`auth.password.label`、`auth.password.field`、`auth.password.field-icon`、`auth.password.input`、`auth.password.error`、`auth.password.actions`、`auth.password.cancel`、`auth.password.submit`、`auth.password.spinner` 和 `auth.password.submit-icon`。
| 页面区域 | `data-ws-part` |
| --- | --- |
| 通用 | `app`、`app.toast`、`control`、`skin.trigger`、`skin.menu`、`skin.option`、`language.trigger`、`language.menu`、`language.option` |
| 首页 | `home`、`home.header`、`home.brand`、`home.header-tools`、`home.gateway-status`、`home.content`、`home.hero`、`home.hero.eyebrow`、`home.hero.title`、`home.hero.description`、`home.features`、`home.feature`、`home.visitors`、`home.visitors.orbit`、`home.visitors.icon`、`home.visitors.label`、`home.visitors.divider`、`home.visitors.total`、`home.visitors.spark`、`home.join-card`、`home.join-card.waveform`、`home.join-card.sonar`、`home.join-title`、`home.join-description`、`home.notice`、`home.form`、`home.server-target`、`home.field-label`、`home.field`、`home.relay-choice`、`home.relay-choice.copy`、`home.server-history`、`home.server-history.group`、`home.server-history.item`、`home.server-history.select`、`home.server-history.favorite-toggle`、`home.favorite-toggle`、`home.identity`、`home.identity-actions`、`home.identity-provider.button`、`home.identity-provider.label`、`home.identity-import.open`、`home.identity-export.button`、`home.identity-import-dialog`、`home.identity-import.header`、`home.identity-import.close`、`home.identity-import.textarea`、`home.identity-import.drop-zone`、`home.identity-import.file-button`、`home.identity-import.error`、`home.identity-import.security`、`home.identity-import.footer`、`home.identity-import.cancel`、`home.identity-import.submit`、`home.server-announcement`、`home.server-announcement.title`、`home.server-announcement.body`、`home.social-links`、`home.connection-status`、`home.connect`、`home.security-note`、`home.footer`、`home.community-dialog` |
| 语音工作区 | `voice.shell`、`voice.workspace`、`voice.header`、`voice.header-actions`、`voice.breadcrumbs`、`voice.performance`、`voice.performance.panel`、`voice.performance.route`、`voice.performance.metrics`、`voice.performance.status`、`voice.performance.webrtc-stats`、`voice.connection-status`、`voice.audio-status`、`voice.poke`、`voice.scroll`、`voice.content`、`voice.activity`、`voice.activity.artwork`、`voice.activity-heading`、`voice.screen-share-error`、`voice.members`、`voice.members.empty`、`voice.member`、`voice.member.action-trigger`、`voice.member.avatar-wrap`、`voice.member.avatar`、`voice.member.mic-status`、`voice.member.name`、`voice.member.status`、`voice.member.live-indicator`、`voice.member.stop-share`、`voice.member.share-actions`、`voice.member-panel`、`voice.member-panel.heading`、`voice.member-panel.search`、`voice.member-panel.channels`、`voice.channel-group`、`voice.channel-group.heading`、`voice.channel-group.members`、`voice.member-row`、`voice.member-row.avatar`、`voice.member-row.copy`、`voice.member-row.flags`、`voice.member-row.volume`、`voice.whisper-strip`、`voice.audio-dock`、`voice.audio-dock.microphone`、`voice.audio-dock.microphone-panel`、`voice.audio-dock.output`、`voice.audio-dock.output-panel`、`voice.audio-settings`、`voice.audio-settings.device-select`、`voice.audio-settings.device-select-trigger`、`voice.audio-settings.device-select-chevron`、`voice.audio-settings.device-select-menu`、`voice.audio-settings.device-select-option`、`voice.mobile-more`、`voice.mobile-nav` |
| KOOK 频道树与服务器切换 | `voice.server-switcher`、`voice.server-switcher.trigger`、`voice.server-switcher.menu`、`voice.server-switcher.item`、`voice.server-switcher.icon`、`voice.server-switcher.label`、`voice.server-switcher.current`、`voice.server-switcher.empty`、`voice.channel-tree.list`、`voice.channel-tree.empty`、`voice.channel-tree.node`、`voice.channel-tree.line`、`voice.channel-tree.expander`、`voice.channel-tree.row`、`voice.channel-tree.icon`、`voice.channel-tree.join-hint`、`voice.channel-tree.name`、`voice.channel-tree.count`、`voice.channel-tree.branch`、`voice.channel-tree.member`、`voice.channel-tree.avatar`、`voice.channel-tree.member-name`、`voice.channel-tree.member-muted`、`voice.channel-tree.member-screen-share`、`voice.channel-tree.member-speaking`、`voice.channel-tree.member-away` |
| 快速服务器 | `voice.favorite-servers.rail`、`voice.favorite-servers.rail.list`、`voice.favorite-servers.rail.item`、`voice.favorite-servers.server`、`voice.favorite-servers.avatar`、`voice.favorite-servers.tooltip`、`voice.favorite-servers.favorite-toggle`、`voice.favorite-servers.add`、`voice.favorite-servers.strip`、`voice.favorite-servers.strip.item`、`voice.favorite-servers.strip.server`、`voice.favorite-servers.strip.favorite-toggle`、`voice.favorite-servers.strip.add`、`voice.favorite-servers.switch-status`、`voice.favorite-servers.current-toggle`、`voice.favorite-servers.dialog-backdrop`、`voice.favorite-servers.dialog`、`voice.favorite-servers.dialog.header`、`voice.favorite-servers.dialog.close`、`voice.favorite-servers.dialog.form`、`voice.favorite-servers.dialog.field`、`voice.favorite-servers.dialog.input`、`voice.favorite-servers.dialog.target`、`voice.favorite-servers.dialog.hint`、`voice.favorite-servers.dialog.actions`、`voice.favorite-servers.dialog.cancel`、`voice.favorite-servers.dialog.submit` |
| 聊天与菜单 | `voice.chat`、`voice.chat.tabs`、`voice.chat.tab`、`voice.chat.heading`、`voice.chat.messages`、`voice.chat.event`、`voice.chat.message`、`voice.chat.message-avatar`、`voice.chat.message-body`、`voice.chat.message-bubble`、`voice.chat.empty`、`voice.chat.composer`、`voice.chat.status`、`voice.context-menu-backdrop`、`voice.context-menu`、`voice.context-menu.header`、`voice.context-menu.move-submenu` |
| 屏幕共享 | `voice.screen-share-settings`、`voice.screen-share-settings.heading`、`voice.screen-share-settings.fields`、`voice.screen-share-settings.note`、`voice.screen-share-settings.actions`、`voice.screen-player`、`voice.screen-player.stage`、`voice.screen-player.video`、`voice.screen-player.placeholder`、`voice.screen-player.exit`、`voice.screen-player.viewers`、`voice.screen-player.viewer-avatar`、`voice.screen-player.live`、`voice.screen-player.source`、`voice.screen-player.controls`、`voice.screen-player.volume`、`voice.screen-player.fullscreen` |
| `/demo` 演示页 | `demo.header`、`demo.brand`、`demo.header-tools`、`demo.badge`、`demo.skin-switcher`、`demo.language-switcher`、`demo.home-link`、`demo.reconnect`、`demo.reconnect.restore`、`demo.layout`、`demo.channels`、`demo.channels.heading`、`demo.channel`、`demo.channel.select`、`demo.channel.members`、`demo.main`、`demo.hero`、`demo.live`、`demo.hero.title`、`demo.hero.description`、`demo.hero.online`、`demo.wave`、`demo.voice-heading`、`demo.voice-grid`、`demo.voice-card`、`demo.avatar`、`demo.member-name`、`demo.member-status`、`demo.chat.heading`、`demo.chat.tabs`、`demo.chat.tab`、`demo.chat.messages`、`demo.chat.message`、`demo.chat.empty`、`demo.chat.composer`、`demo.chat.input`、`demo.chat.send`、`demo.actions`、`demo.actions.heading`、`demo.action.speaking`、`demo.action.poke`、`demo.action.reconnect`、`demo.note`、`demo.user`、`demo.poke-notification`、`demo.poke.dismiss` |
`voice.member.avatar` 是语音活动区头像;`voice.member.mic-status` 在成员麦克风静音时显示,状态值为 `muted`;`voice.member.action-trigger` 是打开宿主成员操作菜单的按钮,由成员卡片小组件的 `options.memberActions` 控制;`voice.member-row.avatar` 是右侧成员树头像。语音成员列表的动态项提供 `.ws-voice-member-enter-active`、`.ws-voice-member-leave-active`、`.ws-voice-member-enter-from`、`.ws-voice-member-leave-to` 和 `.ws-voice-member-move` 动效钩子,可分别设置加入、离开和排序变化的过渡。状态属性还会使用 `current`、`drag-over`、`dragging`、`self`、`events-empty` 和 `messages-empty`。当前根节点以及屏幕共享播放器、弹窗、菜单都属于同一皮肤作用域。
`voice.channel-tree`、`voice.server-switcher`、`voice.server-header` 和 `voice.server-banner` 是 WebSpeak 可信宿主控件。频道树按 TeamSpeak 返回的层级展示语音频道与成员;展开按钮只改变本地显示,双击频道或聚焦后按 Enter 才加入频道。服务器栏布局让频道成员保持可见,折叠按钮只收起子频道。成员头像和语音状态只在宿主渲染的频道树中出现,不会传给皮肤插件。服务器头部在宿主中展示状态并按频道名筛选;切换入口只列出本机收藏和最近连接,可用不透明本地标识触发既有连接流程;地址、密码和身份材料不会传给皮肤组件。服务器欢迎区需 `session.status.read`,从 TeamSpeak `serverinfo` 读取横幅 URL 和欢迎语;没有可用内容时隐藏。欢迎语作为纯文本渲染;`voice.server-banner.image`、`voice.server-banner.welcome`、`voice.server-banner.icon`、`voice.server-banner.title` 与 `voice.server-banner.body` 可由布局编辑器调整。
首页快速连接和语音工作区的服务器栏共用同一列表:收藏项排在前面,最近连接补在后面;地址相同的收藏与历史只显示一项。每项的星标按钮可在两个位置收藏或取消收藏,取消收藏后若该服务器仍在最近连接中,它会留在列表的最近连接位置。皮肤可通过 `data-ws-state="favorite|recent"` 区分首页条目,通过 `data-ws-server-kind="favorite|recent"` 区分语音栏条目。
首页身份选项支持导入 TeamSpeak `.ini` 或身份字段,并可导出为 TeamSpeak `.ini`;导入弹窗解析身份的过程在浏览器本地完成。自定义皮肤可以分别调整身份操作按钮、粘贴区、拖放区域、安全提示和弹窗按钮,但不得隐藏或弱化权限继承与私钥安全提示。
`voice.activity.artwork` 是位于语音活动区内容上方的固定装饰平面。皮肤可以在其上绘制带透明背景的立绘,让角色压住成员卡片或直播画面的边缘;平面本身不占布局空间、不拦截点击,成员和播放器控件仍保持可交互。只通过背景图及背景定位/缩放来适配素材,不改变其定位和层级。
`voice.member-panel` 的 `::before` 是成员栏耳机/场景插画层,宿主已固定它的尺寸、位置、透视和前后层级;皮肤只需提供透明背景素材并调整背景显示、滤镜或阴影,不能自行定位或改变尺寸。消息空状态的 `::before` / `::after` 预留给气泡等小型装饰,宿主负责形状位置;皮肤可以绘制边框、底色和点状背景,但标题和说明文字仍由 WebSpeak 翻译并保持可见。
皮肤与语言选择器的触发按钮、菜单和每个选项都提供上述通用部件钩子。`skin.option` 另带有 `data-ws-skin-id`(内置项为 `builtin.light`、`builtin.dark` 和 `community.illusia-voice`,实例皮肤项为其清单 ID);`language.option` 带有 `data-ws-language`。皮肤可以据此只装饰自己的选择项,而不影响其他皮肤、语言选项或选择器交互。例如:
```css
[data-ws-part="skin.option"][data-ws-skin-id="community.illusia-voice"][role="option"] {
background-image: linear-gradient(110deg, #efffff, #c8f3f2);
}
```
### 令牌、字体、动效和图片
皮肤只负责“画什么样”,不负责“放在哪里”。可用的视觉规则包括文字/背景颜色、背景图片及其裁切、圆角、轮廓、阴影、滤镜和动画;边框可用不占空间的内阴影绘制。推荐先定义皮肤变量,再为公开部件编写视觉规则:
```css
:root {
--skin-page-bg: #091317;
--skin-panel: #142329;
--skin-text: #edf8f5;
--skin-muted: #9db5af;
--skin-accent: #47dcc4;
--skin-card-radius: 20px;
}
[data-ws-part="voice.screen-player"] {
border-radius: var(--skin-card-radius);
box-shadow: 0 18px 50px #0008, inset 0 0 0 1px color-mix(in srgb, var(--skin-accent) 50%, transparent);
}
```
`url()` 只允许引用包内图片或 WOFF2 字体。支持 PNG、JPG/JPEG、WebP、AVIF、GIF 和 WOFF2;SVG 不接受。自带字体示例:
```css
@font-face {
font-family: "ILLUSIA Sans";
src: url("assets/illusia-sans.woff2") format("woff2");
font-display: swap;
}
[data-ws-page="voice"] { font-family: "ILLUSIA Sans", sans-serif; }
```
字体必须随包附带并拥有可再分发许可。自定义字体可能改变不同语言的字宽,因此校验器会给出提示;发布前必须检查中文、英语、德语、俄语和日语下的标题、按钮和长文案是否仍完整可读。字体族名和 `@keyframes` / `@layer` 名称会自动隔离,避免与其他皮肤冲突。请支持 `prefers-reduced-motion`,并确保焦点、错误、静音、正在说话等状态仍容易辨认。
### 固定布局与交互边界
以下 CSS 限制适用于 v1 和 v2:校验器会拒绝改变布局、定位、尺寸、文字流向/换行或交互命中区域的声明,包括 display、position、inset、z-index、宽高、内外边距、网格/弹性布局、间距、溢出裁切、变换、指针事件和字号等。v2 的位置和尺寸只从经过 schema 校验的 layout.json 生效。v3 为支持自由布局而允许这些声明,但仍限制皮肤根作用域、公开钩子、危险值和外部资源;只通过 CSS 隔离不能阻止皮肤作者遮挡控件。
因此,v1/v2 CSS 可以更换艺术素材、颜色和表面风格,但不能重排组件。v3 可以用 CSS 重新安排界面和组件盒子,也能隐藏普通界面部分;基础组件由宿主继续创建,宿主的恢复和权限 UI 位于皮肤作用域外。所有版本都应确保焦点、文字、键盘和触屏操作可用。
v1/v2 外观可以因窄屏而更换图片裁切或装饰,但 @media 规则也受固定布局限制。v2 应在布局数据中分别设置桌面、平板和手机配置;v3 可用媒体查询构建响应式 CSS。上线前仍需预览各设备尺寸、所有五种语言、键盘焦点、减少动效偏好,并确认必要控件可用、文字未被裁切。
## 安全边界和限制
校验在上传端和服务端执行;服务端只登记有效皮肤包,访客只能下载登记的包。当前限制如下:
| 项目 | 上限 |
| --- | ---: |
| ZIP `.wskin` | 20 MiB |
| 解压总大小 | 50 MiB |
| ZIP 条目数 | 128 |
| 单个 CSS 文件 | 512 KiB |
| `content.json` / `components.json` | 256 KiB |
| 单张图片(包括预览) | 16 MiB |
| 单个 WOFF2 字体 | 4 MiB |
| 每实例皮肤数 | 50 |
| 每实例皮肤包总存储 | 200 MiB |
压缩包路径穿越、重复/冲突路径、符号链接、异常 ZIP 元数据和本地文件头/目录不一致都会被拒绝。仅允许受支持的 CSS at-rule:`@media`、`@supports`、`@container`、具名 `@layer`、`@font-face` 和 keyframes。`@import`、脚本、HTML、外部网络资源会被拒绝;`!important` 可用于皮肤作用域内的样式。字体 `local()` 也会拒绝,避免绕过包内字体来源。
v1/v2 校验器会阻止隐藏必要操作控件和其容器。v3 可改变显示状态,因此皮肤开发者必须保留语音操作路径;授权界面、皮肤选择和恢复入口由宿主在皮肤作用域之外提供。以下选择器是旧格式对可选装饰部件的透明度白名单:
```css
[data-ws-part="home.hero.eyebrow"]
[data-ws-part="home.gateway-status"]
[data-ws-part="home.features"]
[data-ws-part="home.feature"]
[data-ws-part="home.visitors"]
[data-ws-part="voice.activity-heading"]
[data-ws-part="voice.member.avatar"]
[data-ws-part="voice.member.live-indicator"]
[data-ws-part="voice.member-row.avatar"]
[data-ws-part="voice.screen-player.viewer-avatar"]
[data-ws-part="voice.screen-player.live"]
[data-ws-part="demo.badge"]
[data-ws-part="demo.wave"]
[data-ws-part="demo.avatar"]
[data-ws-part="demo.member-status"]
[data-ws-part="demo.note"]
```
上面必须使用单独的精确属性选择器;不能通过父容器、组合选择器或子元素间接隐藏/重置内容。关键帧只有在其动画仅被这些可选部件引用时,才可使用透明度归零;若关键帧也被必要控件引用或动画名通过变量指定,则会被拒绝。`clip`、`clip-path` 和 `mask` 一律不允许,避免视觉裁切误伤真实控件。校验器是防止布局回归的边界,不是视觉质量证明;自定义字体、复杂背景和高对比特效仍需人工检查文字可读性与控件辨识度。
皮肤可以重画控制外观。v1/v2 不能重新布置必要操作;v3 可以,因此须人工实测加入/退出、麦克风状态、设置、菜单、屏幕共享退出、音量、全屏等操作的可达性。校验成功不代表设计质量合格;提交前要逐页实测窄屏和桌面尺寸、所有界面语言、键盘焦点与减少动效设置。
CSS 被限定在 `.ws-skin-root` 内,管理员页面不会继承皮肤。删除实例里的包会停止从服务器提供该包;已经下载过的浏览器副本会保留在本地存储,因此仍可能在该浏览器的选择器中出现。清除该站点的浏览器数据可移除本地副本。
## 制作与验收
1. 选择最接近目标的 `docs/examples/` 示例,复制其皮肤源码目录,并修改 `manifest.json` 的唯一 `id`、名称、作者、版本和授权。ILLUSIA 是美术参考,不要求沿用它的角色或配色。
2. 先查本文件和系统规格中已经发布的公开钩子、数据、控件和动作。不要依赖 Vue 内部 class、未公开的数据路径或某个实例的本地文件。
3. 将皮肤的页面/组件结构、样式、文案、布局及所有资源放在包目录中:CSS/图片/字体写入 `skin.css` 和 `assets/`,可选多语言文案写入 `content.json`,声明式组件写入 `components.json`,作者默认布局写入 `layout.json`,当前支持的插件逻辑和资源放进 v4 `plugins/`。运行时动态数据使用公开上下文;TeamSpeak 行为使用已发布的宿主动作。
4. 皮肤任务中不要修改 WebSpeak 核心客户端、服务端、共享协议或宿主控件。若没有足够的通用公开接口,先写明需要的数据/动作、权限和兼容性,再将它作为独立的平台工作处理;不要给某款皮肤增加专用核心分支。
5. 在包根目录生成 ZIP,再改扩展名为 `.wskin`,只包含 manifest 声明的文件。PowerShell 示例:
```powershell
Compress-Archive -Path .\docs\examples\illusia-voice\* -DestinationPath .\illusia-voice.zip -Force
Rename-Item .\illusia-voice.zip illusia-voice.wskin
```
6. 使用皮肤导入器验证生成的 `.wskin`,再在 `/admin/skins` 导入这个确切文件。用访客浏览器分别检查连接首页、语音页和 `/demo`;测试自定义图片、交互控件、会话状态、成员、聊天、屏幕共享及设置。v1/v2 检查固定布局;v2 检查作者默认布局和用户本地覆盖;v3/v4 检查授权拒绝/撤销、数据边界和失效恢复。
7. 检查窄屏与桌面、所有支持的语言、长文案、键盘焦点、对比度和减少动效偏好,并确认素材可再分发。若声称跨实例可移植,应在两个兼容版本的实例导入同一份 `.wskin`,记录并比较文件 SHA-256;不要为第二个实例复制核心代码改动。
当前自动化回归涵盖 ZIP/清单验证、资源路径、CSS 隔离与拒绝规则、文案结构和服务端皮肤目录读写。视觉排版、内容遮挡和浏览器间表现仍须人工预览。
自绘成员列表时,`session.members` 可读取 `screenSharing` 与 `screenShareStreamId`;这两个成员字段和 `screenShare.streams` 一样要求 `voice.screenShare.read`。用 `member.screenSharing` 显示共享标记,再将 `member.screenShareStreamId` 绑定到 `voice.joinScreenShare`(还需 `voice.screenShare.control`)即可让用户观看。未声明/未获共享读取权限的皮肤不会收到这两个字段;整页替换皮肤仍须在自己的成员列表中绘制标记或观看入口。
\n
## 实例级用户授权(v0.3.0)
用户首次访问公开页面时,由宿主统一询问是否允许当前实例的第三方皮肤和功能插件使用已公开的频道/成员/聊天等上下文;不包含连接凭据。不再逐个皮肤弹窗确认。选择按浏览器源(协议、域名、端口)保存,旧版本的逐包授权记录不会自动替代这次选择。管理员对应用的审核与信任仍单独保留。
未作选择或拒绝时,仅可使用固定三款官方皮肤:`builtin.light`、`builtin.dark`、`community.illusia-voice`;KAAK 即使随包分发也不在免授权名单中,其他第三方皮肤及功能插件入口隐藏。缓存、直接激活、进行中的加载也必须经过同一授权检查,不能仅过滤菜单。皮肤菜单末尾的“授权”可以随时修改选择。撤回时立即退回内置皮肤、停止第三方皮肤组件/worker,并关闭与撤销当前功能应用会话;服务端由管理员启用的后台应用不因此停机。
清单权限、数据投影、宿主动作校验和 Wasm 文件摘要校验继续保留,统一授权不是扩大皮肤 API 的理由。作者不应再自行增加重复授权弹窗。原文中的逐包授权记录与 SHA-256 绑定描述指内部校验记录,其创建必须在实例授权允许之后(或固定官方皮肤之内)。
File renamed without changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

+21
View File
@@ -0,0 +1,21 @@
# Discord Voice skin
This example turns the Discord-inspired voice interface into a portable WebSpeak `open-skin` v3 package. Its page structure is declared in `components.json`; its palette and layout are in `skin.css`; localized skin copy lives in `content.json`.
The independent distribution repository is [Huddle-Up-Forge/webspeak-skin-discord-voice](https://github.com/Huddle-Up-Forge/webspeak-skin-discord-voice). It is the first entry in the [WebSpeak skin store index](https://github.com/Huddle-Up-Forge/webspeak-skins). Administrators can install it from **Skins → Skin store**, then manage availability and the instance default under **Instance skins**. Version 1.0.11 requires WebSpeak 0.2.8 with the current public skin API.
The package uses WebSpeak's public TeamSpeak widgets for channel navigation, member cards, chat, audio controls, screen sharing, performance status, server switching and invite links. That keeps connection logic and trusted actions in WebSpeak while the skin controls the visible layout. The Discord visual language and color palette are retained, while host-owned controls keep their supported behavior and accessibility.
The skin requires explicit approval to replace the home and voice pages. It does not include JavaScript, depend on Vue internals, or change WebSpeak runtime code. It can be imported from `/admin/skins` as an ordinary `.wskin` package.
- Source: [discord-voice](./discord-voice/)
- Package: [discord-voice.wskin](./discord-voice.wskin)
- Format and runtime contract: [skin development guide](../SKIN_DEVELOPMENT.md)
Build the package from the repository root with:
```powershell
node web/scripts/build-discord-voice-skin.mjs
```
Native fullscreen and the bespoke screen-share settings shortcut from the built-in Vue version are not part of the current public skin API. The standard package keeps screen sharing reachable through WebSpeak's trusted screen-share controls and uses the standard audio settings panel.
+11
View File
@@ -0,0 +1,11 @@
# ILLUSIA风
ILLUSIA 风格 is a schema v3 open-skin example built from the local artwork in [illusia-voice/assets](./illusia-voice/assets/). Version 2.0.2 keeps its existing light-glass CSS and current-channel card, adds matching visual treatment for the host member-card screen-share status and watch action, and uses a black letterbox background for the fixed WebSpeak screen-share player. The package still uses WebSpeak's base translations and contains no executable skin code.
The new voice-page component is defined in [components.json](./illusia-voice/components.json). It reads only the current public channel name through session.status.read and uses a local mascot image for a compact, non-interactive glass badge. The component needs the user's local approval before it renders; that approval is scoped to this skin version and can be revoked from the host access control. It cannot switch channels, read favorites, access a server address, or control audio.
The CSS continues to style the WebSpeak home page, voice workspace, screen-share player and /demo with cyan accents and original art. The homepage includes translucent navigation and selectors, animated mascot details, feature tiles, a visitor badge, a join action and a curved footer. The voice workspace includes the shared quick-server list, channel/member views, chat empty state, screen-share art and audio controls. The shared member cards detect active screen shares and show a themed live badge and watch button. The mobile view keeps WebSpeak's responsive host navigation while applying ILLUSIA colors and artwork.
The distributable package and the copy served from web/public/skins are built from the source folder. After changing source files, run `npm run skin:illusia:build` to recreate both copies. Run the package import test to confirm both copies stay byte-identical and valid.
Use only artwork you have permission to redistribute when publishing a skin to other WebSpeak instances.
+54
View File
@@ -0,0 +1,54 @@
# KAAK voice skin
The participant stage uses larger profile portraits (104px on desktop, reduced for narrow layouts). A live speaking state adds a pulsing accent ring and a visible waveform marker, including when participant names are hidden while chat is open. The ring and speaking status use KAAK's shared green accent.
The server sidebar can show the connected TeamSpeak virtual server's configured host-banner image and welcome message between the server header and channel tree. Both fields come from live server information; the card disappears when neither is configured, and a missing or failed banner image does not hide the welcome text. Welcome content is rendered as plain text.
The server sidebar can show the connected TeamSpeak virtual server's configured host-banner image and welcome message between the server header and channel tree. Both fields come from live server information; the card disappears when neither is configured, and a missing or failed banner image does not hide the welcome text. Welcome content is rendered as plain text.
The voice-channel sidebar follows KOOK's observed typography: 16px/700 server title, 12px/700 group title, 14px/700 channel title, and 12px/400 low-contrast member count.
Chat visibility is kept separately for each active TeamSpeak channel, so collapsing one room does not collapse the next room. TeamSpeak does not expose KOOK's music-channel category; a new channel therefore starts expanded until the user changes its chat visibility.
While the WebSpeak performance card is sampling, its refresh icon spins to show the busy state; the animation is disabled when reduced motion is requested.
KAAK is a schema v3 open-skin package with full connection and voice-workspace surfaces. Its desktop voice page follows KOOK's proportions: an 86px server rail with 58px icons and 18px vertical spacing, a 290px channel pane, a 40px top bar, a central participant stage, right-side chat attached to the current voice channel, and a lower-left voice dock. The server rail uses KOOK's rounded-square silhouette, a 2px green active outline and left-edge marker, with neutral fallback tiles and the muted purple active tile from the reference. The identity tile stays pinned at the bottom with a 54px circular monogram and connection-aware online dot; the server list scrolls when the window is short. The host provides a stable color-tone value derived only from the privacy-safe label, but the rail keeps the KOOK neutral tile treatment rather than exposing those tones. The KOOK voice room is the point-to-point visual reference: composition, member presentation, styling, and motion should be compared directly, rather than treating matching component types or approximate placement as sufficient. The left tree contains the TeamSpeak voice channels only; KOOK's separate text-channel group is outside this pass because TeamSpeak has no equivalent channel type. The current voice channel's text chat remains on the right. Closing it hides the entire panel, expands the participant stage, and leaves a reopen button in the stage heading; this happens without leaving the voice room. Its header uses the `#` channel mark and an unobtrusive close control; the composer sits at the bottom edge. Messages use author monograms, a separate identity/time line, and readable message text. The central stage uses WebSpeak's reusable member-card widget so available TeamSpeak profile avatars appear inside KAAK's participant tiles; the tiles use a wide 1.82:1 layout with a responsive grid to match KOOK's participant presentation. Member names stay hidden at rest while chat is open and fade upward into the lower-left label on hover; they remain visible while chat is collapsed. KAAK's CSS adds hover depth and a smoothly transitioning speaking ring driven by live voice state. Active screen shares appear on member cards with a live badge and a themed watch action; the share player remains a WebSpeak host component. The dock retains WebSpeak's trusted connection-quality, audio, and disconnect controls. Input/output volume buttons open hover or keyboard-focus panels with live numeric levels; sliders use a skin-colored progress track, a distinct thumb, and visible focus feedback. Audio input and output devices use a reusable keyboard-accessible picker with a scrollable option list, selected/highlighted states, and an animated chevron; KAAK styles the trigger and open list. The connection surface, voice workspace, and audio settings share KOOK's PingFang SC-first font stack; audio settings use 16px/600 section headings and observed 14px/400 field labels. Audio sliders use a 16px thumb with hover/focus feedback. The performance card opens with a short entrance motion and readable network/audio metrics. No real device, volume, or microphone state is changed during visual checks. The roster shows connected TeamSpeak clients only; it does not invent an offline list. Channel selection is single-click; joining is double-click. The narrow layout keeps the host's mobile controls available while retaining readable member tiles.
The single TeamSpeak voice-channel group in the left tree collapses and expands with a short two-way height and fade transition like KOOK's voice group; the separate KOOK text-channel group remains outside this pass. A first click selects a channel and reveals a brief “双击加入” hint; the hint disappears on the active room. The current voice-room heading keeps the channel name and live member count visible above the participant stage while the attached chat is expanded, matching KOOK's room view. Member cards expose WebSpeak's trusted member-actions menu from a small hover or keyboard-focus control; desktop cards also open it on right-click, and touch layouts keep the control visible. KAAK gives the host menu KOOK's compact dark panel, separated volume section, and highlighted action rows while keeping WebSpeak's own individual-volume slider and member actions; it does not add KOOK menu actions or skin-side audio logic. While a screen-share peer is active, the voice-status panel also displays its browser-side video codec and transport statistics.
The design target is the voice-client portion of KOOK, as requested by the project owner. It does not include discovery, companion/party, event, store, advertising, administrator, or other service-operator pages. It does not add a KOOK account flow, direct messages, server administration, or channels absent from the connected TeamSpeak server. The voice performance card also closes on outside click or Escape; Escape returns focus to its trigger, and its entrance/exit motion respects reduced-motion preferences.
The device picker now follows the public KOOK style geometry: a 40px trigger with 12px corners, a menu with 12px corners and 8px inset, and 32px rows with 2px gaps and 8px corners. Hover and selected rows use distinct low-contrast fills. The shared host measures the rendered menu before applying viewport limits, so skin-defined padding and row spacing stay visible without a KAAK-specific placement path. KAAK uses KOOK's dark-theme brand green (`#6cbf00`, `#7ac51a` hover) for speaker, slider, and control highlights. The performance trigger, metric values, volume readouts, audio settings icons, and sliders reuse the same accent tokens. Volume sliders use a 4px track, a 16px white thumb with a 2px brand-green border, and a 3px hover/focus halo without extra hover scaling.
The audio settings surface now follows the observed KOOK form proportions: a 660px dark card, 16px corners, 72px field rows, and a two-column label/control layout. Device and volume controls keep their WebSpeak behavior; only their shared form grouping and KAAK skin presentation changed. The layout stacks fields on narrow screens. KOOK's settings typography remains PingFang SC-first, with a 32px/600 title, 16px/600 section headings, and 14px/400 field labels.
The existing WebSpeak noise-suppression switch is available in the audio settings on desktop and mobile, matching its placement in KOOK's voice settings. It remains the browser's current noise-suppression control; KAAK does not claim to reproduce KOOK's branded processing modes.
## Reference access note
The owner authorized inspection of the first two voice rooms in the KOOK server. Both rooms were entered and viewed; the microphone remained off and no message was sent. The in-room view confirmed a single large participant tile in the center, a separate right-side panel for the active voice channel's text chat, a narrow server rail, grouped voice channels, and a compact voice-control dock near the lower left. The chat was empty, so no message contents were recorded. Server/room identifiers and member names were not recorded.
## Returning to the workspace
KAAK 3.1.127 requires WebSpeak 0.2.8 with workspace API v1. Its manifest opts into the generic persistent workspace policy: first-time visitors keep the connection home until a successful voice connection; returning visitors and disconnected users retain the workspace and server rail. Restoring the workspace never starts a connection or captures the microphone. The host restores the recent target only for ordinary visits, preserving explicit invitation and target links. Clearing browser data resets this history.
The permission-gated `voice.connection-status` host widget provides the connection state, nickname and explicit reconnect button beside server navigation at desktop and narrow widths. Open-mode server switching and adding servers reuse the host connection flow, including saved-password lookup and trusted password prompts; fixed mode retains its restrictions. All KAAK layout and styling remain in the package.
## Components and permissions
The connection page and voice workspace are full-page declarative surfaces in [components.json](./kaak-voice/components.json). The voice surface requests only the capabilities it uses: visible server shortcuts, channel and member data, cached profile-avatar display inside the trusted member-card widget, channel joining, channel chat, voice status, microphone/output controls, whisper controls, disconnect, and screen-share status/read/control. Its member-card widget explicitly enables share status and watch actions; the KAAK dock uses the host's screen-share control. When a screen-share peer is active, the performance panel shows browser-side video codec and transport metrics. The host renders trusted connection, language, skin, and audio controls. KAAK keeps the shared-screen player inside the central voice-stage column with an explicit responsive height, so the player cannot collapse when the host applies its inline video sizing; member cards scroll in the remaining area. The full source image remains visible with black letterboxing. Server and channel password prompts use the compact dark KAAK dialog style while retaining WebSpeak's trusted password, error, cancel, and retry behavior. It rechecks permissions and connection state when each action runs; approval is local to this skin version and can be revoked from the host access control.
The server header uses the live, privacy-filtered TeamSpeak server label and a trusted `voice.server-switcher` menu backed by favorites and recent connections. Its click handler reuses WebSpeak's existing connection flow with an opaque local ID; addresses and credentials never enter skin data. The left panel uses the trusted `voice.channel-tree` widget to retain TeamSpeak channel nesting, member counts and capacity, available avatars, and mute/speaking/away states. Expanding a branch is local UI state, a single click selects a channel, and double-click joins it. With `memberActions` enabled, right-clicking another member row opens WebSpeak's existing host-owned action menu. With `memberDragDrop` enabled, another member can be dragged onto a different channel row; the member row and target channel receive visual feedback, and the host reuses its existing move-client operation. Both options default off for other skins. The skin does not add KOOK's separate text-channel list.
On desktop, right-clicking another member row in the channel tree or member card opens WebSpeak's existing host-owned member actions menu. Member cards also retain their accessible action button; keyboard activation remains anchored to that button, and touch layouts keep it available. The menu's actions come from WebSpeak and are unchanged by the skin.
Member cards are rendered by WebSpeak's trusted `voice.member-cards` widget. It displays an already available TeamSpeak profile avatar, or the host-generated nickname initial when no avatar is available; image bytes stay in the host and are not exposed in the skin's data context or Wasm runtime. The skin does not receive server addresses, passwords, identity keys, raw audio, private messages, or arbitrary network/storage APIs. Its markup is data-only; it contains no executable JavaScript or Wasm. The `/demo` page uses synthetic data and does not connect to TeamSpeak.
## Files
- Source package: [kaak-voice](./kaak-voice/)
- Component schema: [components.json](./kaak-voice/components.json)
- Distributable archive: [kaak-voice.wskin](./kaak-voice.wskin)
- Shared format and safety rules: [SKIN_DEVELOPMENT.md](../SKIN_DEVELOPMENT.md)
KAAK is included in the public skin selector and its `.wskin` archive is also available as a standalone package. After changing the source, run `npm run skin:kaak:build` to rebuild both copies, then run the package tests and verify the connection page, approval, denial, revoke, desktop, and narrow-screen paths in the local browser. The connected voice surface can be verified when a TeamSpeak session is available.
+10
View File
@@ -0,0 +1,10 @@
# Open Voice Surface scaffold
This importable schema v3 surface package exercises complete public home and voice pages using only declarative nodes and WebSpeak-owned controls. It includes server switching, channel navigation, visible members, per-member screen-share status and a watch action, chat, audio, whisper, connection controls, and the built-in language and skin selectors. It contains no discovery, events, shop, companion, advertising, or administration pages.
This is an implementation scaffold for testing the open-skin format, not a pixel-matched KOOK skin. The visual reference was read in the in-app browser in the first two user-authorized voice rooms. The separate [KAAK voice sample](./KAAK-VOICE.md) records the voice-only layout findings and applies them to the channel and member sidebars. No server/room identifiers, member names, or chat contents were retained. Discovery, companion shop, events, ads, and operator/admin pages are outside the sample's scope.
- Source: [open-voice-surface](./open-voice-surface/)
- Importable package: [open-voice-surface.wskin](./open-voice-surface.wskin)
- Shared component and permission rules: [skin development guide](../SKIN_DEVELOPMENT.md)
- Current runtime contract and safety boundaries: [skin development guide](../SKIN_DEVELOPMENT.md)
Binary file not shown.
+451
View File
@@ -0,0 +1,451 @@
{
"schemaVersion": 3,
"components": [
{
"id": "discord-home",
"name": "{{skin.messages.homeComponentName}}",
"page": "home",
"mode": "surface",
"accessibleName": "{{skin.messages.homeAccessibleName}}",
"permissions": ["ui.surface.replace", "session.status.read"],
"actions": {},
"root": {
"tag": "main",
"part": "home",
"className": "join-page",
"children": [
{
"tag": "header",
"part": "home-header",
"className": "join-header",
"children": [
{
"tag": "div",
"className": "brand-lockup",
"children": [
{ "tag": "span", "className": "dc-brand-mark", "children": [{ "text": "W" }] },
{
"tag": "div",
"children": [
{ "tag": "strong", "children": [{ "text": "WebSpeak" }] },
{ "tag": "small", "children": [{ "text": "{{skin.messages.tagline}}" }] }
]
}
]
},
{
"tag": "div",
"part": "home-header-tools",
"className": "join-header-tools",
"children": [
{ "widget": "home.social-links", "part": "social-links" },
{ "tag": "div", "className": "workspace-skin-switcher", "children": [{ "widget": "app.skin-switcher", "part": "skin-switcher" }] },
{ "tag": "div", "className": "workspace-language", "children": [{ "widget": "app.language-switcher", "part": "language-switcher" }] }
]
}
]
},
{
"tag": "main",
"part": "home-content",
"className": "join-content",
"children": [
{
"tag": "section",
"part": "home-hero",
"className": "join-copy",
"children": [
{
"tag": "div",
"part": "home-hero-eyebrow",
"className": "eyebrow",
"children": [
{ "tag": "span", "className": "eyebrow-dot" },
{ "text": "{{skin.messages.eyebrow}}" }
]
},
{
"tag": "h1",
"part": "home-hero-title",
"children": [
{ "text": "{{skin.messages.heroTitle}}" },
{ "tag": "em", "children": [{ "text": "{{skin.messages.heroAccent}}" }] }
]
},
{
"tag": "p",
"part": "home-hero-description",
"className": "join-description",
"children": [{ "text": "{{skin.messages.heroDescription}}" }]
},
{
"tag": "div",
"part": "home-features",
"className": "promise-list",
"children": [
{
"tag": "div",
"part": "home-feature",
"className": "promise-item",
"children": [
{ "tag": "span", "className": "promise-icon mint", "children": [{ "text": "01" }] },
{ "tag": "span", "children": [
{ "tag": "b", "children": [{ "text": "{{skin.messages.featureOneTitle}}" }] },
{ "tag": "small", "children": [{ "text": "{{skin.messages.featureOneBody}}" }] }
] }
]
},
{
"tag": "div",
"part": "home-feature",
"className": "promise-item",
"children": [
{ "tag": "span", "className": "promise-icon sand", "children": [{ "text": "02" }] },
{ "tag": "span", "children": [
{ "tag": "b", "children": [{ "text": "{{skin.messages.featureTwoTitle}}" }] },
{ "tag": "small", "children": [{ "text": "{{skin.messages.featureTwoBody}}" }] }
] }
]
},
{
"tag": "div",
"part": "home-feature",
"className": "promise-item",
"children": [
{ "tag": "span", "className": "promise-icon mint", "children": [{ "text": "03" }] },
{ "tag": "span", "children": [
{ "tag": "b", "children": [{ "text": "{{skin.messages.featureThreeTitle}}" }] },
{ "tag": "small", "children": [{ "text": "{{skin.messages.featureThreeBody}}" }] }
] }
]
}
]
},
{ "tag": "div", "className": "dc-visitor-slot", "children": [{ "widget": "home.visitor-count", "part": "visitor-count" }] },
{ "tag": "div", "className": "announcement-wrap", "children": [{ "widget": "home.server-announcement", "part": "announcement" }] }
]
},
{
"tag": "section",
"part": "home-join-card",
"className": "join-card",
"children": [
{ "tag": "div", "className": "join-card-effects", "attributes": { "aria-hidden": "true" }, "children": [
{ "tag": "span", "className": "join-card-waveform", "children": [
{ "tag": "i" }, { "tag": "i" }, { "tag": "i" }, { "tag": "i" }, { "tag": "i" }, { "tag": "i" }, { "tag": "i" }, { "tag": "i" }, { "tag": "i" }
] },
{ "tag": "span", "className": "join-card-sonar", "children": [{ "tag": "i" }, { "tag": "i" }, { "tag": "i" }] }
] },
{ "tag": "h2", "part": "home-join-title", "children": [{ "text": "{{skin.messages.connectTitle}}" }] },
{ "tag": "p", "part": "home-join-description", "className": "card-lead", "children": [{ "text": "{{skin.messages.connectDescription}}" }] },
{ "widget": "home.connection-status", "part": "connection-status" },
{ "widget": "home.connection-form", "part": "connection-form" },
{ "tag": "p", "part": "home-security-note", "className": "join-meta", "children": [{ "text": "{{skin.messages.securityNote}}" }] }
]
}
]
},
{
"tag": "footer",
"part": "home-footer",
"className": "join-footer",
"children": [
{ "tag": "span", "children": [{ "text": "WebSpeak" }] },
{ "tag": "span", "className": "footer-separator", "children": [{ "text": "·" }] },
{ "tag": "span", "children": [{ "text": "TeamSpeak" }] },
{ "tag": "span", "className": "footer-spacer" },
{ "tag": "span", "children": [{ "text": "{{skin.messages.footerNote}}" }] }
]
}
]
}
},
{
"id": "discord-workspace",
"name": "{{skin.messages.voiceComponentName}}",
"page": "voice",
"mode": "surface",
"accessibleName": "{{skin.messages.voiceAccessibleName}}",
"stateScope": "session.status.channelId",
"permissions": [
"ui.surface.replace",
"session.status.read",
"session.invite.copy",
"session.channels.read",
"session.members.read",
"session.memberAvatars.read",
"session.channel.join",
"servers.quickList.read",
"servers.quickList.switch",
"chat.channel.read",
"chat.channel.send",
"audio.status.read",
"audio.microphone.control",
"audio.output.control",
"audio.settings.open",
"voice.disconnect",
"voice.screenShare.status.read",
"voice.screenShare.read",
"voice.screenShare.control",
"voice.whisper.status.read",
"voice.whisper.control"
],
"actions": {
"switch-server": { "type": "quickServers.switch", "args": { "quickServerId": "{{server.id}}" } },
"copy-invite-link": { "type": "session.copyInviteLink", "args": {} },
"stop-screen-share": { "type": "voice.stopScreenShare", "args": {} },
"toggle-accompaniment": { "type": "audio.toggleAccompaniment", "args": {} },
"open-audio-settings": { "type": "audio.openSettings", "args": {} },
"toggle-chat": { "type": "ui.toggleState", "args": { "key": "chatopen" } }
},
"state": { "chatopen": true },
"root": {
"tag": "main",
"part": "voice-shell",
"className": "app-shell discord-app-shell",
"children": [
{
"tag": "nav",
"part": "server-rail",
"className": "dc-rail",
"attributes": { "aria-label": "{{skin.messages.serverRailLabel}}" },
"children": [
{
"tag": "div",
"className": "dc-rail-list",
"children": [
{
"tag": "div",
"part": "quick-server-item",
"className": "dc-rail-item",
"repeat": { "path": "servers.quickList", "as": "server" },
"children": [
{ "tag": "span", "className": "dc-rail-pill", "attributes": { "aria-hidden": "true" } },
{
"tag": "button",
"part": "quick-server",
"className": "dc-rail-icon dc-rail-server",
"attributes": {
"type": "button",
"aria-label": "{{skin.messages.switchServer}} {{server.label}}",
"aria-pressed": "{{server.current}}",
"aria-disabled": "{{server.switchRestricted}}",
"title": "{{server.switchTitle}}"
},
"events": { "click": "switch-server" },
"children": [{ "tag": "span", "className": "dc-rail-avatar", "children": [{ "text": "{{server.monogram}}" }] }]
},
{ "tag": "span", "className": "dc-rail-tooltip", "attributes": { "role": "tooltip" }, "children": [{ "tag": "strong", "children": [{ "text": "{{server.label}}" }] }] },
{ "tag": "span", "className": "dc-rail-fav", "when": { "path": "server.favorite", "equals": true }, "attributes": { "aria-label": "{{skin.messages.favoriteServer}}" }, "children": [{ "text": "★" }] }
]
}
]
}
]
},
{
"tag": "aside",
"part": "member-panel",
"className": "dc-sidebar",
"children": [
{
"tag": "header",
"className": "dc-server-header",
"children": [
{ "tag": "strong", "children": [{ "text": "{{session.status.serverLabel}}" }] },
{
"tag": "button",
"part": "invite-copy",
"className": "dc-header-icon",
"attributes": { "type": "button", "aria-label": "{{skin.messages.copyInvite}}", "title": "{{skin.messages.copyInvite}}" },
"events": { "click": "copy-invite-link" },
"children": [{ "text": "↗" }]
}
]
},
{
"tag": "div",
"className": "dc-sidebar-scroll",
"children": [
{ "tag": "div", "className": "dc-category", "children": [{ "text": "{{skin.messages.voiceChannels}}" }] },
{ "tag": "div", "className": "dc-channel-list", "children": [{ "widget": "voice.channel-tree", "part": "channel-tree", "options": { "layout": "server-sidebar", "memberActions": true, "memberDragDrop": true } }] }
]
},
{
"tag": "section",
"part": "connected-status",
"className": "dc-connected",
"when": { "path": "session.status.connected", "equals": true },
"children": [
{
"tag": "div",
"className": "dc-connected-row",
"children": [
{ "tag": "div", "className": "dc-connected-copy", "children": [
{ "tag": "strong", "children": [{ "text": "{{skin.messages.voiceConnected}}" }] },
{ "tag": "small", "children": [{ "text": "{{session.status.channelName}}" }] }
] },
{ "tag": "div", "className": "dc-performance", "children": [{ "widget": "voice.performance-panel", "part": "performance-panel" }] }
]
},
{ "tag": "div", "className": "dc-connected-actions", "children": [{ "widget": "voice.connection-controls", "part": "connection-controls" }] }
]
},
{
"tag": "div",
"part": "audio-dock",
"className": "dc-user-bar",
"children": [
{ "tag": "div", "className": "dc-user-info", "children": [
{ "tag": "span", "className": "dc-user-avatar", "children": [{ "tag": "i", "children": [{ "text": "{{session.status.userName}}" }] }] },
{ "tag": "span", "className": "dc-user-text", "children": [{ "tag": "strong", "children": [{ "text": "{{session.status.userName}}" }] }, { "tag": "small", "children": [{ "text": "{{skin.messages.online}}" }] }] }
] },
{ "tag": "div", "className": "dc-user-actions", "children": [
{ "widget": "voice.audio-controls", "part": "audio-controls" },
{
"tag": "button",
"part": "mobile-audio-settings",
"className": "dc-mobile-audio-settings",
"attributes": { "type": "button", "aria-label": "{{skin.messages.audioSettings}}", "title": "{{skin.messages.audioSettings}}" },
"events": { "click": "open-audio-settings" },
"children": [{
"tag": "svg",
"attributes": { "width": 20, "height": 20, "viewbox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "stroke-width": 1.8, "stroke-linecap": "round", "aria-hidden": "true" },
"children": [
{ "tag": "path", "attributes": { "d": "M4 6h4m4 0h8M4 12h8m4 0h4M4 18h2m4 0h10" } },
{ "tag": "circle", "attributes": { "cx": 10, "cy": 6, "r": 2 } },
{ "tag": "circle", "attributes": { "cx": 14, "cy": 12, "r": 2 } },
{ "tag": "circle", "attributes": { "cx": 8, "cy": 18, "r": 2 } }
]
}]
}
] }
]
}
]
},
{
"tag": "section",
"part": "workspace",
"className": "dc-stage",
"children": [
{
"tag": "header",
"part": "voice-header",
"className": "dc-stage-header",
"children": [
{ "tag": "div", "className": "dc-stage-title", "children": [{ "tag": "h2", "children": [{ "text": "{{session.status.channelName}}" }] }] },
{
"tag": "div",
"part": "header-actions",
"className": "dc-stage-header-actions",
"children": [
{ "tag": "div", "className": "workspace-skin-switcher", "children": [{ "widget": "app.skin-switcher", "part": "skin-switcher" }] },
{ "tag": "div", "className": "workspace-language", "children": [{ "widget": "app.language-switcher", "part": "language-switcher" }] },
{
"tag": "button",
"part": "chat-toggle",
"className": "dc-stage-icon",
"attributes": { "type": "button", "aria-expanded": "{{state.chatopen}}", "aria-label": "{{skin.messages.toggleChat}}", "title": "{{skin.messages.toggleChat}}" },
"events": { "click": "toggle-chat" },
"children": [{ "text": "#" }]
}
]
}
]
},
{ "tag": "div", "className": "dc-stage-notices" },
{
"tag": "div",
"part": "voice-activity",
"className": "dc-stage-canvas",
"children": [
{
"tag": "div",
"className": "dc-stage-grid",
"children": [
{ "widget": "voice.screen-share-player", "part": "screen-share-player" },
{ "widget": "voice.member-cards", "part": "member-cards", "options": { "screenShare": true, "memberActions": true } },
{
"tag": "button",
"part": "invite-tile",
"className": "dc-invite-tile",
"attributes": { "type": "button", "aria-label": "{{skin.messages.invitePeople}}" },
"events": { "click": "copy-invite-link" },
"children": [{ "tag": "strong", "children": [{ "text": "{{skin.messages.invitePeople}}" }] }]
}
]
},
{ "widget": "voice.whisper-controls", "part": "whisper-controls" }
]
},
{
"tag": "footer",
"className": "dc-stage-controls",
"attributes": { "aria-label": "{{skin.messages.voiceControls}}" },
"children": [
{ "tag": "div", "className": "dc-stage-controls-side" },
{
"tag": "div",
"className": "dc-stage-controls-main",
"children": [
{
"tag": "div",
"className": "dc-stage-pill",
"children": [
{ "widget": "voice.screen-share-start", "part": "screen-share-start", "when": { "path": "screenShare.status.active", "equals": false } },
{
"tag": "button",
"part": "screen-share-stop",
"className": "dc-stage-btn",
"when": { "path": "screenShare.status.active", "equals": true },
"attributes": { "type": "button", "aria-pressed": "true", "aria-label": "{{skin.messages.stopScreenShare}}", "title": "{{skin.messages.stopScreenShare}}" },
"events": { "click": "stop-screen-share" },
"children": [{ "text": "▣" }]
},
{
"tag": "button",
"part": "accompaniment-toggle",
"className": "dc-stage-btn",
"attributes": { "type": "button", "aria-label": "{{skin.messages.toggleAccompaniment}}", "title": "{{skin.messages.toggleAccompaniment}}" },
"events": { "click": "toggle-accompaniment" },
"children": [{ "text": "♫" }]
}
]
}
]
},
{ "tag": "div", "className": "dc-stage-controls-side end" }
]
}
]
},
{
"tag": "aside",
"part": "chat-panel",
"className": "dc-chat",
"when": { "path": "state.chatopen", "equals": true },
"children": [
{
"tag": "header",
"className": "dc-chat-header",
"children": [
{ "tag": "div", "className": "dc-chat-title", "children": [{ "tag": "strong", "children": [{ "text": "{{session.status.channelName}}" }] }] },
{
"tag": "button",
"part": "chat-close",
"className": "dc-stage-icon",
"attributes": { "type": "button", "aria-label": "{{skin.messages.closeChat}}", "title": "{{skin.messages.closeChat}}" },
"events": { "click": "toggle-chat" },
"children": [{ "text": "×" }]
}
]
},
{ "widget": "voice.chat-panel", "part": "chat", "className": "dc-chat-body" }
]
}
]
}
}
]
}
+190
View File
@@ -0,0 +1,190 @@
{
"defaultLocale": "en",
"locales": {
"en": {
"messages": {
"homeComponentName": "Discord-style connection home",
"homeAccessibleName": "Discord-style WebSpeak connection page",
"voiceComponentName": "Discord-style voice workspace",
"voiceAccessibleName": "Discord-style WebSpeak voice workspace",
"tagline": "YOUR VOICE, EVERYWHERE.",
"eyebrow": "VOICE, TOGETHER",
"heroTitle": "Your people.",
"heroAccent": "Your voice.",
"heroDescription": "Join your TeamSpeak community from the browser, with the controls you already know.",
"featureOneTitle": "No client install",
"featureOneBody": "Connect directly from your browser.",
"featureTwoTitle": "Low-latency voice",
"featureTwoBody": "Use browser audio with your TeamSpeak server.",
"featureThreeTitle": "One familiar space",
"featureThreeBody": "Keep channels, members and chat together.",
"connectTitle": "Connect to a TeamSpeak server",
"connectDescription": "Enter a server address to join voice.",
"securityNote": "Your connection and identity stay under WebSpeak's control.",
"footerNote": "Voice in your browser",
"serverRailLabel": "Saved and recent servers",
"switchServer": "Switch to",
"favoriteServer": "Saved server",
"copyInvite": "Copy invite link",
"voiceChannels": "VOICE CHANNELS",
"voiceConnected": "VOICE CONNECTED",
"online": "Online",
"audioSettings": "Audio settings",
"toggleChat": "Toggle channel chat",
"invitePeople": "Invite people",
"closeChat": "Close chat",
"voiceControls": "Voice controls",
"stopScreenShare": "Stop screen sharing",
"toggleAccompaniment": "Toggle accompaniment"
}
},
"zh-CN": {
"messages": {
"homeComponentName": "Discord 风格连接首页",
"homeAccessibleName": "Discord 风格 WebSpeak 连接页",
"voiceComponentName": "Discord 风格语音工作区",
"voiceAccessibleName": "Discord 风格 WebSpeak 语音工作区",
"tagline": "你的声音,随时随地。",
"eyebrow": "一起语音",
"heroTitle": "和熟悉的人,",
"heroAccent": "畅快交流。",
"heroDescription": "在浏览器中加入你的 TeamSpeak 社区,使用熟悉的语音控制。",
"featureOneTitle": "无需安装客户端",
"featureOneBody": "直接从浏览器连接。",
"featureTwoTitle": "低延迟语音",
"featureTwoBody": "通过浏览器连接 TeamSpeak 服务器。",
"featureThreeTitle": "熟悉的语音空间",
"featureThreeBody": "频道、成员和聊天一目了然。",
"connectTitle": "连接 TeamSpeak 服务器",
"connectDescription": "填写服务器地址即可加入语音。",
"securityNote": "连接和身份信息由 WebSpeak 安全管理。",
"footerNote": "在浏览器中语音聊天",
"serverRailLabel": "收藏和最近连接的服务器",
"switchServer": "切换到",
"favoriteServer": "已收藏的服务器",
"copyInvite": "复制邀请链接",
"voiceChannels": "语音频道",
"voiceConnected": "语音已连接",
"online": "在线",
"audioSettings": "音频设置",
"toggleChat": "打开或关闭频道聊天",
"invitePeople": "邀请成员",
"closeChat": "关闭聊天",
"voiceControls": "语音控制",
"stopScreenShare": "停止屏幕共享",
"toggleAccompaniment": "切换伴奏"
}
},
"de": {
"messages": {
"homeComponentName": "Discord-inspirierte Verbindungsseite",
"homeAccessibleName": "Discord-inspirierte WebSpeak-Verbindungsseite",
"voiceComponentName": "Discord-inspirierter Sprachbereich",
"voiceAccessibleName": "Discord-inspirierter WebSpeak-Sprachbereich",
"tagline": "DEINE STIMME, ÜBERALL.",
"eyebrow": "ZUSAMMEN SPRECHEN",
"heroTitle": "Deine Leute.",
"heroAccent": "Deine Stimme.",
"heroDescription": "Tritt deiner TeamSpeak-Community direkt im Browser bei.",
"featureOneTitle": "Keine Installation",
"featureOneBody": "Verbinde dich direkt im Browser.",
"featureTwoTitle": "Sprachkommunikation mit geringer Latenz",
"featureTwoBody": "Nutze Browser-Audio mit deinem TeamSpeak-Server.",
"featureThreeTitle": "Ein vertrauter Bereich",
"featureThreeBody": "Kanäle, Mitglieder und Chat an einem Ort.",
"connectTitle": "Mit einem TeamSpeak-Server verbinden",
"connectDescription": "Gib die Serveradresse ein, um beizutreten.",
"securityNote": "WebSpeak schützt deine Verbindung und Identität.",
"footerNote": "Sprache im Browser",
"serverRailLabel": "Gespeicherte und zuletzt verwendete Server",
"switchServer": "Wechseln zu",
"favoriteServer": "Gespeicherter Server",
"copyInvite": "Einladungslink kopieren",
"voiceChannels": "SPRACHKANÄLE",
"voiceConnected": "SPRACHE VERBUNDEN",
"online": "Online",
"audioSettings": "Audioeinstellungen",
"toggleChat": "Kanalchat umschalten",
"invitePeople": "Mitglieder einladen",
"closeChat": "Chat schließen",
"voiceControls": "Sprachsteuerung",
"stopScreenShare": "Bildschirmfreigabe beenden",
"toggleAccompaniment": "Begleitung umschalten"
}
},
"ru": {
"messages": {
"homeComponentName": "Главная WebSpeak в стиле Discord",
"homeAccessibleName": "Страница подключения WebSpeak в стиле Discord",
"voiceComponentName": "Голосовое пространство в стиле Discord",
"voiceAccessibleName": "Голосовое пространство WebSpeak в стиле Discord",
"tagline": "ТВОЙ ГОЛОС — ВЕЗДЕ.",
"eyebrow": "ОБЩАЙТЕСЬ ВМЕСТЕ",
"heroTitle": "Твои друзья.",
"heroAccent": "Твой голос.",
"heroDescription": "Подключайтесь к сообществу TeamSpeak прямо в браузере.",
"featureOneTitle": "Без установки клиента",
"featureOneBody": "Подключайтесь прямо из браузера.",
"featureTwoTitle": "Голос с низкой задержкой",
"featureTwoBody": "Используйте браузерное аудио с сервером TeamSpeak.",
"featureThreeTitle": "Привычное пространство",
"featureThreeBody": "Каналы, участники и чат в одном месте.",
"connectTitle": "Подключиться к серверу TeamSpeak",
"connectDescription": "Введите адрес сервера, чтобы подключиться.",
"securityNote": "WebSpeak защищает подключение и данные личности.",
"footerNote": "Голосовое общение в браузере",
"serverRailLabel": "Избранные и недавние серверы",
"switchServer": "Переключиться на",
"favoriteServer": "Сохранённый сервер",
"copyInvite": "Скопировать ссылку-приглашение",
"voiceChannels": "ГОЛОСОВЫЕ КАНАЛЫ",
"voiceConnected": "ГОЛОС ПОДКЛЮЧЁН",
"online": "В сети",
"audioSettings": "Настройки звука",
"toggleChat": "Показать или скрыть чат канала",
"invitePeople": "Пригласить участников",
"closeChat": "Закрыть чат",
"voiceControls": "Управление голосом",
"stopScreenShare": "Остановить показ экрана",
"toggleAccompaniment": "Переключить сопровождение"
}
},
"ja": {
"messages": {
"homeComponentName": "Discord 風の接続ホーム",
"homeAccessibleName": "Discord 風 WebSpeak 接続ページ",
"voiceComponentName": "Discord 風のボイスワークスペース",
"voiceAccessibleName": "Discord 風 WebSpeak ボイスワークスペース",
"tagline": "あなたの声を、どこでも。",
"eyebrow": "一緒にボイスチャット",
"heroTitle": "仲間と、",
"heroAccent": "声をつなごう。",
"heroDescription": "ブラウザーから TeamSpeak コミュニティに参加できます。",
"featureOneTitle": "クライアント不要",
"featureOneBody": "ブラウザーから直接接続。",
"featureTwoTitle": "低遅延の音声",
"featureTwoBody": "TeamSpeak サーバーでブラウザー音声を利用。",
"featureThreeTitle": "使い慣れた空間",
"featureThreeBody": "チャンネル、メンバー、チャットをまとめて表示。",
"connectTitle": "TeamSpeak サーバーに接続",
"connectDescription": "サーバーアドレスを入力して参加します。",
"securityNote": "接続と ID 情報は WebSpeak が安全に管理します。",
"footerNote": "ブラウザーでボイスチャット",
"serverRailLabel": "保存済み・最近のサーバー",
"switchServer": "切り替え先",
"favoriteServer": "保存済みサーバー",
"copyInvite": "招待リンクをコピー",
"voiceChannels": "ボイスチャンネル",
"voiceConnected": "ボイス接続中",
"online": "オンライン",
"audioSettings": "音声設定",
"toggleChat": "チャンネルチャットの表示切替",
"invitePeople": "メンバーを招待",
"closeChat": "チャットを閉じる",
"voiceControls": "ボイスコントロール",
"stopScreenShare": "画面共有を停止",
"toggleAccompaniment": "伴奏を切り替え"
}
}
}
}
+14
View File
@@ -0,0 +1,14 @@
{
"schemaVersion": 3,
"packageType": "open-skin",
"id": "community.discord-voice",
"name": "Discord Voice",
"version": "1.0.11",
"author": "WebSpeak Project",
"license": "AGPL-3.0-only",
"description": "A Discord-inspired dark voice workspace built with WebSpeak's portable open-skin interface.",
"entry": "skin.css",
"components": "components.json",
"content": "content.json",
"minAppVersion": "0.2.8"
}
File diff suppressed because it is too large. Load diff
Binary file not shown.
@@ -0,0 +1,9 @@
# Harbor Voice Workspace
这是一个 KOOK 语音工作区风格的完整皮肤测试包,参考范围只限语音客户端:服务器快捷栏、频道列表、中央聊天、成员列表和底部语音控制。没有复用 KOOK 的图片、标志、广告或站点文案,也没有加入发现、陪玩、派对、商城、活动通知、排行榜或管理后台。
皮肤使用 `components.json` 的完整声明式 surface 自己构建频道树、聊天消息与输入框、成员状态和悄悄话控制;底部音频区嵌入 WebSpeak 的可信音频控件,继续使用现有麦克风/扬声器开关和音频设置(包括麦克风灵敏度)。样例隐藏与语音布局无关的伴奏开关;断开和频道控制仍由 WebSpeak 校验并执行。频道缩进直接映射 TeamSpeak 公开树深度;频道单击只改变皮肤本地选中态,双击才请求 TeamSpeak 切换频道。语音成员列表显示公开的说话、静音和离开状态。消息、频道和成员数据由权限筛选后提供。屏幕共享启动保留一个可自行排版和换肤的可信宿主按钮,以保留浏览器要求的真实用户手势;视频流和设备 API 不交给皮肤代码。皮肤不读取服务器地址、账号凭据或连接密钥,也不包含可执行 JavaScript/Wasm;这个样例用于验证 v3 surface 的可定制界面和交互,v4 Wasm 插件运行时另由运行时测试覆盖。
桌面布局保留四个区域:服务器快捷栏、频道树、聊天区和成员区;服务器栏底部展示当前 TeamSpeak 昵称,连接后语音控制坞固定在频道栏底部。昵称项只呈现当前会话身份,不模拟 KOOK 账号或资料运营功能。窄屏下服务器栏保持可用,频道项转为横向滚动,成员与语音控制各自占一行,基础连接控制不被隐藏。
`manifest.json`、`components.json` 与 `skin.css` 是可编辑源码。根目录的 `../harbor-voice.wskin` 是源码打包后的本地导入包;源码修改后运行 `npm run skin:harbor:build` 重新打包,再在测试实例的皮肤管理页导入验证。当前没有加入公共皮肤目录或发布到服务器。
+480
View File
@@ -0,0 +1,480 @@
{
"schemaVersion": 3,
"components": [
{
"id": "harbor-home",
"name": "Harbor connection home",
"page": "home",
"mode": "surface",
"accessibleName": "WebSpeak connection page",
"permissions": ["ui.surface.replace"],
"actions": {},
"root": {
"tag": "main",
"part": "home",
"children": [
{
"tag": "header",
"part": "home-header",
"children": [
{ "tag": "span", "part": "brand-mark", "children": [{ "text": "W" }] },
{ "tag": "span", "part": "brand-name", "children": [{ "text": "WEBSPEAK" }] },
{ "widget": "app.language-switcher", "part": "language" },
{ "widget": "app.skin-switcher", "part": "skin" }
]
},
{
"tag": "section",
"part": "connection-card",
"children": [
{ "tag": "p", "part": "eyebrow", "children": [{ "text": "VOICE CLIENT" }] },
{ "tag": "h1", "part": "title", "children": [{ "text": "Connect with your community" }] },
{ "tag": "p", "part": "description", "children": [{ "text": "Choose a TeamSpeak server and return to your voice channels." }] },
{ "widget": "home.connection-form", "part": "connection-form" }
]
},
{
"tag": "footer",
"part": "home-footer",
"children": [{ "text": "Your connection and identity stay under WebSpeak's control." }]
}
]
}
},
{
"id": "harbor-workspace",
"name": "Harbor voice workspace",
"page": "voice",
"mode": "surface",
"accessibleName": "WebSpeak voice workspace",
"permissions": [
"ui.surface.replace",
"session.status.read",
"session.channels.read",
"session.members.read",
"session.channel.join",
"servers.quickList.read",
"servers.quickList.switch",
"chat.channel.read",
"chat.channel.send",
"audio.status.read",
"audio.microphone.control",
"audio.output.control",
"voice.whisper.status.read",
"voice.whisper.control",
"voice.disconnect",
"voice.screenShare.read",
"voice.screenShare.control"
],
"actions": {
"switch-server": {
"type": "quickServers.switch",
"args": { "quickServerId": "{{server.id}}" }
},
"select-channel": {
"type": "ui.setState",
"args": { "key": "selectedchannel", "value": "{{channel.id}}" }
},
"join-channel": {
"type": "voice.joinChannel",
"args": { "channelId": "{{channel.id}}" }
},
"send-message": {
"type": "chat.sendMessage",
"args": { "text": "{{state.message}}" }
},
"disconnect": { "type": "voice.disconnect", "args": {} },
"whisper-on": { "type": "voice.setWhisperActive", "args": { "active": true } },
"whisper-off": { "type": "voice.setWhisperActive", "args": { "active": false } },
"watch-screen-share": {
"type": "voice.joinScreenShare",
"args": { "streamId": "{{member.screenShareStreamId}}" }
},
"watch-channel-member-screen-share": {
"type": "voice.joinScreenShare",
"args": { "streamId": "{{voicemember.screenShareStreamId}}" }
}
},
"state": { "selectedchannel": "", "message": "" },
"root": {
"tag": "main",
"part": "workspace",
"children": [
{
"tag": "header",
"part": "topbar",
"children": [
{ "tag": "span", "part": "brand-mark", "children": [{ "text": "W" }] },
{ "tag": "span", "part": "brand-name", "children": [{ "text": "WEBSPEAK" }] },
{ "tag": "span", "part": "server-title", "children": [{ "text": "{{session.status.serverLabel}}" }] },
{ "widget": "app.language-switcher", "part": "language" },
{ "widget": "app.skin-switcher", "part": "skin" }
]
},
{
"tag": "nav",
"part": "server-rail",
"attributes": { "aria-label": "Favorite and recent servers" },
"children": [
{
"tag": "div",
"part": "quick-server-item",
"repeat": { "path": "servers.quickList", "as": "server" },
"children": [
{
"tag": "button",
"part": "quick-server",
"attributes": {
"type": "button",
"aria-current": "{{server.current}}",
"aria-label": "Switch to {{server.label}}"
},
"events": { "click": "switch-server" },
"children": [
{ "tag": "span", "part": "server-monogram", "children": [{ "text": "{{server.label}}" }] },
{
"tag": "span",
"part": "server-kind",
"when": { "path": "server.favorite", "equals": true },
"children": [{ "text": "Saved" }]
},
{
"tag": "span",
"part": "server-kind",
"when": { "path": "server.kind", "equals": "recent" },
"children": [{ "text": "Recent" }]
}
]
}
]
}
]
},
{
"tag": "aside",
"part": "channel-panel",
"attributes": { "aria-label": "Server channels" },
"children": [
{
"tag": "header",
"part": "server-summary",
"children": [
{ "tag": "strong", "part": "server-name", "children": [{ "text": "{{session.status.serverLabel}}" }] },
{ "tag": "small", "part": "server-subtitle", "children": [{ "text": "VOICE CHANNELS" }] }
]
},
{
"tag": "nav",
"part": "channel-list",
"attributes": { "aria-label": "Channels" },
"children": [
{ "tag": "h2", "part": "section-label", "children": [{ "text": "CHANNELS" }] },
{
"tag": "div",
"part": "channel-item",
"repeat": { "path": "session.channels", "as": "channel" },
"children": [
{
"tag": "button",
"part": "channel-row",
"attributes": {
"type": "button",
"aria-current": "{{channel.current}}",
"aria-label": "Double-click to join {{channel.name}}",
"data-depth": "{{channel.depth}}"
},
"events": { "click": "select-channel", "dblclick": "join-channel" },
"children": [
{ "tag": "span", "part": "channel-glyph", "children": [{ "text": "◉" }] },
{ "tag": "span", "part": "channel-name", "children": [{ "text": "{{channel.name}}" }] },
{ "tag": "small", "part": "channel-count", "children": [{ "text": "{{channel.memberCount}}" }] },
{
"tag": "span",
"part": "selected-channel-indicator",
"when": { "path": "state.selectedchannel", "equals": "{{channel.id}}" },
"attributes": { "aria-label": "Selected" }
}
]
},
{
"tag": "ul",
"part": "channel-voice-members",
"when": { "path": "channel.current", "equals": true },
"attributes": { "aria-label": "Members connected to this channel" },
"children": [
{
"tag": "li",
"part": "channel-voice-member",
"repeat": { "path": "channel.members", "as": "voicemember" },
"children": [
{ "tag": "span", "part": "channel-member-avatar", "children": [{ "text": "{{voicemember.name}}" }] },
{ "tag": "span", "part": "channel-member-name", "children": [{ "text": "{{voicemember.name}}" }] },
{
"tag": "span",
"part": "channel-member-muted",
"when": { "path": "voicemember.status", "equals": "muted" },
"attributes": { "aria-label": "Microphone muted" },
"children": [{ "text": "MIC OFF" }]
},
{
"tag": "span",
"part": "channel-member-away",
"when": { "path": "voicemember.status", "equals": "away" },
"attributes": { "aria-label": "Away" },
"children": [{ "text": "AWAY" }]
},
{
"tag": "span",
"part": "channel-member-state",
"when": { "path": "voicemember.self", "equals": true },
"children": [{ "text": "YOU" }]
},
{
"tag": "span",
"part": "channel-member-state",
"when": { "path": "voicemember.speaking", "equals": true },
"attributes": { "aria-label": "Speaking" },
"children": [{ "text": "●" }]
},
{
"tag": "div",
"part": "channel-member-screen-share",
"when": { "path": "voicemember.screenSharing", "equals": true },
"children": [
{ "tag": "span", "part": "channel-member-screen-share-live", "children": [{ "text": "SHARING" }] },
{
"tag": "button",
"part": "channel-member-screen-share-watch",
"when": { "path": "voicemember.self", "equals": false },
"attributes": { "type": "button", "aria-label": "Watch {{voicemember.name}}'s screen" },
"events": { "click": "watch-channel-member-screen-share" },
"children": [{ "text": "WATCH" }]
}
]
}
]
}
]
}
]
}
]
}
]
},
{
"tag": "section",
"part": "conversation",
"attributes": { "aria-label": "Current channel conversation" },
"children": [
{
"tag": "header",
"part": "conversation-heading",
"children": [
{ "tag": "span", "part": "conversation-glyph", "children": [{ "text": "◉" }] },
{ "tag": "h1", "part": "channel-title", "children": [{ "text": "{{session.status.channelName}}" }] },
{
"tag": "span",
"part": "connection-state",
"when": { "path": "session.status.connected", "equals": true },
"children": [{ "text": "CONNECTED" }]
}
]
},
{
"tag": "div",
"part": "chat",
"children": [
{
"tag": "div",
"part": "chat-message-list",
"attributes": { "aria-label": "Current channel messages", "role": "log", "aria-live": "polite" },
"children": [
{
"tag": "p",
"part": "chat-empty",
"when": { "path": "chat.messages", "empty": true },
"children": [{ "text": "No messages yet. Say hello to the channel." }]
},
{
"tag": "article",
"part": "chat-message",
"repeat": { "path": "chat.messages", "as": "message" },
"children": [
{
"tag": "header",
"part": "chat-message-heading",
"children": [
{ "tag": "strong", "part": "chat-message-author", "children": [{ "text": "{{message.author}}" }] },
{ "tag": "time", "part": "chat-message-time", "children": [{ "text": "{{message.time}}" }] }
]
},
{ "tag": "p", "part": "chat-message-text", "children": [{ "text": "{{message.text}}" }] }
]
}
]
},
{
"tag": "form",
"part": "chat-composer",
"events": { "submit": "send-message" },
"children": [
{
"tag": "input",
"part": "chat-input",
"bindValue": "message",
"attributes": {
"type": "text",
"maxlength": 1000,
"autocomplete": "off",
"placeholder": "Message this channel",
"aria-label": "Message this channel"
}
},
{
"tag": "button",
"part": "chat-send",
"attributes": { "type": "submit", "aria-label": "Send message" },
"children": [{ "text": "Send" }]
}
]
}
]
},
{ "widget": "voice.screen-share-player", "part": "screen-player" }
]
},
{
"tag": "aside",
"part": "members-panel",
"attributes": { "aria-label": "Members in this channel" },
"children": [
{
"tag": "header",
"part": "members-heading",
"children": [
{ "tag": "h2", "part": "section-label", "children": [{ "text": "MEMBERS" }] }
]
},
{
"tag": "ul",
"part": "member-list",
"children": [
{
"tag": "li",
"part": "member-row",
"repeat": { "path": "session.members", "as": "member" },
"children": [
{ "tag": "span", "part": "member-avatar", "children": [{ "text": "{{member.name}}" }] },
{ "tag": "span", "part": "member-name", "children": [{ "text": "{{member.name}}" }] },
{
"tag": "span",
"part": "speaking-indicator",
"when": { "path": "member.speaking", "equals": true },
"attributes": { "aria-label": "Speaking" },
"children": [{ "text": "SPEAKING" }]
},
{
"tag": "span",
"part": "member-muted-state",
"when": { "path": "member.status", "equals": "muted" },
"attributes": { "aria-label": "Microphone muted" },
"children": [{ "text": "MIC OFF" }]
},
{
"tag": "span",
"part": "member-away-state",
"when": { "path": "member.status", "equals": "away" },
"attributes": { "aria-label": "Away" },
"children": [{ "text": "AWAY" }]
},
{
"tag": "div",
"part": "member-screen-share",
"when": { "path": "member.screenSharing", "equals": true },
"children": [
{ "tag": "span", "part": "member-screen-share-live", "children": [{ "text": "SHARING" }] },
{
"tag": "button",
"part": "member-screen-share-watch",
"when": { "path": "member.self", "equals": false },
"attributes": { "type": "button", "aria-label": "Watch {{member.name}}'s screen" },
"events": { "click": "watch-screen-share" },
"children": [{ "text": "WATCH" }]
}
]
}
]
}
]
},
{
"tag": "div",
"part": "whisper-controls",
"children": [
{
"tag": "button",
"part": "whisper-start",
"when": { "path": "whisper.status.active", "equals": false },
"attributes": { "type": "button", "aria-label": "Start whisper" },
"events": { "click": "whisper-on" },
"children": [{ "text": "Whisper" }]
},
{
"tag": "button",
"part": "whisper-stop",
"when": { "path": "whisper.status.active", "equals": true },
"attributes": { "type": "button", "aria-label": "Stop whisper" },
"events": { "click": "whisper-off" },
"children": [{ "text": "Whisper on" }]
}
]
}
]
},
{
"tag": "footer",
"part": "voice-dock",
"attributes": { "aria-label": "Voice controls" },
"children": [
{
"tag": "div",
"part": "voice-dock-heading",
"children": [
{ "tag": "span", "part": "connection-indicator", "children": [{ "text": "●" }] },
{ "tag": "strong", "part": "voice-channel-name", "children": [{ "text": "{{session.status.channelName}}" }] },
{ "tag": "span", "part": "voice-dock-caption", "children": [{ "text": "VOICE CONNECTED" }] }
]
},
{
"tag": "div",
"part": "voice-dock-actions",
"children": [
{ "widget": "voice.screen-share-start", "part": "screen-share-start" },
{ "widget": "voice.audio-controls", "part": "audio-controls" },
{
"tag": "button",
"part": "disconnect-control",
"attributes": { "type": "button", "aria-label": "Disconnect voice" },
"events": { "click": "disconnect" },
"children": [{ "text": "Leave" }]
}
]
}
]
},
{
"tag": "div",
"part": "identity-entry",
"when": { "path": "session.status.userName" },
"attributes": { "role": "group", "aria-label": "Current TeamSpeak identity" },
"children": [
{ "tag": "span", "part": "identity-monogram", "children": [{ "text": "TS" }] },
{ "tag": "span", "part": "identity-name", "children": [{ "text": "{{session.status.userName}}" }] }
]
}
]
}
}
]
}
+13
View File
@@ -0,0 +1,13 @@
{
"schemaVersion": 3,
"packageType": "open-skin",
"id": "community.harbor-voice",
"name": "Harbor Voice Workspace",
"version": "1.1.1",
"author": "WebSpeak Project",
"license": "AGPL-3.0-only",
"description": "A KOOK-inspired dark voice workspace using only WebSpeak host controls and public session data.",
"entry": "skin.css",
"components": "components.json",
"minAppVersion": "0.2.7"
}
+946
View File
@@ -0,0 +1,946 @@
:root {
color-scheme: dark;
--skin-harbor-bg: #17181b;
--skin-harbor-rail: #141518;
--skin-harbor-panel: #1d1e22;
--skin-harbor-raised: #292a2f;
--skin-harbor-hover: #303137;
--skin-harbor-border: #303136;
--skin-harbor-text: #f0f1f3;
--skin-harbor-muted: #a0a2a8;
--skin-harbor-dim: #777a82;
--skin-harbor-accent: #58c877;
--skin-harbor-danger: #e36b6b;
--skin-harbor-radius: 9px;
}
[data-ws-plugin-part="harbor-home"] {
display: grid;
grid-template-rows: auto 1fr auto;
justify-items: center;
min-height: 100dvh;
gap: 28px;
padding: clamp(16px, 4vw, 42px);
color: var(--skin-harbor-text);
background:
radial-gradient(ellipse at 50% 44%, #25272b 0, transparent 58%),
var(--skin-harbor-bg);
}
[data-ws-plugin-part="harbor-home.home-header"] {
display: flex;
align-items: center;
gap: 11px;
width: min(100%, 1080px);
}
[data-ws-plugin-part="harbor-home.brand-mark"],
[data-ws-plugin-part="harbor-workspace.brand-mark"] {
display: grid;
place-items: center;
flex: 0 0 34px;
width: 34px;
height: 34px;
border-radius: 50%;
color: #101512;
background: var(--skin-harbor-accent);
font-size: 14px;
font-weight: 900;
}
[data-ws-plugin-part="harbor-home.brand-name"],
[data-ws-plugin-part="harbor-workspace.brand-name"] {
color: var(--skin-harbor-text);
font-size: 12px;
font-weight: 850;
letter-spacing: .1em;
}
[data-ws-plugin-part="harbor-home.language"] { margin-left: auto; }
[data-ws-plugin-part="harbor-home.connection-card"] {
align-self: center;
width: min(100%, 510px);
padding: clamp(22px, 5vw, 40px);
border: 1px solid var(--skin-harbor-border);
border-radius: 16px;
background: color-mix(in srgb, var(--skin-harbor-panel) 96%, transparent);
box-shadow: 0 24px 70px #0007;
}
[data-ws-plugin-part="harbor-home.eyebrow"] {
color: var(--skin-harbor-accent);
font-size: 10px;
font-weight: 800;
letter-spacing: .14em;
}
[data-ws-plugin-part="harbor-home.title"] {
margin: 12px 0 8px;
font-size: clamp(26px, 5vw, 38px);
letter-spacing: -.04em;
}
[data-ws-plugin-part="harbor-home.description"],
[data-ws-plugin-part="harbor-home.home-footer"] {
color: var(--skin-harbor-muted);
line-height: 1.6;
}
[data-ws-plugin-part="harbor-home.home-footer"] {
width: min(100%, 1080px);
font-size: 12px;
}
[data-ws-plugin-part="harbor-home"] .join-card {
color: var(--skin-harbor-text);
background: transparent;
border-color: var(--skin-harbor-border);
box-shadow: none;
}
[data-ws-plugin-part="harbor-home"] .field-wrap,
[data-ws-plugin-part="harbor-home"] .settings-select {
color: var(--skin-harbor-muted);
background: var(--skin-harbor-raised);
border-color: var(--skin-harbor-border);
}
[data-ws-plugin-part="harbor-home"] .field-wrap input,
[data-ws-plugin-part="harbor-home"] .settings-select {
color: var(--skin-harbor-text);
}
[data-ws-plugin-part="harbor-workspace"] {
display: grid;
grid-template-columns: 68px 276px minmax(340px, 1fr) 244px;
grid-template-rows: 54px minmax(0, 1fr);
width: 100%;
height: 100dvh;
min-height: 560px;
overflow: hidden;
color: var(--skin-harbor-text);
background: var(--skin-harbor-bg);
font-family: Inter, "Segoe UI", system-ui, sans-serif;
}
[data-ws-plugin-part="harbor-workspace"],
[data-ws-plugin-part="harbor-workspace"] * {
scrollbar-color: #4a4c51 transparent;
scrollbar-width: thin;
}
[data-ws-plugin-part="harbor-workspace"] *::-webkit-scrollbar { width: 6px; height: 6px; }
[data-ws-plugin-part="harbor-workspace"] *::-webkit-scrollbar-thumb { background: #4a4c51; border-radius: 6px; }
[data-ws-plugin-part="harbor-workspace.topbar"] {
z-index: 2;
grid-column: 1 / -1;
grid-row: 1;
display: flex;
align-items: center;
gap: 11px;
min-width: 0;
padding: 0 14px;
border-bottom: 1px solid var(--skin-harbor-border);
background: var(--skin-harbor-rail);
}
[data-ws-plugin-part="harbor-workspace.server-title"] {
overflow: hidden;
margin-right: auto;
color: var(--skin-harbor-muted);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
[data-ws-plugin-part="harbor-workspace.server-rail"] {
grid-column: 1;
grid-row: 2;
display: flex;
flex-direction: column;
align-items: center;
gap: 9px;
min-height: 0;
overflow-y: auto;
padding: 13px 7px;
background: var(--skin-harbor-rail);
border-right: 1px solid #ffffff08;
}
[data-ws-plugin-part="harbor-workspace.quick-server"] {
display: grid;
justify-items: center;
gap: 3px;
width: 52px;
min-height: 54px;
padding: 4px;
border: 0;
border-radius: 13px;
color: var(--skin-harbor-muted);
background: transparent;
cursor: pointer;
}
[data-ws-plugin-part="harbor-workspace.quick-server"]:hover,
[data-ws-plugin-part="harbor-workspace.quick-server"]:focus-visible {
color: var(--skin-harbor-text);
background: var(--skin-harbor-raised);
}
[data-ws-plugin-part="harbor-workspace.quick-server"][aria-current="true"] {
color: var(--skin-harbor-text);
background: var(--skin-harbor-raised);
box-shadow: inset 3px 0 var(--skin-harbor-accent);
}
[data-ws-plugin-part="harbor-workspace.server-monogram"] {
display: grid;
place-items: center;
width: 40px;
height: 40px;
overflow: hidden;
border: 1px solid #ffffff12;
border-radius: 13px;
color: var(--skin-harbor-text);
background: linear-gradient(145deg, #383a40, #222429);
font-size: 11px;
font-weight: 800;
text-align: center;
}
[data-ws-plugin-part="harbor-workspace.server-kind"] {
color: var(--skin-harbor-dim);
font-size: 8px;
line-height: 1;
}
[data-ws-plugin-part="harbor-workspace.identity-entry"] {
display: grid;
justify-items: center;
gap: 4px;
width: 100%;
margin-top: auto;
padding: 9px 1px 1px;
border-top: 1px solid var(--skin-harbor-border);
}
[data-ws-plugin-part="harbor-workspace.identity-monogram"] {
display: grid;
place-items: center;
width: 38px;
height: 38px;
border: 1px solid #ffffff18;
border-radius: 50%;
color: var(--skin-harbor-text);
background: linear-gradient(145deg, #4a4c53, #292a30);
font-size: 10px;
font-weight: 850;
}
[data-ws-plugin-part="harbor-workspace.identity-name"] {
display: block;
max-width: 100%;
overflow: hidden;
color: var(--skin-harbor-muted);
font-size: 8px;
text-overflow: ellipsis;
white-space: nowrap;
}
[data-ws-plugin-part="harbor-workspace.channel-panel"] {
z-index: 1;
grid-column: 2;
grid-row: 2;
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
overflow: auto;
padding: 12px 9px 118px;
border-right: 1px solid var(--skin-harbor-border);
background: var(--skin-harbor-panel);
}
[data-ws-plugin-part="harbor-workspace.server-summary"] {
display: flex;
flex-direction: column;
gap: 4px;
min-height: 49px;
padding: 3px 9px 13px;
border-bottom: 1px solid #ffffff0b;
}
[data-ws-plugin-part="harbor-workspace.server-name"] {
overflow: hidden;
color: var(--skin-harbor-text);
font-size: 13px;
text-overflow: ellipsis;
white-space: nowrap;
}
[data-ws-plugin-part="harbor-workspace.server-subtitle"],
[data-ws-plugin-part="harbor-workspace.section-label"] {
color: var(--skin-harbor-dim);
font-size: 10px;
font-weight: 800;
letter-spacing: .08em;
}
[data-ws-plugin-part="harbor-workspace.channel-list"] {
display: flex;
flex-direction: column;
gap: 2px;
min-height: 0;
padding-top: 13px;
}
[data-ws-plugin-part="harbor-workspace.section-label"] { margin: 0 8px 7px; }
[data-ws-plugin-part="harbor-workspace.channel-row"] {
position: relative;
display: flex;
align-items: center;
gap: 9px;
width: 100%;
min-height: 38px;
padding: 6px 9px;
border: 0;
border-radius: 6px;
color: var(--skin-harbor-muted);
background: transparent;
text-align: left;
cursor: pointer;
}
[data-ws-plugin-part="harbor-workspace.selected-channel-indicator"] {
position: absolute;
inset: 0;
border: 1px solid var(--skin-harbor-accent);
border-radius: inherit;
pointer-events: none;
}
[data-ws-plugin-part="harbor-workspace.channel-row"]:hover,
[data-ws-plugin-part="harbor-workspace.channel-row"][aria-current="true"] {
color: var(--skin-harbor-text);
background: var(--skin-harbor-raised);
}
[data-ws-plugin-part="harbor-workspace.channel-row"][aria-current="true"] {
box-shadow: inset 2px 0 var(--skin-harbor-accent);
}
[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth="1"] { padding-inline-start: 19px; }
[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth="2"] { padding-inline-start: 29px; }
[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth="3"] { padding-inline-start: 39px; }
[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth="4"] { padding-inline-start: 49px; }
[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth="5"] { padding-inline-start: 59px; }
[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth="6"] { padding-inline-start: 69px; }
[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth="7"] { padding-inline-start: 79px; }
[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth="8"] { padding-inline-start: 89px; }
[data-ws-plugin-part="harbor-workspace.channel-glyph"] {
display: grid;
place-items: center;
width: 18px;
color: var(--skin-harbor-dim);
font-size: 13px;
}
[data-ws-plugin-part="harbor-workspace.channel-name"] {
min-width: 0;
flex: 1;
overflow: hidden;
font-size: 13px;
text-overflow: ellipsis;
white-space: nowrap;
}
[data-ws-plugin-part="harbor-workspace.channel-count"] {
color: var(--skin-harbor-dim);
font-size: 10px;
}
[data-ws-plugin-part="harbor-workspace.channel-voice-members"] {
display: grid;
gap: 1px;
margin: 0 0 6px 29px;
padding: 2px 0 3px;
list-style: none;
}
[data-ws-plugin-part="harbor-workspace.channel-voice-member"] {
display: grid;
grid-template-columns: 18px minmax(0, 1fr) auto auto;
align-items: center;
gap: 5px;
min-height: 21px;
color: var(--skin-harbor-muted);
font-size: 10px;
}
[data-ws-plugin-part="harbor-workspace.channel-member-avatar"] {
display: grid;
place-items: center;
width: 16px;
height: 16px;
overflow: hidden;
border-radius: 50%;
color: var(--skin-harbor-text);
background: #393b41;
font-size: 7px;
font-weight: 800;
}
[data-ws-plugin-part="harbor-workspace.channel-member-name"] {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
[data-ws-plugin-part="harbor-workspace.channel-member-state"] {
color: var(--skin-harbor-accent);
font-size: 8px;
font-weight: 800;
}
[data-ws-plugin-part="harbor-workspace.channel-member-muted"],
[data-ws-plugin-part="harbor-workspace.member-muted-state"] {
color: var(--skin-harbor-danger);
font-size: 8px;
font-weight: 800;
}
[data-ws-plugin-part="harbor-workspace.channel-member-away"],
[data-ws-plugin-part="harbor-workspace.member-away-state"] {
color: var(--skin-harbor-dim);
font-size: 8px;
font-weight: 800;
}
[data-ws-plugin-part="harbor-workspace.channel-member-screen-share"] {
grid-column: 2 / -1;
display: flex;
align-items: center;
gap: 6px;
color: var(--skin-harbor-accent);
font-size: 8px;
font-weight: 800;
}
[data-ws-plugin-part="harbor-workspace.channel-member-screen-share-watch"],
[data-ws-plugin-part="harbor-workspace.member-screen-share-watch"] {
min-height: 28px;
padding: 0 8px;
border: 1px solid #7ed95755;
border-radius: 5px;
color: var(--skin-harbor-text);
background: var(--skin-harbor-raised);
font-size: 9px;
font-weight: 800;
cursor: pointer;
}
[data-ws-plugin-part="harbor-workspace.channel-member-screen-share-watch"]:hover,
[data-ws-plugin-part="harbor-workspace.member-screen-share-watch"]:hover {
color: var(--skin-harbor-accent);
background: #313238;
}
[data-ws-plugin-part="harbor-workspace.conversation"] {
grid-column: 3;
grid-row: 2;
display: grid;
grid-template-rows: 48px minmax(0, 1fr) auto;
gap: 10px;
min-width: 0;
min-height: 0;
padding: 0 17px 12px;
background: var(--skin-harbor-bg);
}
[data-ws-plugin-part="harbor-workspace.conversation-heading"] {
display: flex;
align-items: center;
gap: 9px;
min-width: 0;
border-bottom: 1px solid var(--skin-harbor-border);
}
[data-ws-plugin-part="harbor-workspace.conversation-glyph"] {
color: var(--skin-harbor-muted);
font-size: 15px;
}
[data-ws-plugin-part="harbor-workspace.channel-title"] {
min-width: 0;
margin: 0 auto 0 0;
overflow: hidden;
font-size: 14px;
font-weight: 700;
text-overflow: ellipsis;
white-space: nowrap;
}
[data-ws-plugin-part="harbor-workspace.connection-state"] {
color: var(--skin-harbor-accent);
font-size: 9px;
font-weight: 800;
letter-spacing: .06em;
}
[data-ws-plugin-part="harbor-workspace"] [data-ws-part="voice.chat"] {
min-width: 0;
min-height: 0;
color: var(--skin-harbor-text);
background: transparent;
border-color: transparent;
}
[data-ws-plugin-part="harbor-workspace.chat"] {
display: grid;
grid-template-rows: minmax(0, 1fr) auto;
min-width: 0;
min-height: 0;
overflow: hidden;
color: var(--skin-harbor-text);
}
[data-ws-plugin-part="harbor-workspace.chat-message-list"] {
display: flex;
flex-direction: column;
justify-content: flex-end;
gap: 14px;
min-height: 0;
overflow: auto;
padding: 8px 4px 16px;
}
[data-ws-plugin-part="harbor-workspace.chat-empty"] {
align-self: center;
margin: auto;
color: var(--skin-harbor-muted);
font-size: 13px;
}
[data-ws-plugin-part="harbor-workspace.chat-message"] { min-width: 0; }
[data-ws-plugin-part="harbor-workspace.chat-message-heading"] { display: flex; align-items: baseline; gap: 8px; }
[data-ws-plugin-part="harbor-workspace.chat-message-author"] { color: var(--skin-harbor-text); font-size: 12px; }
[data-ws-plugin-part="harbor-workspace.chat-message-time"] { color: var(--skin-harbor-dim); font-size: 10px; }
[data-ws-plugin-part="harbor-workspace.chat-message-text"] { margin: 3px 0 0; color: var(--skin-harbor-muted); font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
[data-ws-plugin-part="harbor-workspace.chat-composer"] {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
padding: 8px;
border: 1px solid var(--skin-harbor-border);
border-radius: 9px;
background: var(--skin-harbor-panel);
}
[data-ws-plugin-part="harbor-workspace.chat-input"] {
flex: 1;
min-width: 0;
height: 38px;
padding: 0 10px;
border: 0;
outline: 0;
color: var(--skin-harbor-text);
background: transparent;
}
[data-ws-plugin-part="harbor-workspace.chat-send"] {
min-width: 54px;
min-height: 36px;
border: 0;
border-radius: 7px;
color: #111;
background: var(--skin-harbor-accent);
font-weight: 700;
cursor: pointer;
}
[data-ws-plugin-part="harbor-workspace"] .chat-panel { min-height: 0; background: transparent; }
[data-ws-plugin-part="harbor-workspace"] .chat-heading { border-color: var(--skin-harbor-border); }
[data-ws-plugin-part="harbor-workspace"] .message-bubble { color: var(--skin-harbor-text); background: var(--skin-harbor-panel); }
[data-ws-plugin-part="harbor-workspace"] .message-composer { border-color: var(--skin-harbor-border); background: var(--skin-harbor-panel); }
[data-ws-plugin-part="harbor-workspace"] .message-composer input { color: var(--skin-harbor-text); }
[data-ws-plugin-part="harbor-workspace.members-panel"] {
grid-column: 4;
grid-row: 2;
min-width: 0;
min-height: 0;
overflow: auto;
padding: 16px 11px 118px;
border-left: 1px solid var(--skin-harbor-border);
background: var(--skin-harbor-panel);
}
[data-ws-plugin-part="harbor-workspace.members-heading"] {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 30px;
}
[data-ws-plugin-part="harbor-workspace.members-heading"] .section-label { margin: 0; }
[data-ws-plugin-part="harbor-workspace.member-total"] { color: var(--skin-harbor-dim); font-size: 11px; }
[data-ws-plugin-part="harbor-workspace.member-list"] {
display: grid;
gap: 3px;
margin: 8px 0 16px;
padding: 0;
list-style: none;
}
[data-ws-plugin-part="harbor-workspace.member-row"] {
display: grid;
grid-template-columns: 32px minmax(0, 1fr);
align-items: center;
column-gap: 8px;
min-height: 42px;
padding: 4px 5px;
border-radius: 6px;
color: var(--skin-harbor-muted);
font-size: 12px;
}
[data-ws-plugin-part="harbor-workspace.member-row"]:hover { background: var(--skin-harbor-raised); }
[data-ws-plugin-part="harbor-workspace.member-avatar"] {
grid-row: span 2;
display: grid;
place-items: center;
width: 30px;
height: 30px;
overflow: hidden;
border-radius: 50%;
color: var(--skin-harbor-text);
background: #393b41;
font-size: 10px;
font-weight: 700;
}
[data-ws-plugin-part="harbor-workspace.member-name"] {
min-width: 0;
overflow: hidden;
color: var(--skin-harbor-text);
text-overflow: ellipsis;
white-space: nowrap;
}
[data-ws-plugin-part="harbor-workspace.speaking-indicator"] {
color: var(--skin-harbor-accent);
font-size: 8px;
font-weight: 800;
letter-spacing: .05em;
}
[data-ws-plugin-part="harbor-workspace.member-muted-state"],
[data-ws-plugin-part="harbor-workspace.member-away-state"],
[data-ws-plugin-part="harbor-workspace.speaking-indicator"] { grid-column: 2 / -1; }
[data-ws-plugin-part="harbor-workspace.member-screen-share"] {
grid-column: 2 / -1;
display: flex;
align-items: center;
gap: 6px;
color: var(--skin-harbor-accent);
font-size: 8px;
font-weight: 800;
}
[data-ws-plugin-part="harbor-workspace.voice-dock"] {
z-index: 4;
grid-column: 2;
grid-row: 2;
align-self: end;
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 6px 8px;
min-width: 0;
padding: 9px;
border: 1px solid var(--skin-harbor-border);
border-radius: 10px;
background: #222328;
box-shadow: 0 8px 20px #0005;
}
[data-ws-plugin-part="harbor-workspace.voice-dock-heading"] {
grid-column: 1 / -1;
display: grid;
grid-template-columns: 10px minmax(0, 1fr);
align-items: center;
gap: 2px 7px;
}
[data-ws-plugin-part="harbor-workspace.voice-dock-actions"] {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: space-between;
gap: 4px;
min-width: 0;
}
[data-ws-plugin-part="harbor-workspace.connection-indicator"] {
grid-row: span 2;
color: var(--skin-harbor-accent);
font-size: 9px;
}
[data-ws-plugin-part="harbor-workspace.voice-channel-name"] {
overflow: hidden;
color: var(--skin-harbor-text);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
[data-ws-plugin-part="harbor-workspace.voice-dock-caption"] {
color: var(--skin-harbor-dim);
font-size: 8px;
letter-spacing: .05em;
}
[data-ws-plugin-part="harbor-workspace.audio-controls"] {
display: flex;
align-items: center;
gap: 4px;
min-width: 0;
}
[data-ws-plugin-part="harbor-workspace.microphone-control"],
[data-ws-plugin-part="harbor-workspace.output-control"],
[data-ws-plugin-part="harbor-workspace.disconnect-control"],
[data-ws-plugin-part="harbor-workspace.whisper-start"],
[data-ws-plugin-part="harbor-workspace.whisper-stop"] {
min-width: 38px;
min-height: 38px;
padding: 0 8px;
border: 1px solid var(--skin-harbor-border);
border-radius: 7px;
color: var(--skin-harbor-muted);
background: var(--skin-harbor-raised);
cursor: pointer;
}
[data-ws-plugin-part="harbor-workspace.microphone-control"][aria-pressed="true"],
[data-ws-plugin-part="harbor-workspace.output-control"][aria-pressed="true"] { color: var(--skin-harbor-danger); }
[data-ws-plugin-part="harbor-workspace.disconnect-control"] { color: var(--skin-harbor-danger); }
[data-ws-plugin-part="harbor-workspace.output-volume"] { width: 72px; accent-color: var(--skin-harbor-accent); }
[data-ws-plugin-part="harbor-workspace.whisper-controls"] { display: flex; gap: 6px; margin-top: 12px; }
[data-ws-plugin-part="harbor-workspace.screen-share-start"] { flex: 0 0 auto; }
[data-ws-plugin-part="harbor-workspace.screen-share-start"] button {
display: grid;
place-items: center;
width: 34px;
height: 34px;
padding: 0;
border: 1px solid var(--skin-harbor-border);
border-radius: 7px;
color: var(--skin-harbor-muted);
background: var(--skin-harbor-raised);
cursor: pointer;
}
[data-ws-plugin-part="harbor-workspace.screen-share-start"] button:hover:not(:disabled),
[data-ws-plugin-part="harbor-workspace.screen-share-start"] button:focus-visible { color: var(--skin-harbor-accent); }
[data-ws-plugin-part="harbor-workspace.screen-share-start"] button:disabled { opacity: .45; cursor: not-allowed; }
[data-ws-plugin-part="harbor-workspace.screen-share-start"] button span {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
[data-ws-plugin-part="harbor-workspace"] .desktop-audio-dock {
min-width: 0;
margin: 0;
padding: 4px;
border: 0;
border-radius: 7px;
background: transparent;
box-shadow: none;
}
[data-ws-plugin-part="harbor-workspace"] .desktop-audio-dock-copy { display: none; }
[data-ws-plugin-part="harbor-workspace"] .desktop-audio-dock-actions { gap: 2px; }
[data-ws-plugin-part="harbor-workspace"] .dock-audio-button { width: 34px; height: 34px; color: var(--skin-harbor-muted); }
[data-ws-plugin-part="harbor-workspace"] .dock-audio-button:hover,
[data-ws-plugin-part="harbor-workspace"] .dock-audio-button:focus-visible { color: var(--skin-harbor-accent); background: var(--skin-harbor-raised); border-color: var(--skin-harbor-border); }
[data-ws-plugin-part="harbor-workspace.audio-controls"] .accompaniment-toggle { display: none; }
[data-ws-plugin-part="harbor-workspace.disconnect-control"] {
display: grid;
align-content: center;
}
[data-ws-plugin-part="harbor-workspace"] .ws-plugin-disconnect-control {
display: grid;
place-items: center;
width: 38px;
height: 38px;
border: 0;
border-radius: 8px;
color: var(--skin-harbor-danger);
background: var(--skin-harbor-raised);
cursor: pointer;
}
[data-ws-plugin-part="harbor-workspace"] .ws-plugin-disconnect-control:hover { background: #3a292b; }
[data-ws-plugin-part="harbor-workspace"] button:focus-visible,
[data-ws-plugin-part="harbor-home"] button:focus-visible,
[data-ws-plugin-part="harbor-home"] input:focus-visible {
outline: 2px solid var(--skin-harbor-accent);
outline-offset: 2px;
}
@media (max-width: 1060px) {
[data-ws-plugin-part="harbor-workspace"] {
grid-template-columns: 60px 236px minmax(300px, 1fr) 204px;
}
}
@media (max-width: 820px) {
[data-ws-plugin-part="harbor-workspace"] {
grid-template-columns: 56px minmax(0, 1fr);
grid-template-rows: 50px 126px minmax(220px, 1fr) 82px 74px;
height: 100dvh;
min-height: 540px;
}
[data-ws-plugin-part="harbor-workspace.topbar"] { padding: 0 8px; gap: 7px; }
[data-ws-plugin-part="harbor-workspace.brand-mark"] { flex-basis: 28px; width: 28px; height: 28px; }
[data-ws-plugin-part="harbor-workspace.brand-name"] { font-size: 10px; }
[data-ws-plugin-part="harbor-workspace.server-title"] { font-size: 10px; }
[data-ws-plugin-part="harbor-workspace.server-rail"] { grid-column: 1; grid-row: 2 / 6; padding: 8px 3px; }
[data-ws-plugin-part="harbor-workspace.quick-server"] { width: 48px; min-height: 48px; }
[data-ws-plugin-part="harbor-workspace.server-monogram"] { width: 36px; height: 36px; }
[data-ws-plugin-part="harbor-workspace.identity-monogram"] { width: 34px; height: 34px; }
[data-ws-plugin-part="harbor-workspace.channel-panel"] {
grid-column: 2;
grid-row: 2;
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-rows: 30px minmax(0, 1fr);
gap: 4px;
overflow: hidden;
padding: 5px 8px;
border-right: 0;
border-bottom: 1px solid var(--skin-harbor-border);
}
[data-ws-plugin-part="harbor-workspace.server-summary"] {
min-height: 0;
flex-direction: row;
align-items: center;
gap: 8px;
padding: 0 2px;
border: 0;
}
[data-ws-plugin-part="harbor-workspace.server-name"] { max-width: 60%; font-size: 11px; }
[data-ws-plugin-part="harbor-workspace.server-subtitle"],
[data-ws-plugin-part="harbor-workspace.channel-list"] > [data-ws-plugin-part="harbor-workspace.section-label"] { display: none; }
[data-ws-plugin-part="harbor-workspace.channel-list"] {
flex-direction: row;
gap: 5px;
overflow: auto hidden;
padding: 0;
}
[data-ws-plugin-part="harbor-workspace.channel-item"] { flex: 0 0 auto; }
[data-ws-plugin-part="harbor-workspace.channel-row"] { width: max-content; min-width: 116px; min-height: 42px; margin: 0; }
[data-ws-plugin-part="harbor-workspace.channel-row"][data-depth] { padding-inline-start: 9px; }
[data-ws-plugin-part="harbor-workspace.channel-voice-members"] { display: none; }
[data-ws-plugin-part="harbor-workspace.conversation"] {
grid-column: 2;
grid-row: 3;
grid-template-rows: 40px minmax(0, 1fr) auto;
gap: 6px;
padding: 0 8px 6px;
}
[data-ws-plugin-part="harbor-workspace.members-panel"] {
grid-column: 2;
grid-row: 4;
display: grid;
grid-template-columns: auto minmax(0, 1fr);
align-items: center;
gap: 7px;
overflow: hidden;
padding: 5px 8px;
border-top: 1px solid var(--skin-harbor-border);
border-left: 0;
}
[data-ws-plugin-part="harbor-workspace.members-heading"] { gap: 5px; }
[data-ws-plugin-part="harbor-workspace.members-heading"] .section-label { max-width: 60px; font-size: 8px; }
[data-ws-plugin-part="harbor-workspace.member-list"] {
display: flex;
gap: 5px;
min-width: 0;
overflow: auto hidden;
margin: 0;
}
[data-ws-plugin-part="harbor-workspace.member-row"] { flex: 0 0 auto; grid-template-columns: 28px auto; min-height: 38px; padding: 2px 4px; }
[data-ws-plugin-part="harbor-workspace.member-avatar"] { width: 26px; height: 26px; }
[data-ws-plugin-part="harbor-workspace.speaking-indicator"] { display: none; }
[data-ws-plugin-part="harbor-workspace.member-muted-state"],
[data-ws-plugin-part="harbor-workspace.member-away-state"] { display: none; }
[data-ws-plugin-part="harbor-workspace.voice-dock"] {
grid-column: 2;
grid-row: 5;
align-self: stretch;
grid-template-columns: minmax(0, 1fr) auto;
grid-template-rows: minmax(0, 1fr);
align-items: center;
gap: 6px;
padding: 6px 8px;
border-radius: 0;
border-right: 0;
border-bottom: 0;
}
[data-ws-plugin-part="harbor-workspace.voice-dock-heading"] { grid-column: auto; grid-row: auto; }
[data-ws-plugin-part="harbor-workspace.voice-dock-actions"] { grid-column: 2; grid-row: 1; justify-content: flex-end; gap: 3px; }
[data-ws-plugin-part="harbor-workspace.voice-dock-caption"] { display: none; }
[data-ws-plugin-part="harbor-workspace.disconnect-control"] { grid-column: 2; grid-row: 1; }
[data-ws-plugin-part="harbor-workspace.audio-controls"] .mobile-voice-controls { display: flex; gap: 4px; }
[data-ws-plugin-part="harbor-workspace.audio-controls"] .mobile-voice-toggle { min-width: 44px; min-height: 44px; border-radius: 7px; color: var(--skin-harbor-muted); background: var(--skin-harbor-raised); }
[data-ws-plugin-part="harbor-workspace.microphone-control"],
[data-ws-plugin-part="harbor-workspace.output-control"],
[data-ws-plugin-part="harbor-workspace.disconnect-control"] { min-width: 42px; min-height: 44px; }
[data-ws-plugin-part="harbor-workspace.output-volume"] { width: 58px; }
[data-ws-plugin-part="harbor-workspace.screen-share-start"] button { width: 42px; height: 44px; }
}
@media (max-width: 460px) {
[data-ws-plugin-part="harbor-workspace"] { grid-template-columns: 50px minmax(0, 1fr); }
[data-ws-plugin-part="harbor-workspace.server-rail"] { padding-inline: 1px; }
[data-ws-plugin-part="harbor-workspace.quick-server"] { width: 44px; }
[data-ws-plugin-part="harbor-workspace.identity-name"] { max-width: 43px; }
[data-ws-plugin-part="harbor-workspace.topbar"] { padding-inline: 5px; }
[data-ws-plugin-part="harbor-workspace.brand-name"] { display: none; }
[data-ws-plugin-part="harbor-workspace.server-title"] { max-width: 100px; }
[data-ws-plugin-part="harbor-workspace.channel-panel"] { grid-column: 2; }
[data-ws-plugin-part="harbor-workspace.conversation"] { grid-column: 2; }
[data-ws-plugin-part="harbor-workspace.members-panel"] { grid-column: 2; }
[data-ws-plugin-part="harbor-workspace.voice-dock"] { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
[data-ws-plugin-part="harbor-home"] *,
[data-ws-plugin-part="harbor-workspace"] * {
scroll-behavior: auto;
animation-duration: .01ms;
animation-iteration-count: 1;
transition-duration: .01ms;
}
}
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

@@ -0,0 +1,31 @@
{
"schemaVersion": 1,
"components": [
{
"id": "illusia-now-playing",
"name": "ILLUSIA 当前频道 / current channel",
"page": "voice",
"accessibleName": "当前语音频道 / Current voice channel",
"permissions": ["session.status.read"],
"actions": {},
"root": {
"tag": "aside",
"part": "room-card",
"className": "illusia-now-playing",
"attributes": { "role": "status" },
"children": [
{
"tag": "small",
"part": "eyebrow",
"children": [{ "text": "ILLUSIA · 当前频道 / NOW IN" }]
},
{
"tag": "strong",
"part": "channel-name",
"children": [{ "text": "{{session.status.channelName}}" }]
}
]
}
}
]
}
+14
View File
@@ -0,0 +1,14 @@
{
"schemaVersion": 3,
"packageType": "open-skin",
"id": "community.illusia-voice",
"name": "ILLUSIA风",
"version": "2.0.2",
"author": "WebSpeak Project",
"license": "All rights reserved",
"description": "A bright original-character art skin with a safe declarative live-channel badge.",
"entry": "skin.css",
"components": "components.json",
"preview": "assets/background-composite.webp",
"minAppVersion": "0.2.7"
}
File diff suppressed because it is too large. Load diff
Binary file not shown.
File diff suppressed because it is too large. Load diff
+340
View File
@@ -0,0 +1,340 @@
{
"defaultLocale": "zh-CN",
"locales": {
"zh-CN": {
"home": {
"brandName": "KAAK"
},
"messages": {
"passwordDialogConfirm": "确定",
"kaakHomeComponentName": "KAAK 首页",
"kaakVoiceComponentName": "KAAK 语音工作区",
"kaakHomeAccessibleName": "KAAK 连接页",
"kaakVoiceAccessibleName": "KAAK 语音工作区",
"kaakTagline": "你的声音,随时随地。",
"kaakHomeIllustrationAlt": "WebSpeak 语音连接插图",
"kaakWelcomeTitle": "欢迎来到 WebSpeak",
"kaakConnectTitle": "连接 TeamSpeak 服务器",
"kaakConnectDescription": "无需注册账号,填写服务器信息即可加入语音",
"kaakBrowserDirect": "浏览器直连 · 无需安装 TeamSpeak 客户端",
"kaakFavoritesAndHistory": "收藏与最近服务器",
"kaakFavorites": "收藏",
"kaakRecent": "最近",
"kaakVoiceRoomControls": "语音房间控制",
"kaakReturnChannelsNoDisconnect": "返回频道树,不断开语音",
"kaakVoiceRoom": "语音房间",
"kaakMoreVoiceActions": "更多语音功能",
"kaakOpenChatHistory": "打开聊天记录",
"kaakChatHistory": "聊天记录",
"kaakCopyInviteLink": "复制邀请链接",
"kaakCloseMenu": "关闭菜单",
"kaakCurrentVoiceChannel": "当前语音频道",
"kaakVoiceConnected": "TeamSpeak · 已加入语音",
"kaakServerChannels": "服务器频道",
"kaakChannels": "频道",
"kaakToggleVoiceGroup": "展开或收起语音分组",
"kaakVoiceGroup": "语音分组",
"kaakReturnVoiceRoom": "返回当前语音房间",
"kaakReturnVoiceRoomConnected": "语音已连接 · 点击返回房间",
"kaakChat": "聊天",
"kaakToggleChatPanel": "收起或展开聊天面板",
"kaakVoiceRoomAccessibleName": "语音房间",
"kaakBackToChannels": "返回频道列表",
"kaakChannelMemberCount": "频道成员数",
"kaakExpandChatPanel": "展开聊天面板",
"kaakVoiceControls": "语音控制",
"kaakDisconnectVoice": "断开语音",
"kaakStopScreenShare": "停止屏幕共享",
"kaakAudioControls": "语音设置",
"kaakAudioSettings": "语音设置",
"kaakAudioSettingsShort": "语音设置",
"kaakNoiseSuppression": "噪声抑制",
"kaakMicrophone": "麦克风",
"kaakSpeakerMute": "扬声器静音",
"kaakAccompaniment": "伴奏",
"kaakMuteMicrophone": "闭麦",
"kaakUnmuteMicrophone": "开麦",
"kaakMuteOutput": "耳机静音",
"kaakMute": "静音",
"kaakUnmute": "恢复",
"kaakSpeaker": "扬声器",
"kaakScreenShare": "屏幕共享",
"kaakLeaveVoice": "退出",
"kaakCurrentIdentity": "当前 TeamSpeak 身份",
"kaakOnline": "在线",
"githubRepository": "Webspeak项目Github",
"qqGroup": "WebSpeak项目QQ群",
"adminConsole": "管理控制台",
"communityLinks": "社区与管理入口"
}
},
"en": {
"home": {
"brandName": "KAAK"
},
"messages": {
"passwordDialogConfirm": "Confirm",
"kaakHomeComponentName": "KAAK connection home",
"kaakVoiceComponentName": "KAAK voice workspace",
"kaakHomeAccessibleName": "KAAK connection page",
"kaakVoiceAccessibleName": "KAAK voice workspace",
"kaakTagline": "YOUR VOICE, EVERYWHERE.",
"kaakHomeIllustrationAlt": "WebSpeak voice connection illustration",
"kaakWelcomeTitle": "Welcome to WebSpeak",
"kaakConnectTitle": "Connect to a TeamSpeak server",
"kaakConnectDescription": "No account required. Enter the server details to join voice.",
"kaakBrowserDirect": "Connect directly in your browser · No TeamSpeak client needed",
"kaakFavoritesAndHistory": "Favorites and recent servers",
"kaakFavorites": "Favorites",
"kaakRecent": "Recent",
"kaakVoiceRoomControls": "Voice room controls",
"kaakReturnChannelsNoDisconnect": "Return to channels without disconnecting",
"kaakVoiceRoom": "Voice room",
"kaakMoreVoiceActions": "More voice actions",
"kaakOpenChatHistory": "Open chat history",
"kaakChatHistory": "Chat history",
"kaakCopyInviteLink": "Copy invite link",
"kaakCloseMenu": "Close menu",
"kaakCurrentVoiceChannel": "Current voice channel",
"kaakVoiceConnected": "TeamSpeak · Voice connected",
"kaakServerChannels": "Server channels",
"kaakChannels": "Channels",
"kaakToggleVoiceGroup": "Expand or collapse voice group",
"kaakVoiceGroup": "Voice group",
"kaakReturnVoiceRoom": "Return to the current voice room",
"kaakReturnVoiceRoomConnected": "Voice connected · Click to return to the room",
"kaakChat": "Chat",
"kaakToggleChatPanel": "Collapse or expand chat panel",
"kaakVoiceRoomAccessibleName": "Voice room",
"kaakBackToChannels": "Back to channel list",
"kaakChannelMemberCount": "Channel member count",
"kaakExpandChatPanel": "Expand chat panel",
"kaakVoiceControls": "Voice controls",
"kaakDisconnectVoice": "Disconnect voice",
"kaakStopScreenShare": "Stop screen sharing",
"kaakAudioControls": "Audio controls",
"kaakAudioSettings": "Audio settings",
"kaakAudioSettingsShort": "Audio settings",
"kaakNoiseSuppression": "Noise suppression",
"kaakMicrophone": "Microphone",
"kaakSpeakerMute": "Mute speakers",
"kaakAccompaniment": "Accompaniment",
"kaakMuteMicrophone": "Mute microphone",
"kaakUnmuteMicrophone": "Unmute microphone",
"kaakMuteOutput": "Mute output",
"kaakMute": "Mute",
"kaakUnmute": "Unmute",
"kaakSpeaker": "Speaker",
"kaakScreenShare": "Screen share",
"kaakLeaveVoice": "Leave",
"kaakCurrentIdentity": "Current TeamSpeak identity",
"kaakOnline": "Online",
"githubRepository": "WebSpeak project GitHub",
"qqGroup": "WebSpeak project QQ group",
"adminConsole": "Admin console",
"communityLinks": "Community and administration"
}
},
"de": {
"home": {
"brandName": "KAAK"
},
"messages": {
"passwordDialogConfirm": "Bestätigen",
"kaakHomeComponentName": "KAAK-Verbindungsseite",
"kaakVoiceComponentName": "KAAK-Sprachbereich",
"kaakHomeAccessibleName": "KAAK-Verbindungsseite",
"kaakVoiceAccessibleName": "KAAK-Sprachbereich",
"kaakTagline": "DEINE STIMME. ÜBERALL.",
"kaakHomeIllustrationAlt": "Illustration zur WebSpeak-Sprachverbindung",
"kaakWelcomeTitle": "Willkommen bei WebSpeak",
"kaakConnectTitle": "Mit einem TeamSpeak-Server verbinden",
"kaakConnectDescription": "Kein Konto nötig. Gib die Serverdaten ein, um dem Sprachkanal beizutreten.",
"kaakBrowserDirect": "Direkt im Browser · Kein TeamSpeak-Client erforderlich",
"kaakFavoritesAndHistory": "Favoriten und zuletzt verwendete Server",
"kaakFavorites": "Favoriten",
"kaakRecent": "Zuletzt",
"kaakVoiceRoomControls": "Sprachraum-Steuerung",
"kaakReturnChannelsNoDisconnect": "Zurück zu den Kanälen, ohne die Verbindung zu trennen",
"kaakVoiceRoom": "Sprachraum",
"kaakMoreVoiceActions": "Weitere Sprachaktionen",
"kaakOpenChatHistory": "Chatverlauf öffnen",
"kaakChatHistory": "Chatverlauf",
"kaakCopyInviteLink": "Einladungslink kopieren",
"kaakCloseMenu": "Menü schließen",
"kaakCurrentVoiceChannel": "Aktueller Sprachkanal",
"kaakVoiceConnected": "TeamSpeak · Sprachkanal beigetreten",
"kaakServerChannels": "Serverkanäle",
"kaakChannels": "Kanäle",
"kaakToggleVoiceGroup": "Sprachgruppe ein- oder ausklappen",
"kaakVoiceGroup": "Sprachgruppe",
"kaakReturnVoiceRoom": "Zum aktuellen Sprachraum zurückkehren",
"kaakReturnVoiceRoomConnected": "Sprachverbindung aktiv · Klicken, um zum Raum zurückzukehren",
"kaakChat": "Chat",
"kaakToggleChatPanel": "Chatbereich ein- oder ausklappen",
"kaakVoiceRoomAccessibleName": "Sprachraum",
"kaakBackToChannels": "Zur Kanalliste",
"kaakChannelMemberCount": "Anzahl der Kanalmitglieder",
"kaakExpandChatPanel": "Chatbereich erweitern",
"kaakVoiceControls": "Sprachsteuerung",
"kaakDisconnectVoice": "Sprachverbindung trennen",
"kaakStopScreenShare": "Bildschirmfreigabe beenden",
"kaakAudioControls": "Audio-Steuerung",
"kaakAudioSettings": "Audioeinstellungen",
"kaakAudioSettingsShort": "Audioeinstellungen",
"kaakNoiseSuppression": "Rauschunterdrückung",
"kaakMicrophone": "Mikrofon",
"kaakSpeakerMute": "Lautsprecher stummschalten",
"kaakAccompaniment": "Begleitton",
"kaakMuteMicrophone": "Mikrofon stummschalten",
"kaakUnmuteMicrophone": "Mikrofon einschalten",
"kaakMuteOutput": "Ausgabe stummschalten",
"kaakMute": "Stumm",
"kaakUnmute": "Ton einschalten",
"kaakSpeaker": "Lautsprecher",
"kaakScreenShare": "Bildschirm teilen",
"kaakLeaveVoice": "Verlassen",
"kaakCurrentIdentity": "Aktuelle TeamSpeak-Identität",
"kaakOnline": "Online",
"githubRepository": "GitHub-Repository des WebSpeak-Projekts",
"qqGroup": "QQ-Gruppe des WebSpeak-Projekts",
"adminConsole": "Administrationskonsole",
"communityLinks": "Community und Verwaltung"
}
},
"ru": {
"home": {
"brandName": "KAAK"
},
"messages": {
"passwordDialogConfirm": "Подтвердить",
"kaakHomeComponentName": "Страница подключения KAAK",
"kaakVoiceComponentName": "Голосовое пространство KAAK",
"kaakHomeAccessibleName": "Страница подключения KAAK",
"kaakVoiceAccessibleName": "Голосовое пространство KAAK",
"kaakTagline": "ТВОЙ ГОЛОС — ВЕЗДЕ.",
"kaakHomeIllustrationAlt": "Иллюстрация голосового подключения WebSpeak",
"kaakWelcomeTitle": "Добро пожаловать в WebSpeak",
"kaakConnectTitle": "Подключение к серверу TeamSpeak",
"kaakConnectDescription": "Аккаунт не нужен. Укажите данные сервера, чтобы подключиться к голосовому каналу.",
"kaakBrowserDirect": "Прямое подключение в браузере · Клиент TeamSpeak не нужен",
"kaakFavoritesAndHistory": "Избранные и недавние серверы",
"kaakFavorites": "Избранное",
"kaakRecent": "Недавние",
"kaakVoiceRoomControls": "Управление голосовой комнатой",
"kaakReturnChannelsNoDisconnect": "Вернуться к каналам без отключения",
"kaakVoiceRoom": "Голосовая комната",
"kaakMoreVoiceActions": "Дополнительные голосовые действия",
"kaakOpenChatHistory": "Открыть историю чата",
"kaakChatHistory": "История чата",
"kaakCopyInviteLink": "Скопировать ссылку-приглашение",
"kaakCloseMenu": "Закрыть меню",
"kaakCurrentVoiceChannel": "Текущий голосовой канал",
"kaakVoiceConnected": "TeamSpeak · Подключён к голосовому каналу",
"kaakServerChannels": "Каналы сервера",
"kaakChannels": "Каналы",
"kaakToggleVoiceGroup": "Развернуть или свернуть группу",
"kaakVoiceGroup": "Голосовая группа",
"kaakReturnVoiceRoom": "Вернуться в текущую голосовую комнату",
"kaakReturnVoiceRoomConnected": "Подключено · Нажмите, чтобы вернуться в комнату",
"kaakChat": "Чат",
"kaakToggleChatPanel": "Свернуть или развернуть панель чата",
"kaakVoiceRoomAccessibleName": "Голосовая комната",
"kaakBackToChannels": "Вернуться к списку каналов",
"kaakChannelMemberCount": "Количество участников канала",
"kaakExpandChatPanel": "Развернуть панель чата",
"kaakVoiceControls": "Голосовое управление",
"kaakDisconnectVoice": "Отключиться от голосового канала",
"kaakStopScreenShare": "Остановить демонстрацию экрана",
"kaakAudioControls": "Управление звуком",
"kaakAudioSettings": "Настройки звука",
"kaakAudioSettingsShort": "Настройки звука",
"kaakNoiseSuppression": "Шумоподавление",
"kaakMicrophone": "Микрофон",
"kaakSpeakerMute": "Отключить звук динамиков",
"kaakAccompaniment": "Сопровождение",
"kaakMuteMicrophone": "Выключить микрофон",
"kaakUnmuteMicrophone": "Включить микрофон",
"kaakMuteOutput": "Отключить звук",
"kaakMute": "Без звука",
"kaakUnmute": "Включить звук",
"kaakSpeaker": "Динамик",
"kaakScreenShare": "Демонстрация экрана",
"kaakLeaveVoice": "Выйти",
"kaakCurrentIdentity": "Текущая личность TeamSpeak",
"kaakOnline": "В сети",
"githubRepository": "GitHub проекта WebSpeak",
"qqGroup": "Группа QQ проекта WebSpeak",
"adminConsole": "Панель администратора",
"communityLinks": "Сообщество и управление"
}
},
"ja": {
"home": {
"brandName": "KAAK"
},
"messages": {
"passwordDialogConfirm": "確定",
"kaakHomeComponentName": "KAAK 接続ページ",
"kaakVoiceComponentName": "KAAK 音声ワークスペース",
"kaakHomeAccessibleName": "KAAK 接続ページ",
"kaakVoiceAccessibleName": "KAAK 音声ワークスペース",
"kaakTagline": "あなたの声を、どこでも。",
"kaakHomeIllustrationAlt": "WebSpeak 音声接続のイラスト",
"kaakWelcomeTitle": "WebSpeak へようこそ",
"kaakConnectTitle": "TeamSpeak サーバーに接続",
"kaakConnectDescription": "アカウント登録は不要です。サーバー情報を入力して音声に参加できます。",
"kaakBrowserDirect": "ブラウザーから直接接続 · TeamSpeak クライアント不要",
"kaakFavoritesAndHistory": "お気に入りと最近使ったサーバー",
"kaakFavorites": "お気に入り",
"kaakRecent": "最近",
"kaakVoiceRoomControls": "音声ルーム操作",
"kaakReturnChannelsNoDisconnect": "切断せずにチャンネル一覧へ戻る",
"kaakVoiceRoom": "音声ルーム",
"kaakMoreVoiceActions": "その他の音声操作",
"kaakOpenChatHistory": "チャット履歴を開く",
"kaakChatHistory": "チャット履歴",
"kaakCopyInviteLink": "招待リンクをコピー",
"kaakCloseMenu": "メニューを閉じる",
"kaakCurrentVoiceChannel": "現在の音声チャンネル",
"kaakVoiceConnected": "TeamSpeak · 音声に接続中",
"kaakServerChannels": "サーバーチャンネル",
"kaakChannels": "チャンネル",
"kaakToggleVoiceGroup": "音声グループを展開/折りたたむ",
"kaakVoiceGroup": "音声グループ",
"kaakReturnVoiceRoom": "現在の音声ルームに戻る",
"kaakReturnVoiceRoomConnected": "音声接続中 · タップしてルームに戻る",
"kaakChat": "チャット",
"kaakToggleChatPanel": "チャットパネルを折りたたむ/展開",
"kaakVoiceRoomAccessibleName": "音声ルーム",
"kaakBackToChannels": "チャンネル一覧に戻る",
"kaakChannelMemberCount": "チャンネルの参加者数",
"kaakExpandChatPanel": "チャットパネルを展開",
"kaakVoiceControls": "音声コントロール",
"kaakDisconnectVoice": "音声接続を切断",
"kaakStopScreenShare": "画面共有を停止",
"kaakAudioControls": "音声コントロール",
"kaakAudioSettings": "音声設定",
"kaakAudioSettingsShort": "音声設定",
"kaakNoiseSuppression": "ノイズ抑制",
"kaakMicrophone": "マイク",
"kaakSpeakerMute": "スピーカーをミュート",
"kaakAccompaniment": "伴奏音声",
"kaakMuteMicrophone": "マイクをミュート",
"kaakUnmuteMicrophone": "マイクのミュートを解除",
"kaakMuteOutput": "出力をミュート",
"kaakMute": "ミュート",
"kaakUnmute": "ミュート解除",
"kaakSpeaker": "スピーカー",
"kaakScreenShare": "画面共有",
"kaakLeaveVoice": "退出",
"kaakCurrentIdentity": "現在の TeamSpeak ID",
"kaakOnline": "オンライン",
"githubRepository": "WebSpeak プロジェクトの GitHub",
"qqGroup": "WebSpeak プロジェクトの QQ グループ",
"adminConsole": "管理コンソール",
"communityLinks": "コミュニティと管理"
}
}
}
}
+18
View File
@@ -0,0 +1,18 @@
{
"schemaVersion": 3,
"packageType": "open-skin",
"id": "community.kaak-voice",
"name": "KAAK",
"version": "3.1.127",
"author": "WebSpeak Project",
"license": "AGPL-3.0-only",
"description": "A KOOK-inspired WebSpeak skin with a split-screen connection home, searchable server header, TeamSpeak banner, nested channel members, unified chat with local history, and a compact audio dock.",
"entry": "skin.css",
"components": "components.json",
"content": "content.json",
"minAppVersion": "0.2.8",
"workspace": {
"apiVersion": 1,
"mode": "persistent"
}
}
File diff suppressed because it is too large. Load diff
Binary file not shown.
@@ -0,0 +1,240 @@
{
"schemaVersion": 3,
"components": [
{
"id": "open-voice-home",
"name": "Open voice connection page",
"page": "home",
"mode": "surface",
"accessibleName": "WebSpeak connection page",
"permissions": ["ui.surface.replace"],
"actions": {},
"root": {
"tag": "main",
"part": "home",
"children": [
{
"tag": "header",
"part": "home-header",
"children": [
{ "tag": "span", "part": "brand-mark", "children": [{ "text": "W" }] },
{ "tag": "span", "part": "brand-name", "children": [{ "text": "VOICE SPACE" }] },
{ "widget": "app.language-switcher", "part": "language" },
{ "widget": "app.skin-switcher", "part": "skin" }
]
},
{
"tag": "section",
"part": "connection-card",
"children": [
{ "tag": "p", "part": "eyebrow", "children": [{ "text": "TEAM SPEAK · VOICE CLIENT" }] },
{ "tag": "h1", "part": "title", "children": [{ "text": "Connect with your people" }] },
{ "tag": "p", "part": "description", "children": [{ "text": "Join a voice server and continue where your community meets." }] },
{ "widget": "home.connection-form", "part": "connection-form" }
]
},
{
"tag": "footer",
"part": "home-footer",
"children": [{ "text": "Your connection and identity remain managed by WebSpeak." }]
}
]
}
},
{
"id": "open-voice-workspace",
"name": "Open voice workspace",
"page": "voice",
"mode": "surface",
"accessibleName": "WebSpeak voice workspace",
"permissions": [
"ui.surface.replace",
"session.status.read",
"servers.quickList.read",
"servers.quickList.switch",
"session.channels.read",
"session.members.read",
"session.channel.join",
"chat.channel.read",
"chat.channel.send",
"audio.status.read",
"audio.microphone.control",
"audio.output.control",
"voice.whisper.status.read",
"voice.whisper.control",
"voice.disconnect",
"voice.screenShare.read",
"voice.screenShare.control"
],
"actions": {
"switch-server": {
"type": "quickServers.switch",
"args": { "quickServerId": "{{server.id}}" }
},
"join-channel": {
"type": "voice.joinChannel",
"args": { "channelId": "{{channel.id}}" }
},
"watch-screen-share": {
"type": "voice.joinScreenShare",
"args": { "streamId": "{{member.screenShareStreamId}}" }
}
},
"root": {
"tag": "main",
"part": "workspace",
"children": [
{
"tag": "header",
"part": "workspace-header",
"children": [
{ "tag": "span", "part": "brand-mark", "children": [{ "text": "W" }] },
{ "tag": "strong", "part": "server-title", "children": [{ "text": "{{session.status.channelName}}" }] },
{ "widget": "app.language-switcher", "part": "language" },
{ "widget": "app.skin-switcher", "part": "skin" }
]
},
{
"tag": "nav",
"part": "quick-rail",
"attributes": { "aria-label": "Favorite and recent servers" },
"children": [
{
"tag": "div",
"part": "quick-server-item",
"repeat": { "path": "servers.quickList", "as": "server" },
"children": [
{
"tag": "button",
"part": "quick-server",
"attributes": {
"type": "button",
"aria-current": "{{server.current}}",
"aria-label": "Switch to {{server.label}}"
},
"events": { "click": "switch-server" },
"children": [
{ "tag": "span", "part": "server-monogram", "children": [{ "text": "{{server.label}}" }] },
{
"tag": "small",
"part": "server-kind",
"when": { "path": "server.favorite", "equals": true },
"children": [{ "text": "Favorite" }]
},
{
"tag": "small",
"part": "server-kind",
"when": { "path": "server.kind", "equals": "recent" },
"children": [{ "text": "Recent" }]
}
]
}
]
}
]
},
{
"tag": "nav",
"part": "channels",
"attributes": { "aria-label": "Voice channels" },
"children": [
{ "tag": "h2", "part": "section-title", "children": [{ "text": "VOICE CHANNELS" }] },
{
"tag": "div",
"part": "channel-item",
"repeat": { "path": "session.channels", "as": "channel" },
"children": [
{
"tag": "button",
"part": "channel-row",
"attributes": {
"type": "button",
"aria-current": "{{channel.current}}",
"aria-label": "Join {{channel.name}}"
},
"events": { "dblclick": "join-channel", "keydown": "join-channel" },
"children": [
{ "tag": "span", "part": "channel-glyph", "children": [{ "text": "◖" }] },
{ "tag": "span", "part": "channel-name", "children": [{ "text": "{{channel.name}}" }] },
{ "tag": "small", "part": "channel-count", "children": [{ "text": "{{channel.memberCount}}" }] }
]
}
]
}
]
},
{
"tag": "section",
"part": "conversation",
"children": [
{
"tag": "header",
"part": "conversation-heading",
"children": [
{ "tag": "h1", "part": "channel-title", "children": [{ "text": "{{session.status.channelName}}" }] },
{ "tag": "span", "part": "connection-state", "children": [{ "text": "Connected" }] }
]
},
{ "widget": "voice.chat-panel", "part": "chat" },
{ "widget": "voice.screen-share-player", "part": "screen-share" }
]
},
{
"tag": "aside",
"part": "members-and-controls",
"children": [
{ "tag": "h2", "part": "section-title", "children": [{ "text": "IN THIS CHANNEL" }] },
{
"tag": "ul",
"part": "member-list",
"children": [
{
"tag": "li",
"part": "member-row",
"repeat": { "path": "session.members", "as": "member" },
"children": [
{ "tag": "span", "part": "member-avatar", "children": [{ "text": "{{member.name}}" }] },
{ "tag": "span", "part": "member-name", "children": [{ "text": "{{member.name}}" }] },
{
"tag": "small",
"part": "speaking-indicator",
"when": { "path": "member.speaking", "equals": true },
"attributes": { "aria-label": "Speaking" },
"children": [{ "text": "Speaking" }]
},
{
"tag": "div",
"part": "member-screen-share",
"when": { "path": "member.screenSharing", "equals": true },
"children": [
{
"tag": "span",
"part": "member-screen-share-live",
"attributes": { "role": "status" },
"children": [{ "text": "Sharing screen" }]
},
{
"tag": "button",
"part": "member-screen-share-watch",
"when": { "path": "member.self", "equals": false },
"attributes": { "type": "button", "aria-label": "Watch {{member.name}}'s screen" },
"events": { "click": "watch-screen-share" },
"children": [{ "text": "Watch" }]
}
]
}
]
}
]
},
{ "widget": "voice.whisper-controls", "part": "whisper" },
{ "widget": "voice.audio-controls", "part": "audio" },
{ "widget": "voice.connection-controls", "part": "connection" },
{ "widget": "voice.disconnect-control", "part": "disconnect" }
]
}
]
}
}
]
}
@@ -0,0 +1,13 @@
{
"schemaVersion": 3,
"packageType": "open-skin",
"id": "community.open-voice-surface",
"name": "Open Voice Surface",
"version": "1.0.1",
"author": "WebSpeak Project",
"license": "AGPL-3.0-only",
"description": "A complete, script-free public voice client surface scaffold.",
"entry": "skin.css",
"components": "components.json",
"minAppVersion": "0.2.7"
}
+313
View File
@@ -0,0 +1,313 @@
:root {
color-scheme: dark;
--skin-voice-bg: #111318;
--skin-voice-panel: #191c24;
--skin-voice-raised: #222631;
--skin-voice-text: #f0f1f5;
--skin-voice-muted: #969baa;
--skin-voice-accent: #8e7bff;
--skin-voice-live: #62d5a7;
}
[data-ws-plugin-part="open-voice-home"] {
min-height: 100vh;
display: grid;
grid-template-rows: auto 1fr auto;
justify-items: center;
gap: 32px;
padding: clamp(18px, 5vw, 56px);
color: var(--skin-voice-text);
background: radial-gradient(ellipse at 50% 42%, #25253c 0, var(--skin-voice-bg) 66%);
}
[data-ws-plugin-part="open-voice-home.home-header"] {
display: flex;
align-items: center;
gap: 12px;
width: min(100%, 1080px);
}
[data-ws-plugin-part="open-voice-home.brand-mark"],
[data-ws-plugin-part="open-voice-workspace.brand-mark"] {
display: grid;
place-items: center;
width: 38px;
height: 38px;
border-radius: 14px;
color: white;
background: var(--skin-voice-accent);
font-weight: 800;
}
[data-ws-plugin-part="open-voice-home.brand-name"] {
margin-right: auto;
font-size: 13px;
font-weight: 800;
letter-spacing: .14em;
}
[data-ws-plugin-part="open-voice-home.connection-card"] {
align-self: center;
width: min(100%, 520px);
padding: clamp(22px, 5vw, 42px);
border: 1px solid #ffffff17;
border-radius: 24px;
background: color-mix(in srgb, var(--skin-voice-panel) 94%, transparent);
box-shadow: 0 28px 90px #0008;
}
[data-ws-plugin-part="open-voice-home.eyebrow"],
[data-ws-plugin-part="open-voice-workspace.section-title"] {
color: var(--skin-voice-muted);
font-size: 10px;
font-weight: 800;
letter-spacing: .14em;
}
[data-ws-plugin-part="open-voice-home.title"] {
margin: 10px 0;
font-size: clamp(27px, 5vw, 40px);
letter-spacing: -.04em;
}
[data-ws-plugin-part="open-voice-home.description"],
[data-ws-plugin-part="open-voice-home.home-footer"] {
color: var(--skin-voice-muted);
line-height: 1.6;
}
[data-ws-plugin-part="open-voice-workspace"] {
display: grid;
grid-template-columns: 72px 228px minmax(320px, 1fr) 252px;
grid-template-rows: 62px minmax(0, 1fr);
width: 100%;
min-height: 100vh;
color: var(--skin-voice-text);
background: var(--skin-voice-bg);
}
[data-ws-plugin-part="open-voice-workspace.workspace-header"] {
grid-column: 1 / -1;
display: flex;
align-items: center;
gap: 14px;
padding: 0 18px;
border-bottom: 1px solid #ffffff12;
background: #171920;
}
[data-ws-plugin-part="open-voice-workspace.server-title"] { margin-right: auto; }
[data-ws-plugin-part="open-voice-workspace.quick-rail"] {
grid-column: 1;
grid-row: 2;
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
overflow-y: auto;
padding: 14px 8px;
background: #171920;
}
[data-ws-plugin-part="open-voice-workspace.quick-server"] {
display: grid;
justify-items: center;
gap: 4px;
width: 52px;
min-height: 58px;
padding: 5px;
border: 0;
border-radius: 16px;
color: var(--skin-voice-muted);
background: transparent;
cursor: pointer;
}
[data-ws-plugin-part="open-voice-workspace.quick-server"][aria-current="true"] {
color: white;
background: var(--skin-voice-accent);
}
[data-ws-plugin-part="open-voice-workspace.server-monogram"] {
display: grid;
place-items: center;
width: 36px;
height: 36px;
overflow: hidden;
border-radius: 12px;
background: #ffffff18;
font-size: 11px;
font-weight: 800;
}
[data-ws-plugin-part="open-voice-workspace.server-kind"] { font-size: 8px; }
[data-ws-plugin-part="open-voice-workspace.channels"],
[data-ws-plugin-part="open-voice-workspace.members-and-controls"] {
min-height: 0;
overflow: auto;
padding: 18px 12px;
background: var(--skin-voice-panel);
}
[data-ws-plugin-part="open-voice-workspace.channels"] { grid-column: 2; grid-row: 2; }
[data-ws-plugin-part="open-voice-workspace.members-and-controls"] { grid-column: 4; grid-row: 2; }
[data-ws-plugin-part="open-voice-workspace.channel-row"] {
display: flex;
align-items: center;
gap: 9px;
width: 100%;
margin-top: 4px;
padding: 9px 10px;
border: 0;
border-radius: 8px;
color: var(--skin-voice-muted);
background: transparent;
text-align: left;
cursor: pointer;
}
[data-ws-plugin-part="open-voice-workspace.channel-row"][aria-current="true"] {
color: var(--skin-voice-text);
background: var(--skin-voice-raised);
}
[data-ws-plugin-part="open-voice-workspace.channel-name"] { flex: 1; }
[data-ws-plugin-part="open-voice-workspace.channel-count"] { font-size: 11px; }
[data-ws-plugin-part="open-voice-workspace.conversation"] {
grid-column: 3;
grid-row: 2;
display: grid;
grid-template-rows: auto minmax(0, 1fr) auto;
min-width: 0;
min-height: 0;
padding: 18px;
gap: 12px;
}
[data-ws-plugin-part="open-voice-workspace.conversation-heading"] {
display: flex;
align-items: center;
gap: 12px;
min-height: 46px;
border-bottom: 1px solid #ffffff12;
}
[data-ws-plugin-part="open-voice-workspace.channel-title"] { margin-right: auto; }
[data-ws-plugin-part="open-voice-workspace.connection-state"] { color: var(--skin-voice-live); font-size: 12px; }
[data-ws-plugin-part="open-voice-workspace.member-list"] {
display: grid;
gap: 8px;
margin: 12px 0 20px;
padding: 0;
list-style: none;
}
[data-ws-plugin-part="open-voice-workspace.member-row"] {
display: grid;
grid-template-columns: 34px minmax(0, 1fr);
align-items: center;
column-gap: 10px;
color: var(--skin-voice-text);
font-size: 12px;
}
[data-ws-plugin-part="open-voice-workspace.member-avatar"] {
grid-row: span 2;
display: grid;
place-items: center;
width: 34px;
height: 34px;
overflow: hidden;
border-radius: 50%;
color: white;
background: var(--skin-voice-raised);
font-weight: 700;
}
[data-ws-plugin-part="open-voice-workspace.speaking-indicator"] { color: var(--skin-voice-live); font-size: 10px; }
[data-ws-plugin-part="open-voice-workspace.member-screen-share"] {
grid-column: 2;
display: flex;
align-items: center;
gap: 8px;
color: var(--skin-voice-live);
font-size: 10px;
}
[data-ws-plugin-part="open-voice-workspace.member-screen-share-watch"] {
min-height: 32px;
padding: 0 10px;
border: 1px solid color-mix(in srgb, var(--skin-voice-live) 50%, transparent);
border-radius: 7px;
color: var(--skin-voice-text);
background: var(--skin-voice-raised);
cursor: pointer;
}
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.chat"],
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.audio-controls"],
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.connection-controls"],
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.disconnect-control"],
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.whisper-controls"],
[data-ws-plugin-part="open-voice-workspace"] [data-ws-part="voice.screen-player"] {
border-radius: 12px;
color: var(--skin-voice-text);
background-color: var(--skin-voice-panel);
}
[data-ws-plugin-part="open-voice-workspace"] button:focus-visible {
outline: 2px solid var(--skin-voice-accent);
outline-offset: 2px;
}
@media (max-width: 800px) {
[data-ws-plugin-part="open-voice-workspace"] {
grid-template-columns: 58px minmax(0, 1fr);
grid-template-rows: 56px minmax(320px, 1fr) auto;
min-height: 100dvh;
}
[data-ws-plugin-part="open-voice-workspace.workspace-header"] { padding: 0 10px; }
[data-ws-plugin-part="open-voice-workspace.quick-rail"] { grid-column: 1; grid-row: 2; }
[data-ws-plugin-part="open-voice-workspace.channels"] {
grid-column: 1 / -1;
grid-row: 3;
display: flex;
gap: 6px;
overflow-x: auto;
overflow-y: hidden;
padding: 8px;
}
[data-ws-plugin-part="open-voice-workspace.section-title"] { display: none; }
[data-ws-plugin-part="open-voice-workspace.channel-row"] { width: max-content; min-width: 130px; margin: 0; }
[data-ws-plugin-part="open-voice-workspace.conversation"] {
grid-column: 2;
grid-row: 2;
padding: 10px;
}
[data-ws-plugin-part="open-voice-workspace.members-and-controls"] {
grid-column: 1 / -1;
grid-row: 4;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
padding: 8px;
}
[data-ws-plugin-part="open-voice-workspace.member-list"] { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
[data-ws-plugin-part="open-voice-workspace"] *,
[data-ws-plugin-part="open-voice-home"] * {
scroll-behavior: auto;
animation-duration: .01ms;
animation-iteration-count: 1;
transition-duration: .01ms;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

+3
View File
@@ -0,0 +1,3 @@
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Application starter</title><link rel="stylesheet" href="./style.css"><script type="module" src="./main.js"></script></head>
<body><main><span class="eyebrow">WEBSPEAK · APPLICATION RUNTIME 2</span><h1 id="title"></h1><p id="intro"></p><section><div class="status"><i></i><span id="status"></span></div><dl><div><dt id="user-label"></dt><dd id="user"></dd></div><div><dt id="scope-label"></dt><dd id="scope"></dd></div></dl><button id="request" type="button"></button><output id="result" aria-live="polite"></output></section></main></body></html>
+12
View File
@@ -0,0 +1,12 @@
const host=window.webspeak;
let context=await host.ready;
const copy={
en:['Your application starts here','Standard browser APIs, your own routes and an optional Node backend.','Connected application context','Participant','Scope','Call my backend','Persisted requests','Frontend only'],
zh:['从这里构建你的应用','使用标准浏览器 API、自定义路由和可选的 Node 后端。','应用上下文已连接','参与者','作用域','调用自己的后端','已保存的请求次数','仅前端模式'],
de:['Hier beginnt deine Anwendung','Browser-APIs, eigene Routen und ein optionales Node-Backend.','Anwendungskontext verbunden','Teilnehmer','Bereich','Backend aufrufen','Gespeicherte Anfragen','Nur Frontend'],
ru:['Начните своё приложение здесь','API браузера, собственные маршруты и необязательный сервис Node.','Контекст приложения подключён','Участник','Область','Вызвать свой сервис','Сохранённые запросы','Только браузер'],
ja:['ここからアプリを作成','標準ブラウザー API、独自ルート、任意の Node バックエンド。','アプリの接続情報を取得済み','参加者','範囲','バックエンドを呼び出す','保存したリクエスト数','フロントエンドのみ']};
const element=id=>document.getElementById(id);
function render(){const t=copy[context.language]??copy.en;for(const [id,index]of [['title',0],['intro',1],['status',2],['user-label',3],['scope-label',4],['request',5]])element(id).textContent=t[index];element('user').textContent=context.self.nickname;element('scope').textContent=context.scope.type;element('request').disabled=!context.serverUrl;if(!context.serverUrl)element('result').textContent=t[7];}
host.onContextChange(next=>{context=next;render();});render();
element('request').addEventListener('click',async()=>{element('request').disabled=true;try{const response=await fetch(context.serverUrl+'/my-counter',{method:'POST',signal:host.signal});if(!response.ok)throw new Error(String(response.status));const result=await response.json();element('result').textContent=(copy[context.language]??copy.en)[6]+': '+result.count;}catch(error){element('result').textContent=error.message;}finally{element('request').disabled=!context.serverUrl;}});
+1
View File
@@ -0,0 +1 @@
:root{color-scheme:light;--bg:#f1f5f4;--surface:#fff;--text:#183d39;--muted:#5b7671;--border:#d4e3df;--accent:#126b60;--soft:#e8f4ef}html[data-theme=dark]{color-scheme:dark;--bg:#161c21;--surface:#202a30;--text:#e4efec;--muted:#9eb6b0;--border:#37474c;--accent:#8ee2be;--soft:#293e37}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:15px/1.6 system-ui,sans-serif}main{max-width:800px;margin:0 auto;padding:clamp(24px,6vw,64px)}.eyebrow{color:var(--accent);font-size:11px;font-weight:750;letter-spacing:.14em}h1{font-size:clamp(25px,4vw,38px);letter-spacing:-.04em;line-height:1.2;margin:20px 0 14px}p{color:var(--muted);max-width:550px}section{margin-top:30px;padding:26px;border:1px solid var(--border);border-radius:18px;background:var(--surface)}.status{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--accent)}.status i{width:8px;height:8px;border-radius:50%;background:var(--accent)}dl{display:flex;gap:32px;flex-wrap:wrap;margin:22px 0 30px}dt{font-size:12px;color:var(--muted)}dd{margin:4px 0 0;font-weight:650;overflow-wrap:anywhere}button{font:600 14px system-ui;padding:12px 18px;border-radius:10px;border:1px solid var(--border);color:var(--accent);background:var(--soft);cursor:pointer}button:disabled{opacity:.5;cursor:default}output{display:block;margin-top:16px;color:var(--muted);font-size:13px}
+19
View File
@@ -0,0 +1,19 @@
{
"apiVersion": 2,
"id": "community.application-starter",
"name": "Application starter",
"version": "1.0.0",
"author": "Your community",
"license": "AGPL-3.0-only",
"description": "A starting point for an independent browser application and optional Node service.",
"scopes": [
"server",
"instance"
],
"client": {
"entry": "client/index.html"
},
"server": {
"entry": "server/main.mjs"
}
}
+19
View File
@@ -0,0 +1,19 @@
import { readFile, writeFile, rename } from 'node:fs/promises';
import path from 'node:path';
// Ordinary trusted Node code: use your own modules, network clients and routes.
export default async function activate({ dataDir, signal }) {
const filename=path.join(dataDir,'counter.json');
let count=JSON.parse(await readFile(filename,'utf8').catch(()=> '0'));
let writes=Promise.resolve();
return {
async handle(request,response) {
if(request.method!=='POST'||new URL(request.url,'http://app.local').pathname!=='/my-counter'){response.writeHead(404);response.end();return;}
// req.webspeak is host-authenticated context; it is not supplied by the browser.
writes=writes.then(async()=>{count++;await writeFile(filename+'.tmp',JSON.stringify(count));await rename(filename+'.tmp',filename);});
try{await writes;response.setHeader('content-type','application/json');response.end(JSON.stringify({count,participant:request.webspeak.self.id}));}
catch{response.writeHead(500);response.end();}
},
async stop(){await writes.catch(()=>undefined);}
};
}
+37
View File
@@ -0,0 +1,37 @@
# Android client
The Android app packages the Vue client with a small local gateway. Capacitor starts the embedded Node.js runtime, the gateway listens on `127.0.0.1:3040`, and the WebView opens that local address. The gateway is loopback-only; it does not expose an HTTP listener to the LAN. Release APKs are debug-signed sideload packages, not Google Play builds.
## Build on Windows
Use a short checkout path such as `C:\src\webspeak`. The Node.js plugin's CMake/Ninja object paths can exceed the Windows toolchain limit in deeply nested workspaces. A clean build in a nested validation directory failed with CMake's 250-character object-path warning and a Ninja `mkdir` error; the same source and dependencies built successfully from a shorter path. Changing application code or the embedded runtime is not required for this build-host issue.
Use Node.js 22.12 or newer on the build host. Install all three dependency sets, then prepare and sync the Android project:
```powershell
npm ci --ignore-scripts --no-audit --no-fund
npm rebuild @discordjs/opus --foreground-scripts --no-audit --no-fund
npm --prefix web ci --no-audit --no-fund
npm --prefix mobile ci --no-audit --no-fund
npm run android:sync
```
Build the debug APKs with Android Studio's JDK and the checked-in Gradle wrapper:
```powershell
$env:JAVA_HOME = "C:\Program Files\Android\Android Studio\jbr"
$env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
Set-Location web\android
.\gradlew.bat assembleDebug
```
Gradle writes one APK per supported CPU architecture under `web/android/app/build/outputs/apk/debug/`: `arm64-v8a`, `armeabi-v7a`, and `x86_64`. Use `arm64-v8a` for most modern Android phones and `x86_64` for the Android emulator. GitHub Releases contains all three APKs with versioned filenames.
## Current scope
- Platform startup is isolated in `web/src/platform/`. Ordinary browser sessions mount directly; the native shell loads the Node.js plugin only while waiting for its loopback gateway. Startup errors, timeouts and page exit release polling and message listeners. Retry repeats the readiness handshake without restarting the embedded Node.js runtime.
- The local gateway serves the join page, public configuration, skin package, join-ticket endpoint, and voice WebSocket bridge.
- The admin console and server-side skin management are not available in the Android package.
- Mobile audio encoding uses the JavaScript/WASM Opus codec. The normal server build continues to use the native Opus codec.
- The embedded runtime supplied by the current Capacitor Node.js plugin is Node.js 18.20.4. The gateway, identity parsing, and Opus encode/decode paths have been smoke-checked on that runtime. The upstream TeamSpeak SDK 1.0 declares Node.js 22.12 or newer, so real TeamSpeak connectivity and two-way audio remain unverified on Android; the APKs are for sideload testing.
- Android WebView on the tested emulator does not expose `getDisplayMedia`; screen sharing needs a native MediaProjection integration. A persistent Android foreground service and real-device background audio behavior also remain to be implemented and verified.
+33
View File
@@ -0,0 +1,33 @@
const path = require("node:path");
const os = require("node:os");
let app;
let channel;
try {
({ app, channel } = require("bridge"));
} catch (error) {
if (error.code !== "MODULE_NOT_FOUND") throw error;
app = { datadir: () => path.join(os.tmpdir(), "webspeak-android-gateway-dev") };
channel = { on: () => {}, post: () => {} };
}
process.env.WEBSPEAK_MOBILE = "1";
process.env.WEBSPEAK_DATA_DIR = app.datadir();
process.env.WEBSPEAK_MOBILE_WWW = path.join(__dirname, "www");
process.env.WEBSPEAK_VERSION = require("./package.json").version;
let gatewayReady = false;
const gatewayPort = Number(process.env.WEBSPEAK_MOBILE_PORT || 3040);
channel.on("webspeak-health", () => {
channel.post("webspeak-health", { ready: gatewayReady, port: gatewayPort });
});
import("./dist/mobile/index.js")
.then(() => {
gatewayReady = true;
channel.post("webspeak-health", { ready: true, port: gatewayPort });
})
.catch((error) => {
const message = error instanceof Error ? error.stack || error.message : String(error);
console.error("WebSpeak mobile gateway failed:", message);
channel.post("webspeak-error", { message });
});
+29
View File
@@ -0,0 +1,29 @@
import { cp, mkdir, readdir, copyFile, stat, readFile, writeFile, rm } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
const mobileDir = path.dirname(fileURLToPath(import.meta.url));
const rootDir = path.resolve(mobileDir, "..");
const webDist = path.join(rootDir, "web", "dist");
const outputDir = path.join(webDist, "nodejs");
for (const required of [path.join(rootDir, "dist", "mobile", "index.js"), path.join(mobileDir, "node_modules"), path.join(webDist, "index.html")]) {
if (!(await stat(required).catch(() => null))) throw new Error(`Missing Android build input: ${required}`);
}
await rm(outputDir, { recursive: true, force: true });
await mkdir(path.join(outputDir, "www"), { recursive: true });
await cp(path.join(rootDir, "dist"), path.join(outputDir, "dist"), { recursive: true, force: true });
await cp(path.join(mobileDir, "node_modules"), path.join(outputDir, "node_modules"), { recursive: true, force: true });
await copyFile(path.join(mobileDir, "index.cjs"), path.join(outputDir, "index.cjs"));
const appPackage = JSON.parse(await readFile(path.join(rootDir, "package.json"), "utf8"));
const mobilePackage = JSON.parse(await readFile(path.join(mobileDir, "package.json"), "utf8"));
mobilePackage.version = appPackage.version;
await writeFile(path.join(outputDir, "package.json"), `${JSON.stringify(mobilePackage, null, 2)}\n`);
for (const entry of await readdir(webDist, { withFileTypes: true })) {
if (entry.name === "nodejs") continue;
await cp(path.join(webDist, entry.name), path.join(outputDir, "www", entry.name), { recursive: entry.isDirectory(), force: true });
}
console.log(`Android gateway assets prepared at ${outputDir}`);
+1572
View File
File diff suppressed because it is too large. Load diff
+15
View File
@@ -0,0 +1,15 @@
{
"name": "webspeak-android-gateway",
"version": "0.3.0",
"private": true,
"type": "module",
"main": "index.cjs",
"dependencies": {
"@honeybbq/teamspeak": "1.0.0-beta.23",
"express": "^4.21.2",
"opusscript": "^0.1.1",
"pino": "^10.3.1",
"werift": "0.24.4",
"ws": "^8.20.0"
}
}
+885 -205
View File
File diff suppressed because it is too large. Load diff
+30 -4
View File
@@ -1,23 +1,44 @@
{
"name": "webspeak-webclient",
"version": "0.1.0",
"version": "0.3.0",
"private": true,
"license": "AGPL-3.0-only",
"type": "module",
"description": "Server-side browser gateway for TeamSpeak — deploy on your server, users join from any browser",
"engines": {
"node": ">=22.12.0"
},
"scripts": {
"dev": "tsx src/index.ts",
"build": "tsc",
"test": "node --import tsx --test src/admin/security-boundaries.test.ts src/domain/teamspeak-target.test.ts web/src/voice/member-volume-preferences.test.ts web/src/services/voice-channel-tree.test.ts src/admin/skin-registry.test.ts web/test/skin-store.test.ts src/admin/ts-admin-service.test.ts web/test/admin-api.integration.test.ts web/test/admin-view.test.mjs web/src/services/admin-api.test.ts src/security/open-target-policy.test.ts scripts/acceleration-poc/target-guard-parity.test.mjs src/server/acceleration-relay.test.ts src/server/visitor-count.test.ts src/server/voice-gateway-auth.test.ts src/server/voice-gateway.test.ts src/server/relay-delegation.integration.test.ts src/persistence/database.test.ts src/server/voice-protocol.test.ts src/server/teamspeak-resolver.test.ts src/server/teamspeak-adapter.test.ts src/server/teamspeak-sdk.test.ts src/server/ts-client.test.ts src/server/join-ticket.test.ts src/server/identity-lease.test.ts src/server/session-manager.test.ts src/server/directory-sync.test.ts src/server/session-events.test.ts src/server/reconnect-policy.test.ts src/server/voice-commands.test.ts src/server/voice-bridge.test.ts src/server/session-audio.test.ts src/server/voice-bridge.integration.test.ts src/server/webrtc-audio.test.ts src/server/webrtc-config.test.ts src/server/audio-stats.test.ts src/server/channel-capacity.test.ts src/server/directory-view.test.ts src/server/member-avatars.test.ts src/server/screen-share-coordinator.test.ts src/shared/client-commands.test.ts src/shared/skin-layout.test.ts src/shared/skin-plugin.test.ts src/shared/skin-runtime-plugin-context.test.ts src/shared/skin-runtime-plugins.test.ts src/shared/skin-runtime-plugin-approval.test.ts src/shared/server-messages.test.ts src/shared/webrtc.test.ts scripts/docker-healthcheck.test.mjs web/test/voice-session.test.mjs web/test/audio-controls.test.mjs web/test/connection-dialogs.test.mjs web/test/voice-workspace.test.mjs web/test/skin-workspace.test.ts web/test/voice-performance.test.mjs web/test/screen-share.test.ts web/test/screen-share-ui.test.mjs web/test/android-gateway.test.ts web/src/services/skin-catalog.test.ts web/src/services/skin-content.test.ts web/src/services/skin-plugin-runtime.test.ts web/src/services/skin-plugin-authoring.test.ts web/src/services/skin-editor-mode.test.ts web/src/services/skin-plugin-approval.test.ts web/src/services/host-editor-top-layer.test.ts web/src/services/skin-extension-ui.test.ts web/src/services/member-menu-placement.test.ts web/src/services/audio-device-menu-placement.test.ts web/src/services/mobile-viewport.test.ts web/src/services/mobile-away.test.ts web/src/services/screen-wake-lock.test.ts web/src/services/microphone-start.test.ts web/src/services/skin-pack.test.ts web/src/services/skin-runtime-plugin-approval.test.ts web/src/services/skin-layout-storage.test.ts web/src/services/skin-layout-geometry.test.ts web/src/services/skin-layout-focus.test.ts web/test/skin-layout-runtime.test.mjs web/test/skin-plugin-editor.test.mjs web/src/services/identity-import.test.ts web/src/services/identity-provider.test.ts web/test/identity-dialog.test.mjs web/test/skin-lifecycle.test.mjs web/src/services/local-persistence.test.ts web/src/services/quick-servers.test.ts src/server/teamspeak-alias.test.ts src/server/teamspeak-alias-integration.test.ts web/src/services/teamspeak-target.test.ts web/src/services/skin-extension-sandbox.test.ts web/src/services/skin-extension-wasm-policy.test.ts web/src/services/skin-extension-wasm-sandbox.test.ts web/src/services/skin-runtime-plugin-wasm.test.ts web/src/services/skin-extension-wasm-ui-loop.test.ts web/src/services/skin-wasm-interpreter.test.ts src/plugins/plugins.test.ts web/test/plugins.integration.test.ts web/src/services/plugin-app-client.test.ts web/src/services/instance-authorization.test.ts",
"verify": "npm test && npm run build && npm run web:build",
"skin:harbor:build": "node web/scripts/build-harbor-voice-skin.mjs",
"skin:open-voice:build": "node web/scripts/build-open-voice-surface-skin.mjs",
"skin:kaak:build": "node web/scripts/build-kaak-voice-skin.mjs",
"skin:illusia:build": "node web/scripts/build-illusia-voice-skin.mjs",
"start": "node dist/index.js",
"postinstall": "node scripts/patch-teamspeak-sdk.mjs",
"web:dev": "cd web && npx vite --host",
"web:build": "cd web && npx vite build"
"web:build": "npm --prefix web run build",
"skin:wasm:build": "node scripts/build-skin-wasm-interpreter.mjs",
"android:prepare": "npm run build && npm --prefix web run build && node mobile/pack.mjs",
"android:sync": "npm run android:prepare && cd web && npx cap sync android",
"acceleration:poc": "node scripts/acceleration-poc/smoke.mjs",
"acceleration:ipv6-smoke": "node scripts/acceleration-poc/smoke-ipv6.mjs",
"acceleration:sdk-smoke": "node scripts/acceleration-poc/sdk-smoke.mjs",
"acceleration:relay": "node dist/relay.js",
"plugin:build": "node scripts/build-plugin.mjs"
},
"dependencies": {
"@discordjs/opus": "^0.10.0",
"@honeybbq/teamspeak-client": "^0.2.2",
"@honeybbq/teamspeak": "1.0.0-beta.23",
"express": "^5.2.1",
"pino": "^10.3.1",
"postcss": "^8.5.29",
"postcss-selector-parser": "^7.1.6",
"postcss-value-parser": "^4.2.0",
"ssh2": "^1.17.0",
"werift": "0.24.4",
"ws": "^8.20.0"
},
"devDependencies": {
@@ -26,5 +47,10 @@
"@types/ws": "^8.18.1",
"tsx": "^4.21.0",
"typescript": "^6.0.2"
},
"overrides": {
"body-parser": "^2.3.0",
"esbuild": "^0.28.2",
"tar": "^7.5.22"
}
}
+65
View File
@@ -0,0 +1,65 @@
# WebSpeak 加速通道 PoC
这是第一版隔离测试 Demo,不属于 WebSpeak 生产运行链路,也不会被复制到 Docker 镜像或发布包中。
它验证以下核心能力:
- 客户端向远端中继发起认证;
- 每个会话动态指定 TeamSpeak 目标地址;
- 双向 UDP 数据报转发,并保持数据包边界;
- 会话之间按随机 ID 隔离;
- 错误密钥不能建立会话;
- 未开启 `allowPrivate` 时,解析到非公网地址的目标一律被拒绝;
- 不修改系统路由,因此不是 VPN。
## 本地冒烟
在仓库根目录运行:
```bash
npm run acceleration:poc
```
成功时会输出 `ACCELERATION_POC_OK`,并显示数据包数量、丢包率和往返延迟。除吞吐与错误密钥外,该冒烟还会用一个独立的 `allowPrivate: false` 中继断言私网目标防护生效:
```text
ssrf_guard_ok=true blocked=5/5 public_target_allowed=true
```
任一被禁目标未被拦截、或公网目标被误拦,都会输出 `LEAK` / 失败。
IPv6 回环验证:
```bash
npm run acceleration:ipv6-smoke
```
## 私网目标防护与主程序保持一致
中继的 `isRestrictedAddress()` 是 `src/security/open-target-policy.ts` 中同名函数的镜像。PoC 必须是可直接拷贝到远端运行的 `.mjs` 文件,不能 import 主程序的 TypeScript 模块,因此这段判断是**有意重复**的。`scripts/acceleration-poc/target-guard-parity.test.mjs` 会逐条比对两边的分类结果,任何一侧改动而另一侧未同步都会让 CI 失败。
该测试放在 PoC 目录内而非 `src/` 下:`.dockerignore` 把 `scripts/acceleration-poc` 排除在 Docker 构建上下文之外,而 Dockerfile 会对 `src/**` 执行 `tsc`,因此 `src/` 下任何 import 该目录的文件都会让镜像构建以 TS2307 失败。
## 通过隧道连接指定 TeamSpeak
必须先将下方示例域名替换为你获准测试的 TeamSpeak 地址;脚本不内置真实服务器默认值。下面的命令会让 SDK 连接本地代理端口,再由 PoC 中继把 UDP 数据转发到指定 TeamSpeak。它不进入指定频道,只验证 TeamSpeak 握手和断开:
```bash
$env:WEBSPEAK_ACCEL_TS_TARGET="ts.example.invalid#9987"
npm run acceleration:sdk-smoke
```
跨机器验证时,需要在目标服务器启动 `relay-server.mjs`,再把 `WEBSPEAK_ACCEL_RELAY` 指向中继地址。当前项目不会自动部署或启动该远程进程。
## 手动启动中继
仅用于实验,不要直接暴露到公网:
```bash
WEBSPEAK_ACCEL_TOKEN="change-this-to-a-long-random-token" \
WEBSPEAK_ACCEL_HOST="0.0.0.0" \
WEBSPEAK_ACCEL_PORT="39087" \
node scripts/acceleration-poc/relay-server.mjs
```
当前 Demo 的 UDP 帧协议是实验协议,尚未接入 SDK,也没有替代 GOST 的生产安全审计。正式接入前仍需验证 TeamSpeak 长时间语音、并发会话、IPv6、断线重连和目标地址安全策略。
+116
View File
@@ -0,0 +1,116 @@
import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
export const VERSION = 1;
export const HEADER_SIZE = 34;
export const MAX_PAYLOAD_SIZE = 60_000;
export const FrameType = Object.freeze({
OPEN: 1,
OPEN_OK: 2,
OPEN_ERR: 3,
DATA: 4,
CLOSE: 5,
PING: 6,
PONG: 7,
});
function asSecret(secret) {
if (typeof secret !== "string" || secret.length < 16) {
throw new Error("The PoC token must contain at least 16 characters");
}
return Buffer.from(secret, "utf8");
}
function signFrame(frame, secret, payload) {
return createHmac("sha256", asSecret(secret))
.update(frame.subarray(0, 18))
.update(payload)
.digest()
.subarray(0, 16);
}
export function encodeFrame(type, sessionId, sequence, payload = Buffer.alloc(0), secret) {
const body = Buffer.from(payload);
if (!Number.isInteger(type) || type < 1 || type > 255) throw new Error("Invalid frame type");
if (!Number.isInteger(sessionId) || sessionId < 0 || sessionId > 0xffffffff) throw new Error("Invalid session id");
if (!Number.isInteger(sequence) || sequence < 0 || sequence > 0xffffffff) throw new Error("Invalid sequence");
if (body.length > MAX_PAYLOAD_SIZE) throw new Error(`Payload exceeds ${MAX_PAYLOAD_SIZE} bytes`);
const frame = Buffer.alloc(HEADER_SIZE + body.length);
MAGIC.copy(frame, 0);
frame[4] = VERSION;
frame[5] = type;
frame.writeUInt16BE(0, 6);
frame.writeUInt32BE(sessionId >>> 0, 8);
frame.writeUInt32BE(sequence >>> 0, 12);
frame.writeUInt16BE(body.length, 16);
body.copy(frame, HEADER_SIZE);
signFrame(frame, secret, body).copy(frame, 18);
return frame;
}
export function decodeFrame(packet) {
const frame = Buffer.from(packet);
if (frame.length < HEADER_SIZE || !frame.subarray(0, 4).equals(MAGIC)) return null;
if (frame[4] !== VERSION) return null;
const payloadLength = frame.readUInt16BE(16);
if (frame.length !== HEADER_SIZE + payloadLength || payloadLength > MAX_PAYLOAD_SIZE) return null;
return {
type: frame[5],
sessionId: frame.readUInt32BE(8),
sequence: frame.readUInt32BE(12),
payload: frame.subarray(HEADER_SIZE),
auth: frame.subarray(18, HEADER_SIZE),
raw: frame,
};
}
export function verifyFrame(frame, secret) {
const expected = signFrame(frame.raw, secret, frame.payload);
return timingSafeEqual(expected, frame.auth);
}
export function randomSessionId() {
let id = randomBytes(4).readUInt32BE(0);
if (id === 0) id = 1;
return id;
}
export function jsonPayload(value) {
return Buffer.from(JSON.stringify(value), "utf8");
}
export function parseJsonPayload(payload) {
try {
return JSON.parse(Buffer.from(payload).toString("utf8"));
} catch {
return null;
}
}
export function parseEndpoint(value, defaultPort) {
if (typeof value !== "string" || !value.trim()) throw new Error("Endpoint is required");
const text = value.trim();
if (text.startsWith("[")) {
const end = text.indexOf("]");
if (end < 0) throw new Error(`Invalid endpoint: ${value}`);
const host = text.slice(1, end);
const portText = text.slice(end + 1).replace(/^[:#]/, "");
return { host, port: parsePort(portText || defaultPort, value) };
}
const hash = text.lastIndexOf("#");
if (hash > 0) return { host: text.slice(0, hash), port: parsePort(text.slice(hash + 1), value) };
const colon = text.lastIndexOf(":");
if (colon > 0 && text.indexOf(":") === colon) {
return { host: text.slice(0, colon), port: parsePort(text.slice(colon + 1), value) };
}
return { host: text, port: parsePort(defaultPort, value) };
}
function parsePort(value, original) {
const port = Number(value);
if (!Number.isInteger(port) || port < 1 || port > 65535) throw new Error(`Invalid port in endpoint: ${original}`);
return port;
}
const MAGIC = Buffer.from("WSAT");
+106
View File
@@ -0,0 +1,106 @@
import { createSocket } from "node:dgram";
import { isIP } from "node:net";
import { decodeFrame, encodeFrame, FrameType, jsonPayload, randomSessionId, parseEndpoint, verifyFrame } from "./protocol.mjs";
export async function createRelayClient({
relayHost,
relayPort,
targetHost,
targetPort,
token,
localHost = "127.0.0.1",
localPort = 0,
timeoutMs = 5_000,
} = {}) {
if (!relayHost || !Number.isInteger(relayPort)) throw new Error("Relay endpoint is required");
if (!targetHost || !Number.isInteger(targetPort)) throw new Error("Target endpoint is required");
const relayFamily = isIP(relayHost) === 6 ? "udp6" : "udp4";
const localFamily = isIP(localHost) === 6 ? "udp6" : "udp4";
const relaySocket = createSocket(relayFamily);
const localSocket = createSocket(localFamily);
const sessionId = randomSessionId();
let sequence = 1;
let peer = null;
let ready = false;
let closed = false;
let resolveReady;
let rejectReady;
const readyPromise = new Promise((resolve, reject) => { resolveReady = resolve; rejectReady = reject; });
function sendFrame(type, payload = Buffer.alloc(0)) {
const packet = encodeFrame(type, sessionId, sequence++, payload, token);
relaySocket.send(packet, relayPort, relayHost);
}
function closeSockets() {
if (closed) return;
closed = true;
try { relaySocket.close(); } catch {}
try { localSocket.close(); } catch {}
}
relaySocket.on("message", (packet) => {
const frame = decodeFrame(packet);
if (!frame || frame.sessionId !== sessionId || !verifyFrame(frame, token)) return;
if (frame.type === FrameType.OPEN_OK) {
ready = true;
resolveReady();
} else if (frame.type === FrameType.OPEN_ERR) {
const detail = (() => { try { return JSON.parse(frame.payload.toString("utf8")); } catch { return {}; } })();
rejectReady(new Error(detail.code ?? "ACCELERATION_OPEN_FAILED"));
closeSockets();
} else if (frame.type === FrameType.DATA && peer) {
localSocket.send(frame.payload, peer.port, peer.address);
} else if (frame.type === FrameType.CLOSE) {
closeSockets();
}
});
const onSocketError = (error) => {
if (!ready) rejectReady(error);
closeSockets();
};
relaySocket.once("error", onSocketError);
localSocket.once("error", onSocketError);
await Promise.all([
new Promise((resolve) => relaySocket.bind(0, relayFamily === "udp6" ? "::" : "0.0.0.0", resolve)),
new Promise((resolve) => localSocket.bind(localPort, localHost, resolve)),
]);
localSocket.on("message", (payload, rinfo) => {
if (closed) return;
peer = { address: rinfo.address, port: rinfo.port };
if (ready) sendFrame(FrameType.DATA, payload);
});
const timer = setTimeout(() => {
rejectReady(new Error("ACCELERATION_OPEN_TIMEOUT"));
closeSockets();
}, timeoutMs);
sendFrame(FrameType.OPEN, jsonPayload({ targetHost, targetPort }));
try {
await readyPromise;
} finally {
clearTimeout(timer);
}
const localAddress = localSocket.address();
return {
sessionId,
localHost,
localPort: typeof localAddress === "object" ? localAddress.port : localPort,
waitReady: () => readyPromise,
close() {
if (closed) return;
if (ready) {
try { sendFrame(FrameType.CLOSE); } catch {}
}
closeSockets();
},
};
}
export function parseRelayEndpoint(value) {
return parseEndpoint(value, 39087);
}
+212
View File
@@ -0,0 +1,212 @@
import { createSocket } from "node:dgram";
import { lookup } from "node:dns/promises";
import { BlockList, isIP, SocketAddress } from "node:net";
import { decodeFrame, encodeFrame, FrameType, jsonPayload, parseJsonPayload, verifyFrame } from "./protocol.mjs";
function endpointKey(address, port) {
return `${address}/${port}`;
}
/**
* Mirror of `isRestrictedAddress()` in `src/security/open-target-policy.ts`.
*
* The PoC ships as 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 logic is duplicated rather than shared, and
* `scripts/acceleration-poc/target-guard-parity.test.mjs` fails the moment the two
* classifications disagree, so drift is caught in CI instead of in production.
*
* Keep this an exact mirror: fail closed on anything that is not a literal
* public address.
*/
const restrictedIpv6 = new BlockList();
for (const [network, prefix] of [
["::", 16], ["64:ff9b::", 96], ["64:ff9b:1::", 48],
["100::", 64], ["100:0:0:1::", 64], ["2001::", 32], ["2002::", 16],
["2001:db8::", 32], ["3fff::", 20], ["fc00::", 7], ["fe80::", 10],
["fec0::", 10], ["ff00::", 8],
]) restrictedIpv6.addSubnet(network, prefix, "ipv6");
export function isRestrictedAddress(host) {
if (host.includes("%")) return true;
const version = isIP(host);
if (version === 4) return isRestrictedIpv4(host);
if (version !== 6) return true;
const normalized = new SocketAddress({ address: host, family: "ipv6" }).address;
if (normalized.startsWith("::ffff:")) {
// IPv4-mapped addresses must be unwrapped before the IPv4 rules apply:
// ::ffff:10.0.0.1 is private traffic in IPv6 clothing.
const mapped = normalized.slice("::ffff:".length);
return isIP(mapped) !== 4 || isRestrictedIpv4(mapped);
}
return restrictedIpv6.check(normalized, "ipv6");
}
function isRestrictedIpv4(host) {
const parts = host.split(".").map(Number);
if (parts.length !== 4 || parts.some((part) => !Number.isInteger(part) || part < 0 || part > 255)) return true;
const [a, b, c] = parts;
return a === 0
|| a === 10
|| a === 127
|| (a === 100 && b >= 64 && b <= 127)
|| (a === 169 && b === 254)
|| (a === 172 && b >= 16 && b <= 31)
|| (a === 192 && b === 0)
|| (a === 192 && b === 168)
|| (a === 198 && (b === 18 || b === 19))
|| (a === 198 && b === 51 && c === 100)
|| (a === 203 && b === 0 && c === 113)
|| a >= 224;
}
async function resolveTarget(host) {
const family = isIP(host);
if (family) return { host, family, resolved: [host] };
const records = await lookup(host, { all: true, verbatim: true });
const record = records.find((item) => item.family === 4) ?? records[0];
if (!record) throw new Error("TARGET_DNS_EMPTY");
return { host: record.address, family: record.family, resolved: records.map((item) => item.address) };
}
export async function createRelayServer({
host = "127.0.0.1",
port = 0,
token,
allowPrivate = false,
idleTimeoutMs = 30_000,
} = {}) {
const serverFamily = isIP(host) === 6 ? "udp6" : "udp4";
const socket = createSocket(serverFamily);
const sessions = new Map();
let closed = false;
function sendToClient(session, type, payload = Buffer.alloc(0)) {
if (closed) return;
const packet = encodeFrame(type, session.id, session.outSequence++, payload, token);
socket.send(packet, session.client.port, session.client.address);
}
function cleanup(session) {
if (!session || session.closed) return;
session.closed = true;
sessions.delete(session.id);
session.targetSocket?.close();
}
async function openSession(frame, client) {
const request = parseJsonPayload(frame.payload);
if (!request || typeof request.targetHost !== "string" || !Number.isInteger(request.targetPort)) {
return;
}
const existing = sessions.get(frame.sessionId);
if (existing) cleanup(existing);
const session = {
id: frame.sessionId,
client,
clientKey: endpointKey(client.address, client.port),
outSequence: 1,
lastActivity: Date.now(),
targetSocket: null,
closed: false,
};
sessions.set(session.id, session);
try {
const target = await resolveTarget(request.targetHost);
// Validate the resolved addresses, not the caller-supplied name: a DNS
// answer can point any hostname at loopback or an internal address.
if (!allowPrivate && target.resolved.some((address) => isRestrictedAddress(address))) {
const error = { code: "PRIVATE_TARGET_BLOCKED" };
socket.send(encodeFrame(FrameType.OPEN_ERR, frame.sessionId, 0, jsonPayload(error), token), client.port, client.address);
cleanup(session);
return;
}
const targetSocket = createSocket(target.family === 6 ? "udp6" : "udp4");
session.targetSocket = targetSocket;
targetSocket.on("message", (payload) => {
session.lastActivity = Date.now();
sendToClient(session, FrameType.DATA, payload);
});
targetSocket.on("error", (error) => {
if (!session.closed) sendToClient(session, FrameType.OPEN_ERR, jsonPayload({ code: "TARGET_SOCKET_ERROR", message: error.message }));
cleanup(session);
});
targetSocket.connect(request.targetPort, target.host, () => {
session.lastActivity = Date.now();
sendToClient(session, FrameType.OPEN_OK, jsonPayload({ targetHost: target.host, targetPort: request.targetPort }));
});
} catch (error) {
cleanup(session);
socket.send(encodeFrame(FrameType.OPEN_ERR, frame.sessionId, 0, jsonPayload({ code: "TARGET_OPEN_FAILED", message: error.message }), token), client.port, client.address);
}
}
socket.on("message", (packet, rinfo) => {
const frame = decodeFrame(packet);
if (!frame || !verifyFrame(frame, token)) return;
const client = { address: rinfo.address, port: rinfo.port };
if (frame.type === FrameType.OPEN) {
void openSession(frame, client);
return;
}
const session = sessions.get(frame.sessionId);
if (!session || session.clientKey !== endpointKey(rinfo.address, rinfo.port)) return;
session.lastActivity = Date.now();
if (frame.type === FrameType.DATA && session.targetSocket) {
session.targetSocket.send(frame.payload);
} else if (frame.type === FrameType.CLOSE) {
sendToClient(session, FrameType.CLOSE);
cleanup(session);
} else if (frame.type === FrameType.PING) {
sendToClient(session, FrameType.PONG);
}
});
socket.on("error", (error) => {
for (const session of sessions.values()) cleanup(session);
if (!closed) throw error;
});
const sweep = setInterval(() => {
const now = Date.now();
for (const session of sessions.values()) {
if (now - session.lastActivity > idleTimeoutMs) cleanup(session);
}
}, Math.max(1000, Math.min(idleTimeoutMs, 5000)));
sweep.unref();
await new Promise((resolve, reject) => {
const onError = (error) => { socket.off("listening", onListening); reject(error); };
const onListening = () => { socket.off("error", onError); resolve(); };
socket.once("error", onError);
socket.once("listening", onListening);
socket.bind({ address: host, port });
});
const address = socket.address();
return {
host,
port: typeof address === "object" ? address.port : port,
family: serverFamily,
close() {
if (closed) return;
closed = true;
clearInterval(sweep);
for (const session of sessions.values()) cleanup(session);
socket.close();
},
};
}
if (import.meta.url === `file://${process.argv[1]?.replaceAll("\\", "/")}`) {
const token = process.env.WEBSPEAK_ACCEL_TOKEN;
if (!token) throw new Error("Set WEBSPEAK_ACCEL_TOKEN before starting the PoC relay");
const host = process.env.WEBSPEAK_ACCEL_HOST ?? "0.0.0.0";
const port = Number(process.env.WEBSPEAK_ACCEL_PORT ?? 39087);
const server = await createRelayServer({ host, port, token });
console.log(`ACCELERATION_RELAY_LISTEN ${server.host}:${server.port}`);
}
+54
View File
@@ -0,0 +1,54 @@
import { Client, generateIdentitySync } from "@honeybbq/teamspeak/client";
import { createRelayClient } from "./relay-client.mjs";
import { createRelayServer } from "./relay-server.mjs";
import { parseEndpoint } from "./protocol.mjs";
const token = process.env.WEBSPEAK_ACCEL_TOKEN ?? "local-acceleration-poc-token";
const targetAddress = process.env.WEBSPEAK_ACCEL_TS_TARGET;
if (!targetAddress?.trim()) {
throw new Error("Set WEBSPEAK_ACCEL_TS_TARGET to your authorized TeamSpeak test endpoint");
}
const target = parseEndpoint(targetAddress, 9987);
const relayEndpoint = process.env.WEBSPEAK_ACCEL_RELAY;
let relayServer = null;
let relayClient = null;
let tsClient = null;
function withTimeout(promise, timeoutMs, label) {
return Promise.race([
promise,
new Promise((_, reject) => setTimeout(() => reject(new Error(`${label}_TIMEOUT`)), timeoutMs)),
]);
}
try {
let relay;
if (relayEndpoint) {
relay = parseEndpoint(relayEndpoint, 39087);
} else {
relayServer = await createRelayServer({ host: "127.0.0.1", port: 0, token, allowPrivate: true });
relay = { host: "127.0.0.1", port: relayServer.port };
}
relayClient = await createRelayClient({
relayHost: relay.host,
relayPort: relay.port,
targetHost: target.host,
targetPort: target.port,
token,
});
tsClient = new Client(generateIdentitySync(8), `127.0.0.1:${relayClient.localPort}`, "acceleration-sdk-smoke");
await withTimeout(tsClient.connect(), 15_000, "TS_CONNECT");
console.log(`TS_ACCEL_CONNECTED target=${target.host}#${target.port}`);
await new Promise((resolve) => setTimeout(resolve, 500));
await tsClient.disconnect();
console.log("TS_ACCEL_DISCONNECTED");
} catch (error) {
console.error("TS_ACCEL_SMOKE_FAILED", error);
process.exitCode = 1;
} finally {
try { await tsClient?.disconnect(); } catch {}
relayClient?.close();
relayServer?.close();
}
+60
View File
@@ -0,0 +1,60 @@
import { createSocket } from "node:dgram";
import { createRelayServer } from "./relay-server.mjs";
import { createRelayClient } from "./relay-client.mjs";
const TOKEN = "local-ipv6-acceleration-poc-token";
const PACKET_COUNT = 50;
function bind(socket, port = 0) {
return new Promise((resolve, reject) => {
socket.once("error", reject);
socket.bind(port, "::1", () => {
socket.off("error", reject);
resolve();
});
});
}
async function run() {
const target = createSocket("udp6");
target.on("message", (payload, rinfo) => target.send(payload, rinfo.port, rinfo.address));
await bind(target);
const targetPort = target.address().port;
const relay = await createRelayServer({ host: "::1", port: 0, token: TOKEN, allowPrivate: true });
const client = await createRelayClient({
relayHost: "::1",
relayPort: relay.port,
targetHost: "::1",
targetPort,
token: TOKEN,
localHost: "::1",
});
const sender = createSocket("udp6");
await bind(sender);
const pending = new Set(Array.from({ length: PACKET_COUNT }, (_, index) => index));
sender.on("message", (payload) => pending.delete(payload.readUInt32BE(0)));
for (let index = 0; index < PACKET_COUNT; index++) {
const payload = Buffer.alloc(512, index & 0xff);
payload.writeUInt32BE(index, 0);
sender.send(payload, client.localPort, "::1");
}
const deadline = Date.now() + 3000;
while (pending.size && Date.now() < deadline) await new Promise((resolve) => setTimeout(resolve, 10));
const received = PACKET_COUNT - pending.size;
sender.close();
client.close();
relay.close();
target.close();
console.log(`ipv6_packets=${PACKET_COUNT} received=${received} loss=${((pending.size / PACKET_COUNT) * 100).toFixed(2)}%`);
if (received !== PACKET_COUNT) throw new Error("IPV6_ACCELERATION_POC_FAILED");
console.log("IPV6_ACCELERATION_POC_OK");
}
run().catch((error) => {
console.error(error);
process.exitCode = 1;
});
Loaded 100 of 525 files, more files were not shown because too many files have changed in this diff. Show more