Compare commits

...
Author SHA1 Message Date
MoepchiandClaude Opus 5.5 bfe05a8b02 TS2: registered login and Auto fallback
- Connector: --login-name/--login-password (TS_LOGIN_NAME/TS_LOGIN_PASSWORD)
  send a registered login (flag 2 + account name + password).
- Server type "auto" retries as TeamSpeak 2 when the TS3 handshake gets no
  answer, only with ENABLE_TS2=1. Default port 9987 is swapped for 8767.
- Gateway and connect dialog pass account name/password for TS2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-12 18:38:37 +00:00
MoepchiandClaude Opus 5.5 83877aaa76 TS2: parse channel delete id as u16, surface server refusals (0xff9a)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-12 18:22:30 +00:00
MoepchiandClaude Opus 5.5 6cce28aa9d TS2: fix voice header order and ghost players after logout
- Voice packets: packet counter before conversation id (native client order);
  swapped, the native client stuttered on WebSpeak3 voice.
- Logout: wait for and ack the server's own 'player left'; leaving earlier
  kept us half-present and listed as a ghost to clients joining meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-12 17:20:54 +00:00
MoepchiandClaude Opus 5.5 0d8421692a Mobile menu: pin Feedback to the bottom of the ☰ drawer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-11 08:21:25 +00:00
MoepchiandClaude Opus 5.5 3e84e18535 Mobile menu: hide Feedback while a submenu is open, keep it last in the ☰ panel
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-11 08:17:50 +00:00
MoepchiandClaude Opus 5.5 d3b0d8ccdd Experimental TeamSpeak 2 support behind ENABLE_TS2
New connector module (connector/src/ts2.rs) speaks the TS2 UDP protocol:
login, channel and player lists, Speex voice both ways, status flags,
channel switching, private messages and server messages. Channel/server
chat goes through too but the server only delivers it when the user has
the text permission; a refusal shows up as an error.

Off by default. ENABLE_TS2=1 on the gateway adds "ts2" as a server type
and feature; the connect dialog offers it only then, read from the new
GET /api/features. Documented in the README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-10 10:11:25 +00:00
MoepchiandClaude Opus 5.5 9878b1caf3 Master password: say it's asked again every session when turning it on
The README now points to the master password instead of only saying
everything is stored unencrypted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 10:55:04 +00:00
MoepchiandClaude Opus 5.5 36f510b28e README: new desktop screenshot in a narrower aspect ratio
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 10:45:36 +00:00
MoepchiandClaude Opus 5.5 faef5c7d19 README: rename phone screenshot so GitHub's image cache picks up the new one
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 10:35:59 +00:00
MoepchiandClaude Opus 5.5 ecf0285f1c README: new phone screenshot showing the mobile layout
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 10:33:01 +00:00
MoepchiandClaude Opus 5.5 b11a7a73b8 Mobile: keep the mobile layout under Nova, Pulse and IDE themes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 10:12:04 +00:00
MoepchiandClaude Opus 5.5 b5e2ce3f7e Mobile: hamburger menu opens as a left drawer sized to its entries
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 10:01:51 +00:00
MoepchiandClaude Opus 5.5 e5cda8301d Mobile: back chevron vertically centred with its label
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:57:50 +00:00
MoepchiandClaude Opus 5.5 708ad72e59 Mobile: dialogs as bottom sheets / full-screen pages
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:51:22 +00:00
MoepchiandClaude Opus 5.5 85fa73c7d6 Hamburger menu: picking an entry closes the whole panel
It stayed open on top of the dialog the entry had just opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:44:16 +00:00
MoepchiandClaude Opus 5.5 8a3e1c230e Mobile: open submenu fills the screen with a sticky back row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:38:09 +00:00
MoepchiandClaude Opus 5.5 b50dc338df Mobile: hamburger menu drills into one submenu with a back row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:34:56 +00:00
MoepchiandClaude Opus 5.5 b40ada8cff Mobile options: no outline on the last-picked section
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:30:38 +00:00
MoepchiandClaude Opus 5.5 fa2c68b622 Mobile: options as full-screen list -> page with back button
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:30:30 +00:00
MoepchiandClaude Opus 5.5 54046d51fe Mobile: active tab highlight wraps icon and label
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:23:51 +00:00
MoepchiandClaude Opus 5.5 9364a7d48a Mobile: readable accent buttons, calmer disconnected state, no demo toggle on phones
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:21:33 +00:00
MoepchiandClaude Opus 5.5 dab1a7637e Demo mobile preview: keep floating buttons inside the phone frame
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-09 09:19:15 +00:00
MoepchiandClaude Opus 5.5 a4da3409bc Mobile: own touch layout with bottom voice bar and tabs
Below 700px (or with the demo's mobile toggle) the client switches to its own
shell instead of squeezing the desktop layout: header with the menu behind a
hamburger, one full-height panel at a time (channels / chat / info), big
mic / sound / leave buttons and a tab bar at the bottom. Touch targets are at
least 44px, the chat input is 16px so iOS doesn't zoom. Desktop is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-08 21:14:33 +00:00
MoepchiandClaude Opus 5.5 da985ef7d1 README: add table of contents
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-08 21:00:52 +00:00
MoepchiandClaude Opus 5.5 806de52382 i18n: drop Weblate, take translations via pull request
Weblate stayed pinned to the pre-transfer repo URL and stopped syncing.
The in-app links now point to a new README section explaining how to
fix or add a language with a PR or by sending the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-08 20:50:03 +00:00
MoepchiandClaude Opus 5.5 d299343835 stream: add webcam as a stream source
The stream dialog gets a source choice: screen/window via the browser
picker, or the camera via getUserMedia, announced to TS6 as type=1
(CAMERA). Camera streams send no audio track, since that would be the
microphone a second time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-11-05 11:28:51 +00:00
MoepchiandClaude Opus 5.5 10ae24a99f i18n: add Russian translation (beta)
Russia is the third-largest country in the connection stats and had no
translation yet. Machine-assisted, so marked (Beta) until a native
speaker has reviewed it, like Persian.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-26 22:00:36 +00:00
MoepchiandClaude Opus 5.5 ffb542d9bd Connector: say VoySpeak instead of GreenTeaSpeak
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-25 21:03:17 +00:00
MoepchiandClaude Opus 5.5 e02a41d855 Tell clients when the gateway is full; default limit 60
A browser can't see why a WebSocket upgrade was refused, so a full gateway
now accepts, sends a gateway_full error and closes. The client shows a
translated hint that includes self-hosting. Default MAX_CONNECTIONS drops
from 300 to 60 after measuring ~8-9 % of a core per listening client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-25 20:45:15 +00:00
MoepchiandClaude Opus 5.5 999262b6df Remove the GreenTeaSpeak theme; it is VoySpeak now
GreenTeaSpeak was renamed to VoySpeak with new colours, so the theme no
longer matches anything. The server tab strip that lived in the theme
module moves to ConnectionTabs. A saved GreenTeaSpeak pick or custom-theme
base falls back to Standard. Server-compat wording says VoySpeak.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-25 20:45:15 +00:00
MoepchiandClaude Opus 5.5 9e61f21316 Open #about / #options links from the ticker in the same window
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-25 08:06:55 +00:00
MoepchiandClaude Opus 5.5 a720f72943 Open Options on a section from an #options/<id> link
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-25 08:02:04 +00:00
MoepchiandClaude Opus 5.5 9a4639f76c Identities: wide enough unique ID field
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-24 19:46:27 +00:00
MoepchiandClaude Opus 5.5 bf6ab112ed Identities: compute the unique ID from the stored key instead of showing Unbekannt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-24 19:14:21 +00:00
MoepchiandClaude Opus 5.5 9e4ff35e8e Invite a friend: WebSpeak3 join link, whisper history cleanup as spin box, German typing attenuation label
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-24 08:12:23 +00:00
MoepchiandClaude Opus 5.5 5b61def4b2 Konto: hide the default sync server address, empty field = default
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-24 07:51:37 +00:00
MoepchiandClaude Opus 5.5 0a9dd545b1 Account sync: Mullvad-style, end-to-end encrypted
Options -> Konto: random 16-digit account number, optional random password,
no personal data. The browser derives account id, AES key and auth secret,
so the new standalone sync server (node dist/sync-server.js, SYNC_DATA_DIR)
only stores padded encrypted blobs. Proof-of-work on account creation,
1 year expiry, no IP logging. Pulled at startup, pushed when synced keys
change, conflict prompt when both sides changed. QR link, recovery file,
per-category selection; device-specific keys stay local. Self-hosters can
run their own and set SYNC_URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-24 07:40:00 +00:00
MoepchiandClaude Opus 5.5 a82c99972e Options: drop advanced permission system toggle
The web permission editor is the advanced one only; the switch had nothing to switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 20:58:57 +00:00
MoepchiandClaude Opus 5.5 8ce9848493 Options: Anwendung tab laid out like native
Server/Verschiedenes/Channel-Abo groups with working toggles (mic on server
switch, reconnect after sleep, middle-click quick access, nickname to
favorite, auto-open channel chat, muted-talking hint, no poke dialog).
Browser-impossible options (always on top, autostart, update channel,
statistics, reset confirmations) left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 20:52:19 +00:00
MoepchiandClaude Opus 5.5 440e7b7ae8 Options -> Sicherheit: real master password
Identities, favorites (with their passwords), saved channel passwords and the
store admin token are kept AES-GCM encrypted (PBKDF2, 310k rounds) in one
localStorage entry and only decrypted in memory. The app asks for the password
on load before App is imported; "forgot password" wipes the encrypted data.
Enable, change and disable (the latter two re-ask the current password).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 20:43:40 +00:00
MoepchiandClaude Opus 5.5 14aa44c1c9 Options -> Meldungen: multiple-choice text position (Server/Channel/Client), 'only important sounds' when muted
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 20:38:13 +00:00
MoepchiandClaude Opus 5.5 b808e2ec99 Options -> Meldungen: checkmark applies the sound pack to all favorites
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 20:30:42 +00:00
MoepchiandClaude Opus 5.5 b4bd62c1b5 Options: Meldungen tab (TS3 notification tree, sound packs, text position)
All 93 TS3 notification keys in the native tree layout (Aktion / Sound Skript /
Text Position), per-row and per-group checkboxes, editable scripts (play/say),
customized rows in bold. Sound packs: WebSpeak3 default, no sounds, or an
imported .ts3_soundpack (settings.ini parsed 1:1). "Wenn Ausgabe stumm", and a
per-favorite sound pack override in the favorites dialog. Existing sound
triggers now go through the keys; server log lines follow Text Position.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 20:26:40 +00:00
MoepchiandClaude Opus 5.5 7f8fada880 Options: Sicherheit tab (saved channel passwords, cleanup, identities)
Opt-in saved channel passwords per server (dropped when rejected), delete
button, clear cache / collected URLs on exit, "Cache löschen" (service
worker caches + icon/avatar/GIF caches, refetched right away) and a shortcut
to the identities dialog. Master password greyed out for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 20:07:30 +00:00
MoepchiandClaude Opus 5.5 977f5d2c3b Options -> Chat: line counts as spin boxes like the native client
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 19:57:41 +00:00
MoepchiandClaude Opus 5.5 e76278c5b8 Options: Chat tab (line limit, font, chat logs, unread hints)
Max lines per chat tab, chat font family/size, per-server local chat logs
(channel/private/server, last 1000 lines each, also for background tabs),
reloading the last N logged lines into channel/private chats (shown dimmed),
and unread highlighting for server/channel/private tabs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 19:54:13 +00:00
MoepchiandClaude Opus 5.5 bc2d1f65a0 Tag file transfer errors with channel + path; feature-gate new gateway messages
Connector transfer errors stay type "error" (old clients unchanged) but now
carry cid/path, so the transfer window marks the right transfer as failed.
setWhisperPolicy/setTransferLimit are only sent to gateways that announce
whisperPolicy/transferLimit, so older gateways don't log "Unknown message type".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 19:47:15 +00:00
MoepchiandClaude Opus 5.5 d0fc97d921 Options: Download tab with transfer window, queue and bandwidth limits
Download folder via the File System Access API (Chromium; browser default
elsewhere), "ask every time" save dialog, file transfer window with progress,
completion pop-up, concurrent upload/download caps and connector-side
bandwidth limits (new "ftlimit" stdin command / setTransferLimit message).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 19:32:25 +00:00
MoepchiandClaude Opus 5.5 7b98cb2d7c Whisper settings: incoming whisper rights, sound, history auto-open/cleanup
Options -> Whispern like TS3: allow/block by default with per-contact
overrides (new Whisper field in contacts) or block all. The connector drops
blocked whispers before decoding (whisperpolicy stdin command) and reports
accepted ones as whisperReceived, which logs them in the whisper history,
plays the new whisper sound and can open the history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 19:01:53 +00:00
MoepchiandClaude Opus 5.5 2e6b295185 Design tab: one theme dropdown for built-in and custom designs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 18:50:11 +00:00
MoepchiandClaude Opus 5.5 6e2278498c Design tab: real group icons in group menus, client info tooltips
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 18:37:09 +00:00
MoepchiandClaude Opus 5.5 ae7c24bd37 Design tab: native TS3 layout, icon packs, channel tree and GIF options
Style/theme/icon pack dropdowns, a manage view for designs and icon packs
(.ts3_iconpack import), channel tree options (expand depth/own channel,
clients below, flags, commander lamp, away message, tooltips, group icons
in menus) and GIF animation toggles. Overwolf, badges and inaccessible
groups are greyed out until the connector forwards that data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 18:27:23 +00:00
MoepchiandClaude Opus 5.5 ced63fdb2a Make continuous transmission and typing attenuation work
Continuous transmission is a third activation mode next to push-to-talk
and voice activation (the toolbar hides the VAD slider then). Typing
attenuation damps the mic to 10% for 0.2 s after each keystroke, so typing
in the client doesn't trigger voice activation. Both off by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 18:10:01 +00:00
MoepchiandClaude Opus 5.5 d860aa61e5 Softer test tone
Half the volume, with a fade in and decay instead of hard edges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 18:06:23 +00:00
MoepchiandClaude Opus 5.5 341a1644a6 Mic clicks as regular sounds, own clicks off by default
The two clicks now live in the sound settings (toggle, test, custom file,
soundpack import via mic_click_on/off) instead of being fixed tones in the
voice player. Own mic clicks start off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 18:03:04 +00:00
MoepchiandClaude Opus 5.5 97421ff2de Make the three playback options work
Automatic volume leveling runs incoming voice through a compressor,
own mic clicks tick when you start/stop transmitting, and other clients'
mic clicks tick when someone else does. Defaults match TS3 (on, on, off)
and are stored like the other audio settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
2026-10-23 17:59:12 +00:00
46 changed files with 10032 additions and 1598 deletions

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.9.0@sha256:c64defb9ed5a91eacb37f9
FROM --platform=$BUILDPLATFORM rust:1-bookworm AS connector-builder
COPY --from=xx / /
ARG TARGETPLATFORM
RUN apt-get update && apt-get install -y --no-install-recommends cmake clang && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends cmake clang libclang-dev && rm -rf /var/lib/apt/lists/*
RUN xx-apt-get update && xx-apt-get install -y libc6-dev gcc g++ && rm -rf /var/lib/apt/lists/*
RUN rustup target add $(xx-cargo --print-target-triple)
WORKDIR /src
+62 -15
View File
@@ -14,7 +14,7 @@
</p>
<p align="center">
<b>A modern, self-hosted browser client for TeamSpeak, TeaSpeak, and GreenTeaSpeak servers — no install, just open a tab.</b>
<b>A modern, self-hosted browser client for TeamSpeak, TeaSpeak, and VoySpeak servers — no install, just open a tab.</b>
</p>
<p align="center">
@@ -31,6 +31,23 @@
---
## 📑 Contents
- [Preview](#-preview)
- [Quick Start](#-quick-start)
- [Features](#-features)
- [Tech Stack](#-tech-stack)
- [Browser Support](#-browser-support)
- [Installation](#-installation)
- [Docker (recommended)](#-docker-recommended)
- [Account sync](#account-sync)
- [Environment variables](#environment-variables)
- [Auto-Connect Links](#-auto-connect-links)
- [Translating](#translating)
- [Credits](#credits)
- [In Memory of Akimo](#-in-memory-of-akimo)
- [Legal / Disclaimer](#legal--disclaimer)
## 📸 Preview
<table>
@@ -39,8 +56,8 @@
<th>Mobile</th>
</tr>
<tr>
<td width="72%"><img src="docs/screenshots/webspeak_current.png" width="100%" alt="WebSpeak3 desktop client connected to a TeamSpeak server"></td>
<td width="28%" align="center"><img src="docs/screenshots/webspeak_mobile.png" width="260" alt="WebSpeak3 mobile client connected to a TeamSpeak server"></td>
<td width="72%"><img src="docs/screenshots/webspeak_desktop.png" width="100%" alt="WebSpeak3 desktop client connected to a TeamSpeak server"></td>
<td width="28%" align="center"><img src="docs/screenshots/webspeak_mobile_phone.png" width="260" alt="WebSpeak3 mobile client connected to a TeamSpeak server"></td>
</tr>
</table>
@@ -53,7 +70,7 @@ docker run -d --name webspeak3 --restart unless-stopped -p 8080:8080 moepchi/web
```
Enter the address and port of **any reachable TeamSpeak 3, TeamSpeak 6,
TeaSpeak, or GreenTeaSpeak server** in the connection dialog. The server does
TeaSpeak, or VoySpeak server** in the connection dialog. The server does
not need to be installed on the same machine, modified, or operated by you.
> Voice requires a secure context. Microphone access works on `localhost`; for
@@ -63,7 +80,7 @@ not need to be installed on the same machine, modified, or operated by you.
| | |
|---|---|
| 🔌 **Real TeamSpeak protocol** | Connects to actual TS3/TS6, TeaSpeak, and GreenTeaSpeak servers over a WebSocket gateway — the server stays exactly as-is |
| 🔌 **Real TeamSpeak protocol** | Connects to actual TS3/TS6, TeaSpeak, and VoySpeak servers over a WebSocket gateway — the server stays exactly as-is |
| 🎙️ **Low-latency voice** | Opus-encoded voice with voice activation ("Sprachaktivierung") and adjustable sensitivity |
| 🤫 **Whisper** | Target your voice at specific channels or clients instead of your whole current channel |
| 🔊 **Custom audio output picker** | Route playback to any output device — works even in browsers without `AudioContext.setSinkId` |
@@ -80,10 +97,11 @@ not need to be installed on the same machine, modified, or operated by you.
| 📱 **Mobile-friendly layout** | Responsive single-column layout for narrow screens, not just a shrunk desktop UI |
| 🌍 **Localized UI** | Interface available in German, English, Simplified Chinese, and Persian (Beta), detected automatically or switchable in Options |
| 🌗 **Dark / light theme** | Clean, modern UI that adapts to your preference |
| 🔁 **Multi-join (server tabs)** | Several connections in parallel — one tab per server, like GreenTeaSpeak 2. Audio stays on the active tab |
| 🔁 **Multi-join (server tabs)** | Several connections in parallel — one tab per server, like VoySpeak. Audio stays on the active tab |
| 🔁 **Seamless reconnect** | Switch or add connections mid-session without tearing down unrelated tabs; dropped connections come back on their own, with the channel tree intact |
| ⌨️ **Keyboard & screen readers** | Arrow keys through the channel tree (exposed as an ARIA tree) and through menus, Enter joins, context-menu key opens the menu; focus-trapped dialogs, labelled toolbar buttons |
| 🍵 **GreenTeaSpeak support** | Connects to real GreenTeaSpeak servers (not just TS3/TS6/TeaSpeak), plus an optional GTS-styled UI chrome (dark panels, gold menu bar, connection-tab strip) alongside the default look |
| 🍵 **VoySpeak support** | Connects to real VoySpeak servers (formerly GreenTeaSpeak), not just TS3/TS6/TeaSpeak |
| 📟 **TeamSpeak 2** | <sub>**EXPERIMENTAL**</sub> Voice, channels, private messages and server messages on old TS2 servers. Registered accounts work too, and the server type "Auto" detects TS2 on its own. Off by default, the gateway enables it with `ENABLE_TS2=1` |
| 🖥️ **Screen streaming to/from TS6** | <sub>**ALPHA · UNSTABLE**</sub> Share your screen to native TeamSpeak 6 clients and watch theirs. Built on TS6's undocumented Stream/Call protocol — expect it to break; see [Roadmap](ROADMAP.md) |
## 🧱 Tech Stack
@@ -108,19 +126,18 @@ gateway is required that speaks the real TS protocol on one side and
WebSocket to the browser on the other.
```
Browser (web/) <--WebSocket--> Gateway (gateway/) <--stdin/stdout JSON--> Rust connector (connector/) <--TS3/TS6/TeaSpeak/GreenTeaSpeak protocol--> Server
Browser (web/) <--WebSocket--> Gateway (gateway/) <--stdin/stdout JSON--> Rust connector (connector/) <--TS3/TS6/TeaSpeak/VoySpeak protocol--> Server
```
- **`web/`** — Vite + React frontend. TS3-lookalike UI: channel tree, chat
tabs, voice controls. Optional GreenTeaSpeak-styled chrome for the
connection-tab strip and menu bar.
tabs, voice controls.
- **`gateway/`** — Node.js/TypeScript WebSocket server. Spawns the Rust
connector **per browser WebSocket** and relays newline-delimited JSON events
between it and the browser. Multi-join opens one `/ws` connection per server
tab (parallel connectors).
- **`connector/`** — Rust binary wrapping [`tsclientlib`](https://github.com/ReSpeak/tsclientlib)
(vendored as a git submodule in `tsclientlib/`, currently tracking a fork
with TeaSpeak/GreenTeaSpeak protocol support), the actual TS3/TS6/TeaSpeak
with TeaSpeak/VoySpeak protocol support), the actual TS3/TS6/TeaSpeak
protocol implementation. Handles connecting, channel/client state, chat,
and Opus-encoded voice. Auto-detects the server dialect on connect (or it
can be forced via `--server-type`).
@@ -185,6 +202,25 @@ The UI shows a small **Ko-fi donation button** in the bottom right corner. Build
The **Design Store** (browse/upload community themes) points at the maintainer's shared catalog by default, same as the official client — no setup needed. Want to run your own store instead, backed by your own gateway (`STORE_ENABLED=1`, see below)? `docker compose build --build-arg STORE_URL=https://your-gateway.example.com/api/store/themes`. Outside Docker: `VITE_STORE_URL=https://your-gateway.example.com/api/store/themes npm run build` in `web/`.
#### Account sync
Options → Account lets people carry identities, favorites, settings, designs and whisper lists to their other devices. Like Mullvad, an account is just a random 16-digit number, optionally with a random password: no email, no name. Everything is encrypted in the browser (PBKDF2 → AES-GCM) before upload, so the sync server only ever stores unreadable blobs; it keeps no IP addresses and deletes accounts nobody opened for a year.
By default every client uses the official sync server. To run your own, start the same image with a different command and point your gateway at it:
```yaml
webspeak3-sync:
image: moepchi/webspeak3:latest
command: ["node", "dist/sync-server.js"]
environment:
- SYNC_DATA_DIR=/app/sync-data
- TRUST_PROXY=cloudflare
volumes:
- ./sync-data:/app/sync-data # owned by uid 1000 (the image runs as "node")
```
Route `/api/sync/*` to it in your proxy/tunnel and set `SYNC_URL=https://your-host/api/sync` on the gateway. Accounts only exist on the server they were created on. Optional: `SYNC_POW_BITS` (proof-of-work difficulty for new accounts, default `15`), `SYNC_MAX_ACCOUNTS` (default `100000`), `SYNC_ALLOWED_ORIGIN` (CORS, default `*`).
#### Environment variables
All optional; add them under `environment:` in your compose override next to `PORT`. These are the common ones - the full list (logging, feedback form, Design Store details, build-time variables) is on the wiki's [Configuration & Environment Variables](https://github.com/WebSpeak3/webspeak3/wiki/Configuration-and-Environment-Variables) page.
@@ -206,13 +242,15 @@ All optional; add them under `environment:` in your compose override next to `PO
| `ALLOW_PRIVATE_TARGETS` | off | By default the gateway refuses to connect to private/internal addresses (loopback, `10.x`, `192.168.x`, CGNAT, link-local, …), no matter how they were reached (IP, DNS, SRV, TSDNS, nickname, file-transfer redirect), so it can't be abused to probe the network it runs in. **If your TeamSpeak server is on the same LAN as the gateway, set this to `1`.** |
| `TURN_URLS` | unset | Comma-separated TURN URLs (e.g. `turn:turn.example.com:3478`) offered to browsers for screen streams, for viewers or publishers behind NATs where direct P2P fails. Pair with `TURN_SECRET` (coturn's `use-auth-secret`; each browser gets its own credential valid for 24 h) or with static `TURN_USERNAME` / `TURN_CREDENTIAL`, which every visitor can read. |
| `ALLOWED_ORIGINS` | unset (any origin) | Comma-separated list of web origins allowed to open `/ws` (e.g. `https://client.example.com`). Stops other websites from silently using your gateway as their relay. |
| `MAX_CONNECTIONS_PER_IP` / `MAX_CONNECTIONS` | `10` / `300` | Concurrent `/ws` connections per client IP and in total (each can hold a live TeamSpeak session). `0` disables a limit. |
| `MAX_CONNECTIONS_PER_IP` / `MAX_CONNECTIONS` | `10` / `60` | Concurrent `/ws` connections per client IP and in total (each can hold a live TeamSpeak session). `0` disables a limit. |
| `CONNECT_RATE_LIMIT` | `30` | Server connects per client IP per minute. Each one starts a new TeamSpeak session, so this stops anyone from flooding a server through your gateway. `0` disables it. |
| `TRUST_PROXY` | off | Only when the gateway is reachable **solely** through a proxy/tunnel, so per-IP limits see the real client instead of the proxy: `cloudflare` (Cloudflare Tunnel or proxy) uses `CF-Connecting-IP`; `1` (your own nginx/Caddy/Traefik) uses the last `X-Forwarded-For` entry, the one your proxy appended. Don't set it on a directly exposed gateway - clients could then fake their IP. |
| `TELEMETRY` | on | Set to `0` to turn off the anonymous usage ping (see below). |
| `NEWS_TICKER` | on | Set to `0` to hide the news ticker at the bottom of the client. |
| `NEWS_TICKER_CENTRAL` | on | Set to `0` to drop the official WebSpeak3 news (releases, new store designs, announcements) and only show your own messages. |
| `NEWS_TICKER_MESSAGES` | – | Your own ticker messages, separated by `\|`, e.g. `Maintenance tonight at 10pm \| Welcome!` |
| `ENABLE_TS2` | off | Set to `1` to offer **TeamSpeak 2** as a server type in the connect dialog. Experimental: voice (Speex), channel list, private messages and server messages work; channel chat depends on the server's permissions; file transfer, avatars, screen streams and admin functions aren't available on TS2. Also lets the server type "Auto" fall back to TS2 when a server gives no TS3 answer, and adds account name and password fields for registered TS2 logins. The code ships in every image, it just stays unused while this is off. |
| `SYNC_URL` | official sync server | Account sync server your visitors use (Options → Account), e.g. `https://sync.example.com/api/sync`. Only needed if you run your own (see below). |
> **Anonymous usage ping:** when the gateway starts and then once a day, it sends a random instance ID (made up on first start, stored in `instance-id` in the working directory, used for nothing else) and its version number to `gateway.webspeak3.de`. That's the only way to tell whether anyone self-hosts WebSpeak3 at all, and how many instances still run an old version, e.g. after a security fix. Nothing else is sent: no hostnames, no TeamSpeak servers, no users, no settings. The receiving side doesn't store IP addresses. The startup log says when it's on. Turn it off with `TELEMETRY=0`.
@@ -220,7 +258,7 @@ All optional; add them under `environment:` in your compose override next to `PO
> **Trust model:** the gateway speaks the TeamSpeak protocol on the user's behalf, so whoever runs it necessarily handles their identity key, server/channel passwords and privilege keys (they're kept out of process listings, but the operator can still see them). Only use gateways you trust, and serve them over HTTPS/WSS (`TLS_CERT`/`TLS_KEY` or a TLS-terminating proxy) - plain HTTP exposes all of that on the wire. File uploads are limited to 24 MiB, downloads to 25 MiB.
> **Stored in the browser:** identities (including their private keys), favorites with any passwords you typed into them, and settings live in the browser's `localStorage`, unencrypted - the same way the native client keeps them in its settings files. Anyone with access to your browser profile can read them; leave favorite password fields empty on shared machines and export identities you care about. Server banners load directly from the host the server admin configured; turn them off under Options → Application if you don't want that host to see your IP.
> **Stored in the browser:** identities (including their private keys), favorites with any passwords you typed into them, and settings live in the browser's `localStorage`, unencrypted by default - the same way the native client keeps them in its settings files. Anyone with access to your browser profile can read them. To encrypt identities and saved passwords, set a master password under Options → Security; it's then asked for once per session (every reload or new tab), and without it that data can't be recovered, so export identities you care about first. Server banners load directly from the host the server admin configured; turn them off under Options → Application if you don't want that host to see your IP.
<details>
<summary><b>🛠️ Manual installation (without Docker)</b></summary>
@@ -346,6 +384,15 @@ A share link (above) always takes priority over the baked-in default when both a
Either way: on your own hosted instance, the mandatory first-visit Terms of Use is shown and accepted before anything auto-connects; and if the connection fails, the connect dialog opens prefilled so the visitor can fix it and retry by hand.
<a id="translating"></a>
## 🌍 Translating
The UI texts live in flat JSON files in [`web/src/locales/`](web/src/locales/), one per language, with `en.json` as the reference. Untranslated keys fall back to English.
- **Fix or complete a language:** edit its file and open a pull request.
- **Add a new language:** copy `en.json` to `<code>.json` (for example `it.json`), translate the values and open a pull request. Leave the keys and placeholders like `{count}` as they are. I'll wire the language into the selector.
- **No GitHub account?** Send the file via the in-app feedback form or to feedback@webspeak3.de.
## Credits
The vast majority of this project's code was written by [Claude Code](https://claude.com/claude-code) (Anthropic's Claude), working iteratively with the repo owner one feature at a time.
@@ -379,8 +426,8 @@ any way officially connected with TeamSpeak Systems GmbH.
"TeamSpeak", "TS3", and related logos or names are registered trademarks of
TeamSpeak Systems GmbH. Likewise, WebSpeak3 is not affiliated with,
associated with, authorized by, or endorsed by TeaSpeak or GreenTeaSpeak;
"TeaSpeak" and "GreenTeaSpeak" are names of their respective projects/
associated with, authorized by, or endorsed by TeaSpeak or VoySpeak (formerly GreenTeaSpeak);
"TeaSpeak" and "VoySpeak" are names of their respective projects/
operators. All product and company names are trademarks™ or registered®
trademarks of their respective holders. Use of them does not imply any
affiliation with or endorsement by them.
+181 -9
View File
@@ -172,12 +172,41 @@ version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
[[package]]
name = "bindgen"
version = "0.65.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5"
dependencies = [
"bitflags 1.3.2",
"cexpr",
"clang-sys",
"lazy_static",
"lazycell",
"log",
"peeking_take_while",
"prettyplease",
"proc-macro2",
"quote",
"regex",
"rustc-hash 1.1.0",
"shlex 1.3.0",
"syn 2.0.119",
"which",
]
[[package]]
name = "bit-vec"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
version = "2.13.1"
@@ -223,7 +252,16 @@ dependencies = [
"find-msvc-tools",
"jobserver",
"libc",
"shlex",
"shlex 2.0.1",
]
[[package]]
name = "cexpr"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
"nom",
]
[[package]]
@@ -259,6 +297,17 @@ dependencies = [
"inout",
]
[[package]]
name = "clang-sys"
version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a"
dependencies = [
"glob",
"libc",
"libloading",
]
[[package]]
name = "clap"
version = "4.6.4"
@@ -623,6 +672,16 @@ version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "errno"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.61.2",
]
[[package]]
name = "ff"
version = "0.13.1"
@@ -808,6 +867,12 @@ dependencies = [
"time",
]
[[package]]
name = "glob"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
[[package]]
name = "group"
version = "0.13.0"
@@ -938,6 +1003,15 @@ dependencies = [
"digest 0.10.7",
]
[[package]]
name = "home"
version = "0.5.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"
dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "http"
version = "1.4.2"
@@ -1277,12 +1351,34 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "lazycell"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
version = "0.2.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
[[package]]
name = "libloading"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
dependencies = [
"cfg-if",
"windows-link",
]
[[package]]
name = "linux-raw-sys"
version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
[[package]]
name = "litemap"
version = "0.8.2"
@@ -1501,6 +1597,12 @@ dependencies = [
"windows-link",
]
[[package]]
name = "peeking_take_while"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
[[package]]
name = "pem-rfc7468"
version = "0.7.0"
@@ -1585,6 +1687,16 @@ dependencies = [
"num-traits",
]
[[package]]
name = "prettyplease"
version = "0.2.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
dependencies = [
"proc-macro2",
"syn 2.0.119",
]
[[package]]
name = "primeorder"
version = "0.13.6"
@@ -1625,7 +1737,7 @@ dependencies = [
"pin-project-lite",
"quinn-proto",
"quinn-udp",
"rustc-hash",
"rustc-hash 2.1.3",
"rustls",
"socket2",
"thiserror 2.0.19",
@@ -1647,7 +1759,7 @@ dependencies = [
"rand 0.10.2",
"rand_pcg",
"ring",
"rustc-hash",
"rustc-hash 2.1.3",
"rustls",
"rustls-pki-types",
"slab",
@@ -1748,7 +1860,7 @@ version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
"bitflags",
"bitflags 2.13.1",
]
[[package]]
@@ -1771,6 +1883,18 @@ dependencies = [
"syn 3.0.3",
]
[[package]]
name = "regex"
version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.16"
@@ -1856,6 +1980,12 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "rustc-hash"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
[[package]]
name = "rustc-hash"
version = "2.1.3"
@@ -1871,6 +2001,19 @@ dependencies = [
"semver",
]
[[package]]
name = "rustix"
version = "0.38.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
dependencies = [
"bitflags 2.13.1",
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.52.0",
]
[[package]]
name = "rustls"
version = "0.23.42"
@@ -2002,7 +2145,7 @@ version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
dependencies = [
"bitflags",
"bitflags 2.13.1",
"core-foundation 0.10.1",
"core-foundation-sys",
"libc",
@@ -2114,6 +2257,12 @@ dependencies = [
"lazy_static",
]
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "shlex"
version = "2.0.1"
@@ -2180,6 +2329,16 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "speex-sys"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4acde4a315153e8586867cb7e974cb289fa9bc9caa0928f9dfac174f969284e0"
dependencies = [
"bindgen",
"cc",
]
[[package]]
name = "spki"
version = "0.7.3"
@@ -2262,7 +2421,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b"
dependencies = [
"bitflags",
"bitflags 2.13.1",
"core-foundation 0.9.4",
"system-configuration-sys",
]
@@ -2520,7 +2679,7 @@ version = "0.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840"
dependencies = [
"bitflags",
"bitflags 2.13.1",
"bytes",
"futures-util",
"http",
@@ -2642,6 +2801,7 @@ dependencies = [
"num-traits",
"serde",
"serde_json",
"speex-sys",
"time",
"tokio",
"tracing-subscriber",
@@ -2710,7 +2870,7 @@ name = "tsproto-packets"
version = "0.1.0"
dependencies = [
"base64",
"bitflags",
"bitflags 2.13.1",
"num-derive",
"num-traits",
"omnom",
@@ -2736,7 +2896,7 @@ name = "tsproto-types"
version = "0.1.0"
dependencies = [
"base64",
"bitflags",
"bitflags 2.13.1",
"curve25519-dalek-ng",
"elliptic-curve",
"generic-array",
@@ -2930,6 +3090,18 @@ dependencies = [
"rustls-pki-types",
]
[[package]]
name = "which"
version = "4.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
dependencies = [
"either",
"home",
"once_cell",
"rustix",
]
[[package]]
name = "widestring"
version = "1.2.1"
+2 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
tsclientlib = { path = "../tsclientlib/tsclientlib", default-features = false, features = ["default-tls", "audio"] }
tsproto-packets = { path = "../tsclientlib/utils/tsproto-packets" }
audiopus = "0.3.0-rc.0"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "io-std", "io-util"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "time", "io-std", "io-util", "net"] }
futures = "0.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
@@ -17,3 +17,4 @@ num-traits = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
base64 = "0.22"
time = "0.3"
speex-sys = "0.4"
+131 -27
View File
@@ -1,6 +1,7 @@
use std::borrow::Cow;
use std::collections::{BTreeMap, HashMap, HashSet};
use std::str;
use std::sync::atomic::{AtomicU64, Ordering};
use std::time::Duration;
use anyhow::Result;
@@ -31,6 +32,8 @@ use tsclientlib::{
ServerType, StreamItem, TextMessageTargetMode, TsError,
};
use tsproto_packets::commands::{CommandItem, CommandParser};
mod ts2;
use tsproto_packets::packets::{AudioData, CodecType, Direction, Flags, OutAudio, OutCommand, PacketType};
/// 20ms frames at 48kHz, which is what TeamSpeak's Opus voice codec expects.
@@ -44,6 +47,22 @@ const MAX_UPLOAD_BYTES: u64 = 24 << 20;
/// line per file made the Node gateway hold several copies of it at once and
/// run out of heap (2026-10-11).
const TRANSFER_CHUNK_BYTES: usize = 192 << 10;
// File transfer bandwidth caps in bytes/s (0 = unlimited), set via the
// "ftlimit <up> <down>" stdin command. Read by the spawned transfer tasks.
static FT_LIMIT_UP: AtomicU64 = AtomicU64::new(0);
static FT_LIMIT_DOWN: AtomicU64 = AtomicU64::new(0);
/// Sleeps long enough that `bytes` took at least bytes/limit seconds.
async fn ft_pace(limit: &AtomicU64, bytes: usize, started: std::time::Instant) {
let limit = limit.load(Ordering::Relaxed);
if limit == 0 {
return;
}
let target = Duration::from_secs_f64(bytes as f64 / limit as f64);
if let Some(rest) = target.checked_sub(started.elapsed()) {
tokio::time::sleep(rest).await;
}
}
/// Half-received chunked uploads per connection - each can hold up to
/// MAX_UPLOAD_BYTES until it completes.
const MAX_PARTIAL_UPLOADS: usize = 4;
@@ -53,7 +72,7 @@ const MAX_ICON_BYTES: u64 = 512 << 10;
const MAX_AVATAR_BYTES: u64 = 512 << 10;
const OUT_CHANNELS: usize = 2;
#[derive(Parser, Debug)]
#[derive(Parser, Debug, Clone)]
#[command(author, about = "One-shot bridge: connects to a real TeamSpeak server and reports events as JSON lines on stdout")]
struct Args {
/// Server address, e.g. "192.168.178.108" or "192.168.178.108:9987"
@@ -81,12 +100,19 @@ struct Args {
#[arg(long, env = "TS_IDENTITY", hide_env_values = true)]
identity: Option<String>,
/// Server flavour: `teamspeak` (skip TeaSpeak handshake), `teaspeak`
/// (always handshake), or `auto` (handshake when server sends `teaspeak=1`).
#[arg(long, default_value = "auto", value_parser = ["auto", "teamspeak", "teaspeak"])]
/// (always handshake), `auto` (handshake when server sends `teaspeak=1`),
/// or `ts2` for a TeamSpeak 2 server (experimental, see ts2.rs).
#[arg(long, default_value = "auto", value_parser = ["auto", "teamspeak", "teaspeak", "ts2"])]
server_type: String,
/// Privilege key / token (`client_default_token` in clientinit).
#[arg(long, alias = "token", env = "TS_PRIVILEGE_KEY", hide_env_values = true)]
privilege_key: Option<String>,
/// TeamSpeak 2 only: account name for a registered login (anonymous when omitted).
#[arg(long, env = "TS_LOGIN_NAME", hide_env_values = true)]
login_name: Option<String>,
/// TeamSpeak 2 only: password of the registered account.
#[arg(long, env = "TS_LOGIN_PASSWORD", hide_env_values = true)]
login_password: Option<String>,
}
#[derive(Serialize)]
@@ -301,6 +327,12 @@ enum Event {
/// Ids of clients currently detected as talking.
#[serde(rename = "talkers")]
Talkers { clients: Vec<u16> },
/// Someone started whispering to us and the whisper settings let it through.
#[serde(rename = "whisperReceived")]
WhisperReceived {
#[serde(rename = "clientId")]
client_id: u16,
},
#[serde(rename = "disconnected")]
Disconnected { reason: String },
/// Lost the server (timeout, server restart); tsclientlib is reconnecting
@@ -311,6 +343,9 @@ enum Event {
Reconnected,
#[serde(rename = "error")]
Error { message: String },
/// An "error" that belongs to one file transfer, so the frontend can mark the right one.
#[serde(rename = "error")]
TransferError { message: String, cid: u64, path: String },
/// A "switch" to a password-protected channel was rejected because no (or
/// the wrong) password was supplied. The frontend should prompt for a
/// password and retry with it rather than showing a generic error.
@@ -841,12 +876,33 @@ fn send_server_get_variables(con: &mut tsclientlib::Connection) {
#[tokio::main]
async fn main() {
let args = Args::parse();
if let Err(e) = run(args).await {
// "auto" falls back to TeamSpeak 2 when the TS3 handshake gets no answer at
// all; only if the gateway enables TS2 (ENABLE_TS2=1, inherited env).
let ts2_fallback = args.server_type == "auto" && std::env::var("ENABLE_TS2").as_deref() == Ok("1");
let result = if args.server_type == "ts2" {
ts2::run(args).await
} else if ts2_fallback {
match run(args.clone()).await {
Err(e) if e.to_string().contains("connection timed out") => {
eprintln!("no TS3 answer, trying TeamSpeak 2");
// Only the TS3 default port is swapped; an explicit other port is kept.
let mut args = args;
if let Some(host) = args.address.strip_suffix(":9987") {
args.address = host.to_string();
}
ts2::run(args).await.map_err(|_| e)
}
r => r,
}
} else {
run(args).await
};
if let Err(e) = result {
emit(&Event::Error { message: e.to_string() });
}
}
/// GreenTeaSpeak servers report versions like `2.5.1 [Build: …]`.
/// VoySpeak (formerly GreenTeaSpeak) servers report versions like `2.5.1 [Build: …]`.
/// Classic TeaSpeak reports `TeaSpeak 1.4.21-beta [Build: …]` — not a GTS host.
/// Classic TeamSpeak 3 reports `3.13.8 [Build: …]` — must not use GTS labels.
fn is_greenteaspeak_server_version(version: &str) -> bool {
@@ -876,12 +932,12 @@ fn format_server_license(license: LicenseType, version: &str) -> String {
return match license {
LicenseType::Offline => "Private".into(),
LicenseType::Sdk => "Premium".into(),
LicenseType::SdkOffline => "Authorized GreenTeaSpeak Host Provider".into(),
LicenseType::SdkOffline => "Authorized VoySpeak Host Provider".into(),
_ => "Keine Lizenz".into(),
};
}
if version.trim().to_ascii_lowercase().starts_with("teaspeak") {
return "Kein GreenTeaSpeak-Server".into();
return "Kein VoySpeak-Server".into();
}
match license {
LicenseType::NoLicense => "No License".into(),
@@ -910,8 +966,8 @@ fn friendly_connect_error(address: &str, e: tsclientlib::Error) -> anyhow::Error
{
return anyhow::anyhow!(
"Could not connect to \"{address}\": this server rejects this client type (error 533). \
GreenTeaSpeak public servers often only allow the official GreenTeaSpeak desktop client. \
Try a self-hosted TeaSpeak with TeamSpeak-compat enabled, or use GreenTeaSpeak 2 for ts.greenteaspeak.de."
VoySpeak (formerly GreenTeaSpeak) public servers often only allow the official VoySpeak desktop client. \
Try a self-hosted TeaSpeak with TeamSpeak-compat enabled, or use the VoySpeak desktop client."
);
}
if raw.contains("BlockedTarget") {
@@ -1069,6 +1125,10 @@ async fn run(args: Args) -> Result<()> {
// stdin command, cleared via "unwhisper".
let mut whisper_channels: Vec<u64> = Vec::new();
let mut whisper_clients: Vec<u16> = Vec::new();
// Incoming whispers, set via "whisperpolicy allow|block;<client ids>": the
// ids are exceptions to the mode. Blocked whispers are dropped undecoded.
let mut whisper_block_default = false;
let mut whisper_exceptions: HashSet<u16> = HashSet::new();
// Set by "clientconninfo"/"serverconninfo" while waiting for the server's
// reply to land in book state (it arrives async as a later BookEvents
// batch, not as a direct command result) - checked and emitted below.
@@ -1431,6 +1491,14 @@ async fn run(args: Args) -> Result<()> {
let clients_part = parts.next().unwrap_or("");
whisper_channels = channels_part.split(',').filter_map(|s| s.trim().parse().ok()).collect();
whisper_clients = clients_part.split(',').filter_map(|s| s.trim().parse().ok()).collect();
} else if let Some(rest) = l.strip_prefix("whisperpolicy ") {
let (mode, ids) = rest.split_once(';').unwrap_or((rest, ""));
whisper_block_default = mode.trim() == "block";
whisper_exceptions = ids.split(',').filter_map(|s| s.trim().parse().ok()).collect();
} else if let Some(rest) = l.strip_prefix("ftlimit ") {
let mut it = rest.split_whitespace().map(|v| v.parse::<u64>().unwrap_or(0));
FT_LIMIT_UP.store(it.next().unwrap_or(0), Ordering::Relaxed);
FT_LIMIT_DOWN.store(it.next().unwrap_or(0), Ordering::Relaxed);
} else if l == "unwhisper" {
whisper_channels.clear();
whisper_clients.clear();
@@ -2217,7 +2285,11 @@ async fn run(args: Args) -> Result<()> {
Ok(handle) => {
pending_downloads.insert(handle.0, (cid, path.to_string()));
}
Err(e) => emit(&Event::Error { message: format!("Download failed: {e}") }),
Err(e) => emit(&Event::TransferError {
message: format!("Download failed: {e}"),
cid,
path: path.to_string(),
}),
},
Err(_) => emit(&Event::Error { message: format!("Invalid channel id: {cid_str}") }),
}
@@ -2236,7 +2308,11 @@ async fn run(args: Args) -> Result<()> {
Ok(handle) => {
pending_uploads.insert(handle.0, (cid, path.to_string(), bytes));
}
Err(e) => emit(&Event::Error { message: format!("Upload failed: {e}") }),
Err(e) => emit(&Event::TransferError {
message: format!("Upload failed: {e}"),
cid,
path: path.to_string(),
}),
}
}
_ => emit(&Event::Error { message: "Invalid ftupload args".into() }),
@@ -2248,11 +2324,20 @@ async fn run(args: Args) -> Result<()> {
Ok(handle) => {
pending_uploads.insert(handle.0, (cid, path, bytes));
}
Err(e) => emit(&Event::Error { message: format!("Upload failed: {e}") }),
Err(e) => emit(&Event::TransferError { message: format!("Upload failed: {e}"), cid, path }),
}
}
Ok(None) => {}
Err(message) => emit(&Event::Error { message }),
Err(message) => {
// Same field order as take_upload_chunk: cid, offset, total, path, data.
let fields: Vec<&str> = rest.splitn(5, '\t').collect();
match (fields[0].trim().parse::<u64>(), fields.get(3)) {
(Ok(cid), Some(path)) => {
emit(&Event::TransferError { message, cid, path: path.to_string() })
}
_ => emit(&Event::Error { message }),
}
}
}
} else if l == "permissionlist" {
if pending_permission_list {
@@ -2656,11 +2741,15 @@ async fn run(args: Args) -> Result<()> {
emit(&snapshot(con.get_state()?));
}
Some(Ok(StreamItem::Audio(packet))) => {
let from = match packet.data().data() {
AudioData::S2C { from, .. } => Some(ClientId(*from)),
AudioData::S2CWhisper { from, .. } => Some(ClientId(*from)),
_ => None,
let (from, whisper) = match packet.data().data() {
AudioData::S2C { from, .. } => (Some(ClientId(*from)), false),
AudioData::S2CWhisper { from, .. } => (Some(ClientId(*from)), true),
_ => (None, false),
};
// A whisper gets through when its sender isn't an exception to a
// blocking mode, or is one to an allowing mode.
let from =
from.filter(|f| !whisper || whisper_block_default == whisper_exceptions.contains(&f.0));
if let Some(from) = from {
if let Ok(Some(new_talker)) = audio_handler.handle_packet(from, packet) {
if let (Some(&volume), Some(queue)) = (
@@ -2671,6 +2760,9 @@ async fn run(args: Args) -> Result<()> {
}
if talking.insert(new_talker.0) {
emit(&Event::Talkers { clients: talking.iter().copied().collect() });
if whisper {
emit(&Event::WhisperReceived { client_id: new_talker.0 });
}
}
}
}
@@ -3063,8 +3155,10 @@ async fn run(args: Args) -> Result<()> {
};
tokio::spawn(async move {
if announced_size > limit {
emit(&Event::Error {
emit(&Event::TransferError {
message: format!("Download refused: {path} is larger than {} KiB", limit >> 10),
cid,
path,
});
return;
}
@@ -3075,6 +3169,7 @@ async fn run(args: Args) -> Result<()> {
// Fill the whole chunk (or hit EOF) so every piece but the
// last is exactly TRANSFER_CHUNK_BYTES - see its comment.
let mut filled = 0;
let started = std::time::Instant::now();
let read = loop {
match stream.read(&mut buf[filled..]).await {
Ok(0) => break Ok(()),
@@ -3088,18 +3183,21 @@ async fn run(args: Args) -> Result<()> {
}
};
if let Err(e) = read {
emit(&Event::Error { message: format!("Download failed: {e}") });
emit(&Event::TransferError { message: format!("Download failed: {e}"), cid, path });
return;
}
if offset + filled as u64 > limit {
emit(&Event::Error {
emit(&Event::TransferError {
message: format!("Download aborted: {path} is larger than {} KiB", limit >> 10),
cid,
path,
});
return;
}
let done = filled < buf.len();
let data = base64::engine::general_purpose::STANDARD.encode(&buf[..filled]);
emit(&Event::FileDownloadChunk { cid, path: path.clone(), offset, data, done });
ft_pace(&FT_LIMIT_DOWN, filled, started).await;
if done {
return;
}
@@ -3114,18 +3212,24 @@ async fn run(args: Args) -> Result<()> {
let mut stream = result.stream;
tokio::spawn(async move {
let slice = if seek < data.len() { &data[seek..] } else { &[][..] };
match stream.write_all(slice).await {
Ok(_) => emit(&Event::FileUploadDone { cid, path }),
Err(e) => emit(&Event::Error { message: format!("Upload failed: {e}") }),
for piece in slice.chunks(TRANSFER_CHUNK_BYTES) {
let started = std::time::Instant::now();
if let Err(e) = stream.write_all(piece).await {
emit(&Event::TransferError { message: format!("Upload failed: {e}"), cid, path });
return;
}
ft_pace(&FT_LIMIT_UP, piece.len(), started).await;
}
emit(&Event::FileUploadDone { cid, path });
});
}
}
Some(Ok(StreamItem::FiletransferFailed(handle, e))) => {
let was_pending = pending_downloads.remove(&handle.0).is_some()
|| pending_uploads.remove(&handle.0).is_some();
if was_pending {
emit(&Event::Error { message: format!("File transfer failed: {e}") });
let failed = pending_downloads
.remove(&handle.0)
.or_else(|| pending_uploads.remove(&handle.0).map(|(cid, path, _)| (cid, path)));
if let Some((cid, path)) = failed {
emit(&Event::TransferError { message: format!("File transfer failed: {e}"), cid, path });
}
}
Some(Ok(StreamItem::DisconnectedTemporarily(reason))) => {
+945
View File
@@ -0,0 +1,945 @@
//! TeamSpeak 2 client (experimental, `--server-type=ts2`).
//!
//! TS2 is a plain UDP protocol, unrelated to TS3. Layouts come from the
//! Wireshark dissector (`packet-teamspeak2.c`) and the soliloque-server
//! reimplementation, checked against a real 2.0.24.1 server.
//!
//! Packet classes (all little endian):
//! - `0xbef4` connection: class, type, session, client id, counter, CRC @16, payload @20
//! - `0xbef0` reliable: same plus resend count @16, fragment @18, CRC @20, payload @24
//! - `0xbef1` ACK: class, 0, session, client id, acked seq (16 bytes, no CRC)
//! - `0xbef2`/`0xbef3` voice, client -> server / server -> client
//!
//! CRC is zlib CRC32 over the whole packet with the CRC field zeroed.
//! Speaks the same stdout/stdin line protocol as the TS3 path in main.rs.
use std::collections::{BTreeMap, HashMap, HashSet, VecDeque};
use std::mem::MaybeUninit;
use std::net::SocketAddr;
use std::os::raw::{c_char, c_int, c_void};
use std::time::{Duration, Instant};
use anyhow::{Result, anyhow, bail};
use base64::Engine;
use tokio::io::{AsyncBufReadExt, BufReader};
use tokio::net::UdpSocket;
use crate::{Args, ChannelInfo, ClientInfo, Event, emit};
const DEFAULT_PORT: u16 = 8767;
const KEEPALIVE_EVERY: Duration = Duration::from_secs(3);
const RESEND_AFTER: Duration = Duration::from_secs(1);
const MAX_RESENDS: u16 = 10;
const SERVER_TIMEOUT: Duration = Duration::from_secs(20);
/// Speex narrowband: 20 ms frames of 160 samples at 8 kHz, 5 per voice packet.
const SPEEX_FRAME: usize = 160;
const FRAMES_PER_PACKET: usize = 5;
/// Start playing a speaker once this many 8 kHz samples are queued. Packets
/// carry 100 ms each, so this waits for the second packet - TS2 clients
/// send in bursts and anything less underruns on ordinary jitter.
const PREBUFFER: usize = SPEEX_FRAME * FRAMES_PER_PACKET + 1;
const ST_CHANNEL_COMMANDER: u16 = 1;
const ST_AWAY: u16 = 8;
const ST_MUTE_MIC: u16 = 16;
const ST_MUTE_SPEAKERS: u16 = 32;
const CH_PASSWORD: u8 = 4;
fn crc(pkt: &mut [u8], at: usize) {
pkt[at..at + 4].fill(0);
let h = crc32(pkt);
pkt[at..at + 4].copy_from_slice(&h.to_le_bytes());
}
/// zlib's CRC32 (IEEE, reflected). Small enough that a dependency isn't worth it.
fn crc32(data: &[u8]) -> u32 {
let mut c = !0u32;
for &b in data {
c ^= b as u32;
for _ in 0..8 {
c = if c & 1 != 0 { (c >> 1) ^ 0xEDB8_8320 } else { c >> 1 };
}
}
!c
}
/// TS2 strings are Latin-1. Fixed fields are a length byte plus 29 bytes.
fn latin1(b: &[u8]) -> String {
b.iter().map(|&c| c as char).collect()
}
fn to_latin1(s: &str) -> Vec<u8> {
s.chars().map(|c| if (c as u32) < 256 { c as u8 } else { b'?' }).collect()
}
fn pstr(s: &str) -> [u8; 30] {
let mut out = [0u8; 30];
let b = to_latin1(s);
let n = b.len().min(29);
out[0] = n as u8;
out[1..1 + n].copy_from_slice(&b[..n]);
out
}
fn rpstr(b: &[u8], at: usize) -> String {
let Some(&n) = b.get(at) else { return String::new() };
let end = (at + 1 + (n as usize).min(29)).min(b.len());
latin1(b.get(at + 1..end).unwrap_or(&[]))
}
/// Null-terminated string at `*at`, advancing past the terminator.
fn rcstr(b: &[u8], at: &mut usize) -> String {
let start = (*at).min(b.len());
let end = b[start..].iter().position(|&c| c == 0).map_or(b.len(), |p| start + p);
*at = end + 1;
latin1(&b[start..end])
}
fn u16_at(b: &[u8], at: usize) -> u16 {
b.get(at..at + 2).map_or(0, |s| u16::from_le_bytes([s[0], s[1]]))
}
fn u32_at(b: &[u8], at: usize) -> u32 {
b.get(at..at + 4).map_or(0, |s| u32::from_le_bytes([s[0], s[1], s[2], s[3]]))
}
fn codec_name(codec: u16) -> String {
match codec {
0 => "CELP 5.1",
1 => "CELP 6.3",
2 => "GSM 14.8",
3 => "GSM 16.4",
4 => "CELP Windows 5.2",
5 => "Speex 3.4",
6 => "Speex 5.2",
7 => "Speex 7.2",
8 => "Speex 9.3",
9 => "Speex 12.3",
10 => "Speex 16.3",
11 => "Speex 19.5",
12 => "Speex 25.9",
_ => "unknown",
}
.into()
}
/// Speex narrowband submode per TS2 codec id. Derived from the fixed voice
/// payload sizes (e.g. 138 bytes = 5 frames of submode 4's 220 bits); the
/// server rejects packets of any other size.
fn speex_submode(codec: u8) -> Option<c_int> {
Some(match codec {
5 => 1,
6 => 8,
7 => 2,
8 => 3,
9 => 4,
10 => 5,
11 => 6,
12 => 7,
_ => return None,
})
}
/// Bytes of Speex data per voice packet, indexed by codec id.
const SPEEX_BYTES: [usize; 13] = [0, 0, 0, 0, 0, 27, 50, 75, 100, 138, 188, 228, 308];
// --- Speex -------------------------------------------------------------------
struct Bits(Box<speex_sys::SpeexBits>);
impl Bits {
fn new() -> Self {
let mut b: Box<MaybeUninit<speex_sys::SpeexBits>> = Box::new(MaybeUninit::uninit());
// SAFETY: speex_bits_init fully initialises the struct.
unsafe {
speex_sys::speex_bits_init(b.as_mut_ptr());
Bits(Box::from_raw(Box::into_raw(b).cast()))
}
}
}
impl Drop for Bits {
fn drop(&mut self) {
unsafe { speex_sys::speex_bits_destroy(&mut *self.0) }
}
}
// The raw state pointers are only ever touched from the one task that owns them.
unsafe impl Send for Bits {}
struct Decoder {
st: *mut c_void,
bits: Bits,
}
unsafe impl Send for Decoder {}
impl Decoder {
fn new() -> Self {
unsafe {
let st = speex_sys::speex_decoder_init(speex_sys::speex_lib_get_mode(speex_sys::SPEEX_MODEID_NB));
let mut on: c_int = 1;
speex_sys::speex_decoder_ctl(st, speex_sys::SPEEX_SET_ENH, (&mut on as *mut c_int).cast());
Decoder { st, bits: Bits::new() }
}
}
/// Decodes one voice packet's worth of frames to 8 kHz samples.
fn decode(&mut self, data: &[u8]) -> Vec<i16> {
let mut out = vec![0i16; SPEEX_FRAME * FRAMES_PER_PACKET];
unsafe {
speex_sys::speex_bits_read_from(&mut *self.bits.0, data.as_ptr() as *mut c_char, data.len() as c_int);
for frame in out.chunks_mut(SPEEX_FRAME) {
if speex_sys::speex_decode_int(self.st, &mut *self.bits.0, frame.as_mut_ptr()) != 0 {
break;
}
}
}
out
}
}
impl Drop for Decoder {
fn drop(&mut self) {
unsafe { speex_sys::speex_decoder_destroy(self.st) }
}
}
struct Encoder {
st: *mut c_void,
bits: Bits,
codec: u8,
frames: usize,
}
unsafe impl Send for Encoder {}
impl Encoder {
fn new(codec: u8) -> Option<Self> {
let mut submode = speex_submode(codec)?;
unsafe {
let st = speex_sys::speex_encoder_init(speex_sys::speex_lib_get_mode(speex_sys::SPEEX_MODEID_NB));
speex_sys::speex_encoder_ctl(st, speex_sys::SPEEX_SET_MODE, (&mut submode as *mut c_int).cast());
Some(Encoder { st, bits: Bits::new(), codec, frames: 0 })
}
}
/// Feeds one 8 kHz frame; returns a full packet payload every fifth frame.
fn push(&mut self, frame: &mut [i16; SPEEX_FRAME]) -> Option<Vec<u8>> {
unsafe { speex_sys::speex_encode_int(self.st, frame.as_mut_ptr(), &mut *self.bits.0) };
self.frames += 1;
if self.frames < FRAMES_PER_PACKET {
return None;
}
self.frames = 0;
let mut out = vec![0u8; SPEEX_BYTES[self.codec as usize]];
debug_assert_eq!(unsafe { speex_sys::speex_bits_nbytes(&mut *self.bits.0) } as usize, out.len());
unsafe {
speex_sys::speex_bits_write(&mut *self.bits.0, out.as_mut_ptr() as *mut c_char, out.len() as c_int);
speex_sys::speex_bits_reset(&mut *self.bits.0);
}
Some(out)
}
}
impl Drop for Encoder {
fn drop(&mut self) {
unsafe { speex_sys::speex_encoder_destroy(self.st) }
}
}
// --- State ---------------------------------------------------------------------
struct Channel {
id: u32,
flags: u8,
codec: u16,
parent: u32,
order: u16,
max_users: u16,
name: String,
topic: String,
}
struct Player {
channel: u32,
status: u16,
name: String,
}
/// Parses one channel record (list and "created" share the layout).
fn parse_channel(b: &[u8], at: &mut usize) -> Option<Channel> {
let o = *at;
if b.len() < o + 16 {
return None;
}
*at += 16;
let name = rcstr(b, at);
let topic = rcstr(b, at);
let _description = rcstr(b, at);
Some(Channel {
id: u32_at(b, o),
flags: b[o + 4],
codec: u16_at(b, o + 6),
parent: u32_at(b, o + 8),
order: u16_at(b, o + 12),
max_users: u16_at(b, o + 14),
name,
topic,
})
}
struct Speaker {
decoder: Decoder,
queue: VecDeque<i16>,
playing: bool,
}
struct Ts2 {
sock: UdpSocket,
session: u32,
client_id: u32,
conn_counter: u32,
seq: u32,
/// Reliable packets waiting to go out. TS2 is stop-and-wait: only the
/// front one is in flight until the server ACKs it.
outbox: VecDeque<Vec<u8>>,
in_flight: Option<(Instant, u16)>,
next_in: u32,
early: BTreeMap<u32, Vec<u8>>,
fragments: Vec<u8>,
fragment_type: u16,
channels: BTreeMap<u32, Channel>,
players: BTreeMap<u32, Player>,
lists_done: bool,
speakers: HashMap<u32, Speaker>,
talking: HashSet<u32>,
encoder: Option<Encoder>,
voice_counter: u16,
voice_conversation: u16,
last_audio_in: Option<Instant>,
codec_warned: bool,
}
impl Ts2 {
fn reliable(&mut self, typ: u16, payload: &[u8]) {
let mut p = Vec::with_capacity(24 + payload.len());
p.extend_from_slice(&0xbef0u16.to_le_bytes());
p.extend_from_slice(&typ.to_le_bytes());
p.extend_from_slice(&self.session.to_le_bytes());
p.extend_from_slice(&self.client_id.to_le_bytes());
p.extend_from_slice(&self.seq.to_le_bytes());
p.extend_from_slice(&[0; 8]); // resend count, fragment, CRC
p.extend_from_slice(payload);
crc(&mut p, 20);
self.seq += 1;
self.outbox.push_back(p);
}
async fn pump_outbox(&mut self) -> Result<()> {
let Some(front) = self.outbox.front_mut() else { return Ok(()) };
let resends = match self.in_flight {
None => 0,
Some((at, _)) if at.elapsed() < RESEND_AFTER => return Ok(()),
Some((_, n)) if n >= MAX_RESENDS => bail!("The TeamSpeak 2 server stopped answering"),
Some((_, n)) => n + 1,
};
front[16..18].copy_from_slice(&resends.to_le_bytes());
crc(front, 20);
self.sock.send(front).await?;
self.in_flight = Some((Instant::now(), resends));
Ok(())
}
/// Sends the logout, then waits (max 1.5 s) for the server's own "player left"
/// for us and acks it. Until that ack the server keeps us half-present (it
/// resends every 100 ms) and lists us to clients joining meanwhile, who never
/// get a leave for that ghost.
async fn logout(&mut self) {
self.reliable(0x012c, &[]);
let deadline = Instant::now() + Duration::from_millis(1500);
let mut buf = [0u8; 2048];
while Instant::now() < deadline {
if self.pump_outbox().await.is_err() {
return;
}
let Ok(Ok(n)) = tokio::time::timeout(Duration::from_millis(100), self.sock.recv(&mut buf)).await else { continue };
let b = &buf[..n];
match u16_at(b, 0) {
0xbef0 if b.len() >= 24 => {
let mut ack = Vec::with_capacity(16);
ack.extend_from_slice(&0xbef1u16.to_le_bytes());
ack.extend_from_slice(&0u16.to_le_bytes());
ack.extend_from_slice(&self.session.to_le_bytes());
ack.extend_from_slice(&self.client_id.to_le_bytes());
ack.extend_from_slice(&b[12..16]);
let _ = self.sock.send(&ack).await;
if u16_at(b, 2) == 0x0065 && u32_at(b, 24) == self.client_id {
return;
}
}
_ => {
let _ = self.on_datagram(b).await;
}
}
}
}
async fn keepalive(&mut self) -> Result<()> {
let mut p = Vec::with_capacity(24);
p.extend_from_slice(&0xbef4u16.to_le_bytes());
p.extend_from_slice(&1u16.to_le_bytes());
p.extend_from_slice(&self.session.to_le_bytes());
p.extend_from_slice(&self.client_id.to_le_bytes());
p.extend_from_slice(&self.conn_counter.to_le_bytes());
p.extend_from_slice(&[0; 4]); // CRC
crc(&mut p, 16);
self.conn_counter += 1;
self.sock.send(&p).await?;
Ok(())
}
fn own_channel(&self) -> u32 {
self.players.get(&self.client_id).map_or(0, |p| p.channel)
}
fn set_status(&mut self, bit: u16, on: bool) {
let mut status = self.players.get(&self.client_id).map_or(0, |p| p.status);
status = if on { status | bit } else { status & !bit };
if let Some(p) = self.players.get_mut(&self.client_id) {
p.status = status;
}
self.reliable(0x0130, &status.to_le_bytes());
self.snapshot();
}
fn send_text(&mut self, kind: u8, target: u32, message: &str) {
let mut p = Vec::new();
p.extend_from_slice(&0u32.to_le_bytes()); // colour
p.push(kind);
p.extend_from_slice(&target.to_le_bytes());
p.extend_from_slice(&to_latin1(message));
p.push(0);
self.reliable(0x01ae, &p);
}
fn snapshot(&self) {
if !self.lists_done {
return;
}
let channels = self
.channels
.values()
.map(|c| ChannelInfo {
id: c.id as u64,
parent: if c.parent == u32::MAX { 0 } else { c.parent as u64 },
order: c.order as u64,
name: c.name.clone(),
topic: c.topic.clone(),
codec: codec_name(c.codec),
max_clients: (c.max_users > 0).then_some(c.max_users),
has_password: c.flags & CH_PASSWORD != 0,
})
.collect::<Vec<_>>();
let clients = self
.players
.iter()
.map(|(&id, p)| ClientInfo {
id: id as u16,
channel: p.channel as u64,
name: p.name.clone(),
input_muted: p.status & ST_MUTE_MIC != 0,
output_muted: p.status & ST_MUTE_SPEAKERS != 0,
input_hardware_enabled: true,
away: p.status & ST_AWAY != 0,
away_message: String::new(),
is_channel_commander: p.status & ST_CHANNEL_COMMANDER != 0,
country: String::new(),
uid: String::new(),
database_id: 0,
channel_group: 0,
server_groups: Vec::new(),
has_talk_power: true,
is_query: false,
is_streaming: false,
avatar_hash: String::new(),
})
.collect::<Vec<_>>();
emit(&Event::Channels {
server_clients_online: clients.len() as u16,
server_channels_online: channels.len() as u64,
channels,
clients,
own_client_id: self.client_id as u16,
server_max_clients: 0,
});
}
/// Handles one in-order reliable packet. Returns false once we are gone.
fn handle(&mut self, typ: u16, b: &[u8]) -> bool {
if std::env::var_os("TS2_DEBUG").is_some() { eprintln!("in {typ:#06x} {:02x?}", &b[..b.len().min(96)]); }
match typ {
0x0006 => {
let n = u32_at(b, 0);
let mut at = 4;
for _ in 0..n {
let Some(c) = parse_channel(b, &mut at) else { break };
self.channels.insert(c.id, c);
}
}
0x0007 => {
let n = u32_at(b, 0) as usize;
for i in 0..n {
let o = 4 + i * 44;
if b.len() < o + 44 {
break;
}
let player = Player { channel: u32_at(b, o + 4), status: u16_at(b, o + 12), name: rpstr(b, o + 14) };
self.players.insert(u32_at(b, o), player);
}
self.lists_done = true;
}
0x0064 => {
let player = Player { channel: u32_at(b, 4), status: u16_at(b, 12), name: rpstr(b, 14) };
self.players.insert(u32_at(b, 0), player);
}
0x0065 | 0x0066 => {
let id = u32_at(b, 0);
if id == self.client_id {
let reason = if typ == 0x0066 { "kicked from the server" } else { "removed from the server" };
emit(&Event::Disconnected { reason: reason.into() });
return false;
}
self.players.remove(&id);
self.speakers.remove(&id);
}
0x0067 | 0x006d => {
if let Some(p) = self.players.get_mut(&u32_at(b, 0)) {
p.channel = u32_at(b, 8);
}
if u32_at(b, 0) == self.client_id {
self.encoder = None;
self.speakers.clear();
}
}
0x0068 => {
if let Some(p) = self.players.get_mut(&u32_at(b, 0)) {
p.status = u16_at(b, 4);
}
}
0x006e => {
let mut at = 4;
if let Some(c) = parse_channel(b, &mut at) {
self.channels.insert(c.id, c);
}
}
0x006f | 0x0070 => {
let mut at = 8;
let text = rcstr(b, &mut at);
if let Some(c) = self.channels.get_mut(&u32_at(b, 0)) {
if typ == 0x006f { c.name = text } else { c.topic = text }
}
}
0x0071 => {
if let Some(c) = self.channels.get_mut(&u32_at(b, 0)) {
c.flags = u16_at(b, 4) as u8;
c.codec = u16_at(b, 6);
}
self.encoder = None;
}
// Channel deleted: u16 channel id, then the deleting player's u32 id.
0x0073 => {
self.channels.remove(&(u16_at(b, 0) as u32));
}
0x0074 | 0x0075 => {
if let Some(c) = self.channels.get_mut(&u32_at(b, 0)) {
if typ == 0x0074 { c.max_users = u16_at(b, 4) } else { c.order = u16_at(b, 4) }
}
}
// The server refuses a command (seen for chat without the matching text permission).
// The server refuses a request: function code u16, then a u16 error code
// (seen: 0x012f channel switch into a channel that no longer exists).
0xff9a => emit(&Event::Error { message: format!("The TeamSpeak 2 server refused this (error {:#x}).", u16_at(b, 2)) }),
0xfc0f => emit(&Event::Error { message: "The TeamSpeak 2 server refused this: you lack the permission.".into() }),
0x0082 => {
let from = rpstr(b, 5);
let mut at = 35;
let message = rcstr(b, &mut at).trim_end().to_string();
let own_name = self.players.get(&self.client_id).map(|p| p.name.as_str());
match b.get(4) {
Some(0) => emit(&Event::ServerMessage { from, message }),
Some(2) => {
// TS2 names the sender only; nicknames are unique per server.
let partner_id = self.players.iter().find(|(_, p)| p.name == from).map_or(0, |(&id, _)| id as u16);
let from_self = own_name == Some(from.as_str());
emit(&Event::PrivateMessage { partner_id, partner_name: from, from_self, message });
}
Some(1) => emit(&Event::ChatMessage { from, message }),
// Kind 0xce: admin broadcast (tcpquery msg), with an empty sender field.
_ => emit(&Event::ServerMessage { from: String::new(), message }),
}
return true;
}
_ => return true,
}
self.snapshot();
true
}
fn on_voice(&mut self, b: &[u8]) {
let codec = b.get(3).copied().unwrap_or(0);
let Some(len) = SPEEX_BYTES.get(codec as usize).copied().filter(|&l| l > 0) else { return };
// Server voice: 16 bytes header, sender id @16, counter @20, then one
// codec-specific byte before the Speex data.
let Some(data) = b.get(23..23 + len) else { return };
let sender = u32_at(b, 16);
let speaker = self.speakers.entry(sender).or_insert_with(|| Speaker {
decoder: Decoder::new(),
queue: VecDeque::new(),
playing: false,
});
speaker.queue.extend(speaker.decoder.decode(data));
}
/// 20 ms tick: mix one frame from every buffered speaker, upsample 8 -> 48 kHz.
fn audio_tick(&mut self) {
let mut mix = [0i32; SPEEX_FRAME];
let mut talking = HashSet::new();
for (&id, s) in &mut self.speakers {
if !s.playing && s.queue.len() >= PREBUFFER {
s.playing = true;
}
if !s.playing {
continue;
}
if s.queue.len() < SPEEX_FRAME {
s.playing = false;
continue;
}
for m in mix.iter_mut() {
*m += s.queue.pop_front().unwrap_or(0) as i32;
}
talking.insert(id);
}
if talking != self.talking {
self.talking = talking;
emit(&Event::Talkers { clients: self.talking.iter().map(|&id| id as u16).collect() });
}
if self.talking.is_empty() {
return;
}
// ponytail: linear interpolation, swap for a proper resampler if it sounds dull.
let mut bytes = Vec::with_capacity(SPEEX_FRAME * 6 * 4);
for i in 0..SPEEX_FRAME {
let a = mix[i];
let b = mix.get(i + 1).copied().unwrap_or(a);
for k in 0..6 {
let v = (a + (b - a) * k / 6).clamp(i16::MIN as i32, i16::MAX as i32) as i16;
bytes.extend_from_slice(&v.to_le_bytes());
bytes.extend_from_slice(&v.to_le_bytes());
}
}
emit(&Event::AudioOut { pcm: base64::engine::general_purpose::STANDARD.encode(bytes) });
}
/// One 960-sample 48 kHz mono frame from the browser.
async fn on_mic(&mut self, b64: &str) -> Result<()> {
let Ok(raw) = base64::engine::general_purpose::STANDARD.decode(b64.trim()) else { return Ok(()) };
let codec = self.channels.get(&self.own_channel()).map_or(0, |c| c.codec) as u8;
if self.encoder.as_ref().is_none_or(|e| e.codec != codec) {
self.encoder = Encoder::new(codec);
if self.encoder.is_none() {
if !self.codec_warned {
self.codec_warned = true;
emit(&Event::Error {
message: format!("Sending voice in {} channels is not supported, only Speex.", codec_name(codec as u16)),
});
}
return Ok(());
}
}
if self.last_audio_in.is_none_or(|t| t.elapsed() > Duration::from_millis(200)) {
self.voice_conversation = self.voice_conversation.wrapping_add(1);
}
self.last_audio_in = Some(Instant::now());
// 48 -> 8 kHz by averaging each 6 samples, a cheap low-pass.
let mut frame = [0i16; SPEEX_FRAME];
for (i, chunk) in raw.chunks_exact(12).take(SPEEX_FRAME).enumerate() {
let sum: i32 = chunk.chunks_exact(2).map(|s| i16::from_le_bytes([s[0], s[1]]) as i32).sum();
frame[i] = (sum / 6) as i16;
}
let Some(data) = self.encoder.as_mut().and_then(|e| e.push(&mut frame)) else { return Ok(()) };
let mut p = Vec::with_capacity(17 + data.len());
p.extend_from_slice(&0xbef2u16.to_le_bytes());
p.push(0);
p.push(codec);
p.extend_from_slice(&self.session.to_le_bytes());
p.extend_from_slice(&self.client_id.to_le_bytes());
// Native client 2.0.32 order (captured): packet counter, then conversation id.
// Swapped, the native client sees every packet as a new conversation and stutters.
p.extend_from_slice(&self.voice_counter.to_le_bytes());
p.extend_from_slice(&self.voice_conversation.to_le_bytes());
// Native client sends 5 here too (frames per packet).
p.push(FRAMES_PER_PACKET as u8);
p.extend_from_slice(&data);
self.voice_counter = self.voice_counter.wrapping_add(1);
self.sock.send(&p).await?;
Ok(())
}
async fn on_datagram(&mut self, b: &[u8]) -> Result<bool> {
if b.len() < 16 {
return Ok(true);
}
match u16_at(b, 0) {
0xbef0 if b.len() >= 24 => {
let seq = u32_at(b, 12);
let mut ack = Vec::with_capacity(16);
ack.extend_from_slice(&0xbef1u16.to_le_bytes());
ack.extend_from_slice(&0u16.to_le_bytes());
ack.extend_from_slice(&self.session.to_le_bytes());
ack.extend_from_slice(&self.client_id.to_le_bytes());
ack.extend_from_slice(&seq.to_le_bytes());
self.sock.send(&ack).await?;
if seq >= self.next_in {
self.early.insert(seq, b.to_vec());
}
while let Some(p) = self.early.remove(&self.next_in) {
self.next_in += 1;
let typ = u16_at(&p, 2);
let fragment = u16_at(&p, 18);
// ponytail: assumes fragments count down to 0 on the last
// one; only seen unfragmented so far (small test server).
if fragment != 0 || !self.fragments.is_empty() {
if self.fragments.is_empty() {
self.fragment_type = typ;
}
self.fragments.extend_from_slice(&p[24..]);
if fragment != 0 {
continue;
}
let body = std::mem::take(&mut self.fragments);
if !self.handle(self.fragment_type, &body) {
return Ok(false);
}
} else if !self.handle(typ, &p[24..]) {
return Ok(false);
}
}
}
0xbef1 => {
let seq = u32_at(b, 12);
let front_seq = self.outbox.front().map(|p| u32_at(p, 12));
if front_seq == Some(seq) {
self.outbox.pop_front();
self.in_flight = None;
}
}
0xbef3 => self.on_voice(b),
_ => {}
}
Ok(true)
}
}
async fn login(sock: &UdpSocket, args: &Args) -> Result<Vec<u8>> {
let mut p = Vec::with_capacity(180);
p.extend_from_slice(&0xbef4u16.to_le_bytes());
p.extend_from_slice(&3u16.to_le_bytes());
p.extend_from_slice(&[0; 8]); // session, client id
p.extend_from_slice(&1u32.to_le_bytes());
p.extend_from_slice(&[0; 4]); // CRC
p.extend_from_slice(&pstr("TeamSpeak"));
p.extend_from_slice(&pstr("Linux"));
p.extend_from_slice(&[2, 0, 0, 0, 0x20, 0, 0x3c, 0, 1]);
// Registered login (2): account name + its password. Anonymous (1): no
// account name, the server password goes in the password field.
match &args.login_name {
Some(name) if !name.is_empty() => {
p.push(2);
p.extend_from_slice(&pstr(name));
p.extend_from_slice(&pstr(args.login_password.as_deref().unwrap_or("")));
}
_ => {
p.push(1);
p.extend_from_slice(&pstr(""));
p.extend_from_slice(&pstr(args.server_password.as_deref().unwrap_or("")));
}
}
p.extend_from_slice(&pstr(&args.nickname));
crc(&mut p, 16);
let mut buf = [0u8; 2048];
for _ in 0..5 {
sock.send(&p).await?;
let deadline = tokio::time::sleep(Duration::from_secs(2));
tokio::pin!(deadline);
loop {
tokio::select! {
r = sock.recv(&mut buf) => {
let n = r?;
if n >= 180 && u16_at(&buf, 0) == 0xbef4 && u16_at(&buf, 2) == 4 {
return Ok(buf[..n].to_vec());
}
}
_ = &mut deadline => break,
}
}
}
bail!("No answer from the TeamSpeak 2 server. Check the address and port (default 8767).")
}
pub(crate) async fn run(args: Args) -> Result<()> {
let target = if args.address.contains(':') { args.address.clone() } else { format!("{}:{DEFAULT_PORT}", args.address) };
let addr: SocketAddr = tokio::net::lookup_host(&target)
.await
.map_err(|e| anyhow!("Could not resolve \"{}\": {e}", args.address))?
.find(|a| a.is_ipv4())
.ok_or_else(|| anyhow!("\"{}\" has no IPv4 address", args.address))?;
if !tsclientlib::resolver::is_allowed_target(&addr.ip()) {
bail!(
"Could not connect to \"{}\": it points to a private/internal network address, \
which this gateway does not connect to. (Self-hosting admin? Set ALLOW_PRIVATE_TARGETS=1 for LAN servers.)",
args.address
);
}
let sock = UdpSocket::bind("0.0.0.0:0").await?;
sock.connect(addr).await?;
let reply = login(&sock, &args).await?;
if reply[89..92] != [0, 0, 0] {
bail!("The TeamSpeak 2 server rejected the login (wrong server password, wrong account name or password, or nickname not allowed).");
}
// Unlike the 30-byte fields, the welcome message's length byte can go up to 255.
let welcome_len = reply[180] as usize;
let welcome_message = latin1(&reply[181..(181 + welcome_len).min(reply.len())]);
emit(&Event::Connected {
welcome_message,
server_name: rpstr(&reply, 20),
server_max_clients: 0,
server_version: "TeamSpeak 2".into(),
server_license: String::new(),
server_license_id: 0,
server_banner_url: String::new(),
identity: String::new(),
});
let mut ts = Ts2 {
sock,
session: u32_at(&reply, 172),
client_id: u32_at(&reply, 176),
conn_counter: 2,
seq: 1,
outbox: VecDeque::new(),
in_flight: None,
next_in: 1,
early: BTreeMap::new(),
fragments: Vec::new(),
fragment_type: 0,
channels: BTreeMap::new(),
players: BTreeMap::new(),
lists_done: false,
speakers: HashMap::new(),
talking: HashSet::new(),
encoder: None,
voice_counter: 0,
voice_conversation: 0,
last_audio_in: None,
codec_warned: false,
};
// "Channel/Sub" picks a sub-channel; TS2 only nests one level deep.
let (channel, sub) = args.default_channel.as_deref().unwrap_or("").split_once('/').unwrap_or((args.default_channel.as_deref().unwrap_or(""), ""));
let mut part2 = vec![1, 0];
part2.extend_from_slice(&pstr(channel));
part2.extend_from_slice(&pstr(sub));
// The password field is only 26 bytes (length + 25), followed by the login reply's CRC.
let mut pw = pstr(args.channel_password.as_deref().unwrap_or(""));
pw[0] = pw[0].min(25);
part2.extend_from_slice(&pw[..26]);
part2.extend_from_slice(&reply[16..20]);
part2.extend_from_slice(&[0; 4]);
ts.reliable(0x0005, &part2);
let mut stdin = BufReader::new(tokio::io::stdin()).lines();
let mut keepalive = tokio::time::interval(KEEPALIVE_EVERY);
let mut audio = tokio::time::interval(Duration::from_millis(20));
let mut resend = tokio::time::interval(Duration::from_millis(100));
let mut last_heard = Instant::now();
let mut buf = [0u8; 4096];
loop {
ts.pump_outbox().await?;
tokio::select! {
r = ts.sock.recv(&mut buf) => {
let n = r?;
last_heard = Instant::now();
if !ts.on_datagram(&buf[..n]).await? {
return Ok(());
}
}
line = stdin.next_line() => {
let Some(l) = line? else {
ts.logout().await;
return Ok(());
};
let l = l.trim();
if l == "disconnect" || l.starts_with("disconnect ") {
ts.logout().await;
emit(&Event::Disconnected { reason: "client requested".into() });
return Ok(());
} else if let Some(rest) = l.strip_prefix("audio ") {
ts.on_mic(rest).await?;
} else if let Some(rest) = l.strip_prefix("switch ") {
let mut parts = rest.trim().splitn(2, ' ');
if let Ok(id) = parts.next().unwrap_or("").parse::<u32>() {
let password = parts
.next()
.and_then(|p| base64::engine::general_purpose::STANDARD.decode(p).ok())
.and_then(|b| String::from_utf8(b).ok())
.unwrap_or_default();
let mut p = id.to_le_bytes().to_vec();
p.extend_from_slice(&pstr(&password));
ts.reliable(0x012f, &p);
}
} else if let Some(message) = l.strip_prefix("chat ") {
let own = ts.own_channel();
ts.send_text(1, own, message);
} else if let Some(message) = l.strip_prefix("serverchat ") {
ts.send_text(0, 0, message);
} else if let Some((id, message)) = l.strip_prefix("pm ").and_then(|r| r.trim().split_once(' ')) {
if let Ok(id) = id.parse::<u32>() {
ts.send_text(2, id, message);
// TS2 doesn't echo private messages back to the sender.
let partner_name = ts.players.get(&id).map(|p| p.name.clone()).unwrap_or_default();
emit(&Event::PrivateMessage { partner_id: id as u16, partner_name, from_self: true, message: message.into() });
}
} else if l == "away" || l.starts_with("away ") {
ts.set_status(ST_AWAY, true);
} else if l == "unaway" {
ts.set_status(ST_AWAY, false);
} else if let Some(v) = l.strip_prefix("muteinput ") {
ts.set_status(ST_MUTE_MIC, v.trim() == "1");
} else if let Some(v) = l.strip_prefix("muteoutput ") {
ts.set_status(ST_MUTE_SPEAKERS, v.trim() == "1");
}
// Everything else (permissions, files, streams, ...) has no TS2 equivalent.
}
_ = keepalive.tick() => {
if last_heard.elapsed() > SERVER_TIMEOUT {
emit(&Event::Disconnected { reason: "connection to the TeamSpeak 2 server timed out".into() });
return Ok(());
}
ts.keepalive().await?;
}
_ = audio.tick() => ts.audio_tick(),
_ = resend.tick() => {}
}
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn crc_matches_zlib() {
assert_eq!(crc32(b"123456789"), 0xCBF4_3926);
}
#[test]
fn speex_sizes_match_submodes() {
// Encoding 5 frames must give exactly the size the server expects
// (checked by the debug_assert in Encoder::push).
for codec in 5..=12u8 {
let mut enc = Encoder::new(codec).unwrap();
let mut out = None;
for _ in 0..FRAMES_PER_PACKET {
out = enc.push(&mut [0; SPEEX_FRAME]);
}
let data = out.unwrap();
let mut dec = Decoder::new();
assert_eq!(dec.decode(&data).len(), SPEEX_FRAME * FRAMES_PER_PACKET);
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

+1 -2
View File
@@ -1,4 +1,4 @@
# TeaSpeak / GreenTeaSpeak support (WebSpeak3)
# TeaSpeak / VoySpeak (formerly GreenTeaSpeak) support (WebSpeak3)
WebSpeak3 can speak the TeamSpeak 3/6 protocol via `ts-connector` / `tsclientlib`.
TeaSpeak / GreenTeaSpeak servers need an extra identity handshake before `clientinit`.
@@ -12,7 +12,6 @@ TeaSpeak / GreenTeaSpeak servers need an extra identity handshake before `client
answers that way — required for GreenTeaSpeak hubs that disable TeamSpeak clients
- TEAMSPEAK identity handshake after crypto when needed
- DNS SRV `_gts._udp` in addition to `_ts3._udp`
- Design theme **GreenTeaSpeak** (third UI style)
Verified against `ts.greenteaspeak.de` (Official GreenTeaSpeak Public Server).
+33 -6
View File
@@ -13,7 +13,9 @@ import { logFeedback, logConnectionEvent } from "./activity-log.js";
import { clientIp, createRateLimiter } from "./net.js";
import "./telemetry.js";
const SERVER_TYPES = new Set<ServerType>(["teamspeak", "teaspeak", "auto"]);
// TeamSpeak 2 support is experimental and opt-in (ENABLE_TS2=1).
const TS2_ENABLED = process.env.ENABLE_TS2 === "1";
const SERVER_TYPES = new Set<ServerType>(["teamspeak", "teaspeak", "auto", ...(TS2_ENABLED ? (["ts2"] as const) : [])]);
function parseServerType(value: unknown): ServerType | undefined {
return typeof value === "string" && SERVER_TYPES.has(value as ServerType)
@@ -93,7 +95,9 @@ const ALLOWED_ORIGINS = (process.env.ALLOWED_ORIGINS ?? "")
// Each /ws socket can spawn a connector process holding a live TeamSpeak
// session, so both need a ceiling. 0 disables the respective limit.
const MAX_CONNECTIONS_PER_IP = Number(process.env.MAX_CONNECTIONS_PER_IP ?? 10);
const MAX_CONNECTIONS = Number(process.env.MAX_CONNECTIONS ?? 300);
// Measured 2026-10-25: ~8-9 % of a core per client listening to constant audio
// (connector + node + cloudflared), ~10-15 MB RAM. 60 suits a 2-core VPS.
const MAX_CONNECTIONS = Number(process.env.MAX_CONNECTIONS ?? 60);
const connectionsPerIp = new Map<string, number>();
// Every "connect" spawns a fresh connector, and a socket can send any number
// of them - without this, 10 sockets were enough to join-flood a TS server
@@ -122,7 +126,7 @@ const WEB_DIST = process.env.WEB_DIST ?? path.resolve(__dirname, "../../web/dist
const SERVE_STATIC = process.env.WEB_STATIC !== "0";
// Sent to every browser in the "hello" message on socket open; see there.
const GATEWAY_FEATURES = ["clientVolume", "keepalive", "chunkedUpload"];
const GATEWAY_FEATURES = ["clientVolume", "keepalive", "chunkedUpload", "whisperPolicy", "transferLimit", ...(TS2_ENABLED ? ["ts2"] : [])];
// Optional TURN relay for screen streams, also handed out in "hello". With
// TURN_SECRET (coturn's use-auth-secret) every socket gets its own credential,
@@ -155,6 +159,8 @@ const RUNTIME_CONFIG_META = Object.entries({
"webspeak3-default-server": process.env.DEFAULT_SERVER,
"webspeak3-default-channel": process.env.DEFAULT_CHANNEL,
"webspeak3-allowed-servers": SERVER_PICKER,
// Self-hosted account sync (sync-server.js); unset = the official one.
"webspeak3-sync-url": process.env.SYNC_URL,
})
.flatMap(([name, value]) =>
value ? [`<meta name="${name}" content="${value.replace(/[&"<>]/g, (c) => `&#${c.charCodeAt(0)};`)}">`] : [],
@@ -480,6 +486,13 @@ const requestHandler = (req: IncomingMessage, res: ServerResponse) => {
await handleFeedback(req, res);
return;
}
if (requestUrl.pathname === "/api/features") {
// Same list as the "hello" message, readable before any connect
// (the connect dialog offers TeamSpeak 2 only when it is enabled).
res.writeHead(200, { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*", "Cache-Control": "public, max-age=300" });
res.end(JSON.stringify({ features: GATEWAY_FEATURES }));
return;
}
if (requestUrl.pathname === "/api/news") {
handleNewsConfig(res);
return;
@@ -568,9 +581,6 @@ const wss = new WebSocketServer({
if (ALLOWED_ORIGINS.length > 0 && origin && !ALLOWED_ORIGINS.includes(origin.toLowerCase())) {
return done(false, 403, "Origin not allowed");
}
if (MAX_CONNECTIONS > 0 && wss.clients.size >= MAX_CONNECTIONS) {
return done(false, 503, "Gateway is full");
}
const ip = clientIp(req);
if (MAX_CONNECTIONS_PER_IP > 0 && (connectionsPerIp.get(ip) ?? 0) >= MAX_CONNECTIONS_PER_IP) {
return done(false, 429, "Too many connections");
@@ -677,6 +687,13 @@ wss.on("connection", (socket: WebSocket, req: IncomingMessage) => {
// multiple /ws connections in parallel (one per server tab).
let connection: Ts3Connection | undefined;
// Full: accept and say so, since a browser can't read why an upgrade was refused.
if (MAX_CONNECTIONS > 0 && wss.clients.size > MAX_CONNECTIONS) {
socket.send(JSON.stringify({ type: "error", code: "gateway_full", message: "This gateway is full right now. Please try again in a few minutes." }));
socket.close(1013, "Gateway is full");
return;
}
const ip = clientIp(req);
connectionsPerIp.set(ip, (connectionsPerIp.get(ip) ?? 0) + 1);
@@ -757,6 +774,8 @@ wss.on("connection", (socket: WebSocket, req: IncomingMessage) => {
identity: msg.identity,
serverType: parseServerType(msg.serverType),
privilegeKey: parsePrivilegeKey(msg),
loginName: typeof msg.loginName === "string" ? msg.loginName.trim() || undefined : undefined,
loginPassword: typeof msg.loginPassword === "string" ? msg.loginPassword || undefined : undefined,
};
connection = new Ts3Connection(options);
liveConnections.add(connection);
@@ -882,6 +901,10 @@ wss.on("connection", (socket: WebSocket, req: IncomingMessage) => {
await connection?.setNickname(msg.nickname);
break;
}
case "setWhisperPolicy": {
connection?.setWhisperPolicy(msg.block === true, Array.isArray(msg.exceptions) ? msg.exceptions : []);
break;
}
case "setWhisperTargets": {
await connection?.setWhisperTargets(msg.channelIds ?? [], msg.clientIds ?? []);
break;
@@ -1006,6 +1029,10 @@ wss.on("connection", (socket: WebSocket, req: IncomingMessage) => {
await connection?.downloadFile(msg.channelId, msg.path);
break;
}
case "setTransferLimit": {
connection?.setTransferLimit(msg.up, msg.down);
break;
}
case "uploadFile": {
await connection?.uploadFile(msg.channelId, msg.path, msg.dataBase64);
break;
+1 -1
View File
@@ -36,7 +36,7 @@ const STORE_SCREENSHOT_RE = /^data:image\/(png|jpe?g|webp);base64,[A-Za-z0-9+/]+
// grow unbounded from spam that slips past rate limiting (a fresh IP per
// submission, say). Bounds worst case to ~300 * 450KB =~ 135MB in RAM.
const STORE_MAX_THEMES = 300;
const STORE_BASE_THEMES = new Set(["standard", "nova", "greenteaspeak", "pulse", "ide"]);
const STORE_BASE_THEMES = new Set(["standard", "nova", "pulse", "ide"]);
// A handful of names (the operator's own) that only whoever holds
// STORE_ADMIN_TOKEN may publish under - stops anyone else from impersonating
+29
View File
@@ -0,0 +1,29 @@
// Standalone account sync server (Options -> Konto), same image as the gateway:
// node dist/sync-server.js (with SYNC_DATA_DIR set)
// Its own process so a restart never drops voice connections or the store.
import { createServer } from "node:http";
import { handleSync } from "./sync.js";
const PORT = Number(process.env.PORT ?? 8080);
createServer((req, res) => {
res.setHeader("X-Content-Type-Options", "nosniff");
const { pathname } = new URL(req.url ?? "/", "http://localhost");
if (pathname === "/healthz") {
res.writeHead(200, { "Content-Type": "text/plain; charset=utf-8" });
res.end("ok\n");
return;
}
if (pathname.startsWith("/api/sync/")) {
handleSync(req, res, pathname).catch((err) => {
console.error("[sync] Request failed:", err);
if (!res.headersSent) {
res.writeHead(500, { "Content-Type": "application/json" });
res.end(JSON.stringify({ error: "internal" }));
}
});
return;
}
res.writeHead(404, { "Content-Type": "application/json" });
res.end(JSON.stringify({ error: "not_found" }));
}).listen(PORT, () => console.log(`WebSpeak3 sync listening on http://localhost:${PORT}`));
+246
View File
@@ -0,0 +1,246 @@
// --- Account sync (Options -> Konto) --------------------------------------------
//
// Mullvad-style: no e-mail, no name. The client derives an account id, an AES key
// and an auth secret from a random account number (+ optional random password),
// so this server only ever holds id -> encrypted blob. It never sees the number,
// the password or the key. No IP addresses or request logs are kept.
//
// One JSON file per account in SYNC_DATA_DIR. Only served by sync-server.ts.
import type { IncomingMessage, ServerResponse } from "node:http";
import { createHash, createHmac, randomBytes, timingSafeEqual } from "node:crypto";
import { mkdir, readdir, readFile, rename, rm, writeFile } from "node:fs/promises";
import path from "node:path";
import { clientIp, createRateLimiter } from "./net.js";
const SYNC_DATA_DIR = process.env.SYNC_DATA_DIR;
const SYNC_ALLOWED_ORIGIN = process.env.SYNC_ALLOWED_ORIGIN ?? "*";
// Creating an account costs the browser a few seconds of hashing, so mass sign-ups
// get expensive without asking anyone for personal data.
// 15 bits = ~33k hashes on average, a few seconds on a phone.
const POW_BITS = Number(process.env.SYNC_POW_BITS ?? 15);
const MAX_ACCOUNTS = Number(process.env.SYNC_MAX_ACCOUNTS ?? 100_000);
// ~1 MB plaintext after base64 and AES-GCM overhead.
const MAX_DATA_LENGTH = 1_500_000;
const DAY_MS = 24 * 60 * 60 * 1000;
const EXPIRY_MS = 365 * DAY_MS;
const CHALLENGE_TTL_MS = 10 * 60 * 1000;
const isRateLimited = createRateLimiter(300, 60 * 60 * 1000);
const isCreateRateLimited = createRateLimiter(5, 60 * 60 * 1000);
// Fresh per process: a restart only invalidates challenges handed out in the last 10 minutes.
const challengeSecret = randomBytes(32);
const usedChallenges = new Map<string, number>();
interface Account {
authHash: string;
version: number;
hasPassword: boolean;
data: string;
updatedAt: number;
accessedAt: number;
}
const ID_RE = /^[0-9a-f]{64}$/;
const sha256 = (s: string) => createHash("sha256").update(s).digest("hex");
const file = (id: string) => path.join(SYNC_DATA_DIR!, `${id}.json`);
let accountCount = 0;
let ready: Promise<void> | null = null;
async function init() {
await mkdir(SYNC_DATA_DIR!, { recursive: true });
await sweep();
setInterval(() => void sweep().catch((err) => console.error("[sync] Sweep failed:", err)), DAY_MS).unref();
}
/** Accounts nobody opened for a year are deleted for good. */
async function sweep() {
const names = (await readdir(SYNC_DATA_DIR!)).filter((n) => n.endsWith(".json"));
let left = 0;
for (const name of names) {
const id = name.slice(0, -5);
const account = await load(id);
if (account && Date.now() - account.accessedAt > EXPIRY_MS) await rm(file(id), { force: true });
else left++;
}
accountCount = left;
}
async function load(id: string): Promise<Account | null> {
try {
return JSON.parse(await readFile(file(id), "utf-8")) as Account;
} catch (err) {
if ((err as NodeJS.ErrnoException).code === "ENOENT") return null;
throw err;
}
}
async function save(id: string, account: Account) {
const tmp = `${file(id)}.tmp`;
await writeFile(tmp, JSON.stringify(account), "utf-8");
await rename(tmp, file(id));
}
// Writes to one account run one after another, so the version check can't race.
const locks = new Map<string, Promise<unknown>>();
function locked<T>(id: string, fn: () => Promise<T>): Promise<T> {
const run = (locks.get(id) ?? Promise.resolve()).then(fn, fn);
const tail = run.catch(() => {});
locks.set(id, tail);
void tail.then(() => locks.get(id) === tail && locks.delete(id));
return run;
}
function authorized(req: IncomingMessage, account: Account): boolean {
const auth = /^Bearer ([0-9a-f]{64})$/.exec(req.headers.authorization ?? "")?.[1];
if (!auth) return false;
return timingSafeEqual(Buffer.from(sha256(auth)), Buffer.from(account.authHash));
}
function newChallenge(): string {
const body = `${Date.now()}.${randomBytes(16).toString("hex")}`;
return `${body}.${createHmac("sha256", challengeSecret).update(body).digest("hex")}`;
}
/** sha256(challenge + ":" + nonce) has to start with POW_BITS zero bits. */
export function leadingZeroBits(hex: string): number {
let bits = 0;
for (const c of hex) {
const n = parseInt(c, 16);
if (n === 0) {
bits += 4;
continue;
}
return bits + Math.clz32(n) - 28;
}
return bits;
}
function validPow(pow: unknown): boolean {
if (!pow || typeof pow !== "object") return false;
const { challenge, nonce } = pow as { challenge?: unknown; nonce?: unknown };
if (typeof challenge !== "string" || typeof nonce !== "string" || nonce.length > 32) return false;
const [ts, rand, mac] = challenge.split(".");
if (!ts || !rand || !mac) return false;
const expected = createHmac("sha256", challengeSecret).update(`${ts}.${rand}`).digest("hex");
if (mac.length !== expected.length || !timingSafeEqual(Buffer.from(mac), Buffer.from(expected))) return false;
const age = Date.now() - Number(ts);
if (!(age >= 0 && age < CHALLENGE_TTL_MS) || usedChallenges.has(challenge)) return false;
if (leadingZeroBits(sha256(`${challenge}:${nonce}`)) < POW_BITS) return false;
for (const [c, at] of usedChallenges) if (Date.now() - at > CHALLENGE_TTL_MS) usedChallenges.delete(c);
usedChallenges.set(challenge, Date.now());
return true;
}
function json(res: ServerResponse, status: number, body: unknown) {
res.writeHead(status, { "Content-Type": "application/json" });
res.end(JSON.stringify(body));
}
async function readBody(req: IncomingMessage, max: number): Promise<Record<string, unknown> | "too_large" | null> {
let raw = "";
for await (const chunk of req) {
raw += chunk;
if (raw.length > max) return "too_large";
}
try {
const body = JSON.parse(raw || "{}");
return body && typeof body === "object" ? body : null;
} catch {
return null;
}
}
export async function handleSync(req: IncomingMessage, res: ServerResponse, pathname: string) {
if (!SYNC_DATA_DIR) return json(res, 404, { error: "not_found" });
res.setHeader("Access-Control-Allow-Origin", SYNC_ALLOWED_ORIGIN);
res.setHeader("Access-Control-Allow-Methods", "GET, PUT, POST, DELETE, OPTIONS");
res.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization");
if (req.method === "OPTIONS") {
res.writeHead(204);
res.end();
return;
}
if (isRateLimited(clientIp(req))) return json(res, 429, { error: "rate_limited" });
ready ??= init();
await ready;
if (pathname === "/api/sync/challenge" && req.method === "POST") {
return json(res, 200, { challenge: newChallenge(), bits: POW_BITS });
}
const match = /^\/api\/sync\/([0-9a-f]{64})(\/meta)?$/.exec(pathname);
if (!match || !ID_RE.test(match[1])) return json(res, 404, { error: "not_found" });
const id = match[1];
// Tells a new device whether to ask for the password. Only someone holding the
// account number can compute the id in the first place.
if (match[2]) {
if (req.method !== "GET") return json(res, 405, { error: "method_not_allowed" });
const account = await load(id);
return json(res, 200, account ? { exists: true, hasPassword: account.hasPassword, version: account.version } : { exists: false });
}
if (req.method === "GET") {
const account = await load(id);
if (!account || !authorized(req, account)) return json(res, 404, { error: "not_found" });
// Touch at most once a day instead of rewriting the file on every read.
if (Date.now() - account.accessedAt > DAY_MS) {
await locked(id, async () => {
const fresh = await load(id);
if (fresh) await save(id, { ...fresh, accessedAt: Date.now() });
});
}
return json(res, 200, { version: account.version, data: account.data, updatedAt: account.updatedAt });
}
if (req.method === "DELETE") {
return locked(id, async () => {
const account = await load(id);
if (!account || !authorized(req, account)) return json(res, 404, { error: "not_found" });
await rm(file(id), { force: true });
accountCount--;
json(res, 200, { ok: true });
});
}
if (req.method !== "PUT") return json(res, 405, { error: "method_not_allowed" });
const body = await readBody(req, MAX_DATA_LENGTH + 2_000);
if (body === "too_large") return json(res, 413, { error: "payload_too_large" });
if (!body) return json(res, 400, { error: "invalid_json" });
const { version, data, hasPassword, newAuth, pow } = body;
if (typeof version !== "number" || typeof data !== "string" || !/^[A-Za-z0-9+/]+=*$/.test(data)) {
return json(res, 400, { error: "invalid_body" });
}
if (newAuth !== undefined && (typeof newAuth !== "string" || !ID_RE.test(newAuth))) {
return json(res, 400, { error: "invalid_body" });
}
return locked(id, async () => {
const account = await load(id);
const now = Date.now();
if (!account) {
// Creating: the bearer token becomes the account's auth secret.
const auth = /^Bearer ([0-9a-f]{64})$/.exec(req.headers.authorization ?? "")?.[1];
if (!auth || version !== 0) return json(res, 400, { error: "invalid_body" });
if (accountCount >= MAX_ACCOUNTS) return json(res, 507, { error: "full" });
if (isCreateRateLimited(clientIp(req))) return json(res, 429, { error: "rate_limited" });
if (!validPow(pow)) return json(res, 403, { error: "pow_required" });
await save(id, { authHash: sha256(auth), version: 1, hasPassword: hasPassword === true, data, updatedAt: now, accessedAt: now });
accountCount++;
return json(res, 200, { version: 1 });
}
if (!authorized(req, account)) return json(res, 404, { error: "not_found" });
// Another device wrote in between: the client decides what wins.
if (version !== account.version) return json(res, 409, { error: "conflict", version: account.version });
await save(id, {
authHash: typeof newAuth === "string" ? sha256(newAuth) : account.authHash,
version: account.version + 1,
hasPassword: typeof hasPassword === "boolean" ? hasPassword : account.hasPassword,
data,
updatedAt: now,
accessedAt: now,
});
json(res, 200, { version: account.version + 1 });
});
}
+22 -3
View File
@@ -153,10 +153,11 @@ export type Ts3ConnectionEvent =
| { type: "poke"; from: string; message: string }
| { type: "audioOut"; pcm: string }
| { type: "talkers"; clients: number[] }
| { type: "whisperReceived"; clientId: number }
| { type: "disconnected"; reason: string }
| { type: "reconnecting"; reason: string }
| { type: "reconnected" }
| { type: "error"; message: string }
| { type: "error"; message: string; cid?: number; path?: string }
| { type: "channelPasswordRequired"; channelId: number }
| ({ type: "serverLog" } & ServerLogEntry)
| {
@@ -212,7 +213,7 @@ export type Ts3ConnectionEvent =
/** TS6 Stream/Call signaling, forwarded verbatim; `args` is already unescaped. */
| { type: "streamEvent"; name: string; args: Record<string, string> };
export type ServerType = "teamspeak" | "teaspeak" | "auto";
export type ServerType = "teamspeak" | "teaspeak" | "auto" | "ts2";
export interface Ts3ConnectOptions {
host: string;
@@ -227,6 +228,9 @@ export interface Ts3ConnectOptions {
serverType?: ServerType;
/** One-time privilege key / token to redeem on connect. */
privilegeKey?: string;
/** TeamSpeak 2 registered account (anonymous when omitted). */
loginName?: string;
loginPassword?: string;
}
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -279,6 +283,8 @@ export class Ts3Connection {
if (this.options.channelPassword) env.TS_CHANNEL_PASSWORD = this.options.channelPassword;
if (this.options.identity) env.TS_IDENTITY = this.options.identity;
if (this.options.privilegeKey) env.TS_PRIVILEGE_KEY = this.options.privilegeKey;
if (this.options.loginName) env.TS_LOGIN_NAME = this.options.loginName;
if (this.options.loginPassword) env.TS_LOGIN_PASSWORD = this.options.loginPassword;
this.child = spawn(CONNECTOR_BIN, args, { env });
// The connector can exit on its own (e.g. the TS3 server drops it) and close
@@ -363,10 +369,11 @@ export class Ts3Connection {
| { type: "poke"; from: string; message: string }
| { type: "audioOut"; pcm: string }
| { type: "talkers"; clients: number[] }
| { type: "whisperReceived"; clientId: number }
| { type: "disconnected"; reason: string }
| { type: "reconnecting"; reason: string }
| { type: "reconnected" }
| { type: "error"; message: string }
| { type: "error"; message: string; cid?: number; path?: string }
| { type: "channelPasswordRequired"; channel_id: number }
| ({ type: "serverLog" } & ServerLogEntry)
| {
@@ -959,6 +966,18 @@ export class Ts3Connection {
if (sanitized) this.writeLine(`nickname ${sanitized}`);
}
/** Incoming whispers: allowed or blocked by default; `exceptions` (client ids) get the opposite. */
setWhisperPolicy(block: boolean, exceptions: unknown[]): void {
const ids = exceptions.map(Number).filter(Number.isInteger);
this.writeLine(`whisperpolicy ${block ? "block" : "allow"};${ids.join(",")}`);
}
/** File transfer bandwidth caps in bytes/s, 0 = unlimited. */
setTransferLimit(up: unknown, down: unknown): void {
const rate = (v: unknown) => Math.max(0, Math.floor(Number(v) || 0));
this.writeLine(`ftlimit ${rate(up)} ${rate(down)}`);
}
/** Empty channelIds/clientIds clears whisper mode, returning outgoing
* voice to the normal current-channel broadcast. */
async setWhisperTargets(channelIds: number[], clientIds: number[]): Promise<void> {
+7
View File
@@ -10,6 +10,7 @@
"dependencies": {
"@ennuicastr/webrtcaec3.js": "^0.3.0",
"fflate": "^0.8.3",
"qrcode-generator": "^1.4.4",
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
@@ -5266,6 +5267,12 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/qrcode-generator": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-1.4.4.tgz",
"integrity": "sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw==",
"license": "MIT"
},
"node_modules/react": {
"version": "19.2.8",
"resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz",
+1
View File
@@ -14,6 +14,7 @@
"dependencies": {
"@ennuicastr/webrtcaec3.js": "^0.3.0",
"fflate": "^0.8.3",
"qrcode-generator": "^1.4.4",
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
+1277 -3
View File
File diff suppressed because it is too large. Load diff
+2668 -246
View File
File diff suppressed because it is too large. Load diff
+72
View File
@@ -0,0 +1,72 @@
import { useT } from "./i18n";
export type ConnectionTabItem = {
id: string;
label: string;
connected?: boolean;
connecting?: boolean;
};
/** Server tab strip for multi-join: one tab per open connection. */
export function ConnectionTabs({
tabs,
activeTabId,
onSelectTab,
onCloseTab,
}: {
tabs: ConnectionTabItem[];
activeTabId?: string | null;
onSelectTab?: (id: string) => void;
onCloseTab?: (id: string) => void;
}) {
const t = useT();
return (
<div
className="gts-connection-tabs"
role="tablist"
aria-label={t("tabs.connections")}
>
{tabs.map((tab) => {
const isActive = tab.id === (activeTabId ?? tabs[0]?.id);
return (
<div
key={tab.id}
role="tab"
aria-selected={isActive}
className={`gts-connection-tab${isActive ? " gts-connection-tab-active" : ""}${
tab.connecting ? " gts-connection-tab-connecting" : ""
}`}
onClick={() => onSelectTab?.(tab.id)}
tabIndex={0}
aria-keyshortcuts={onCloseTab ? "Delete" : undefined}
onKeyDown={(e) => {
if (e.target !== e.currentTarget) return;
// The × below is mouse-only (a button can't sit inside a tab); Delete closes.
if (e.key === "Delete" && onCloseTab) onCloseTab(tab.id);
else if (e.key === "Enter" || e.key === " ")
onSelectTab?.(tab.id);
else return;
e.preventDefault();
}}
title={tab.label}
>
<span className="gts-connection-tab-label">{tab.label}</span>
{onCloseTab ? (
<span
className="gts-connection-tab-close"
aria-hidden="true"
title={t("tabs.disconnect")}
onClick={(e) => {
e.stopPropagation();
onCloseTab(tab.id);
}}
>
×
</span>
) : null}
</div>
);
})}
</div>
);
}
+84
View File
@@ -0,0 +1,84 @@
/** Options -> Chat ("Chat Fenster", "Automatisch protokollieren", ...). */
export interface ChatSettings {
/** Lines kept per chat tab. */
maxLines: number;
/** "" = the design's font. */
fontFamily: string;
/** px, 0 = the design's size. */
fontSize: number;
logChannel: boolean;
logPrivate: boolean;
logServer: boolean;
/** Prefill a new channel chat / private chat with this many logged lines (0 = off). */
restoreChannelLines: number;
restorePrivateLines: number;
notifyServer: boolean;
notifyChannel: boolean;
notifyPrivate: boolean;
}
export const DEFAULT_CHAT_SETTINGS: ChatSettings = {
maxLines: 500,
fontFamily: "",
fontSize: 0,
logChannel: true,
logPrivate: true,
logServer: true,
restoreChannelLines: 100,
restorePrivateLines: 100,
notifyServer: false,
notifyChannel: true,
notifyPrivate: true,
};
const SETTINGS_KEY = "webspeak3:chat-settings";
export function loadChatSettings(): ChatSettings {
try {
return { ...DEFAULT_CHAT_SETTINGS, ...JSON.parse(localStorage.getItem(SETTINGS_KEY) ?? "{}") };
} catch {
return DEFAULT_CHAT_SETTINGS;
}
}
export function saveChatSettings(settings: ChatSettings): void {
localStorage.setItem(SETTINGS_KEY, JSON.stringify(settings));
}
export interface LoggedLine {
from: string;
message: string;
self?: boolean;
at: number;
}
// ponytail: localStorage, 1000 lines per chat. Move to IndexedDB if logs outgrow the ~5 MB quota.
const MAX_LOGGED = 1000;
/** kind: "channel" | "server" | "pm:<uid>" */
const logKey = (server: string, kind: string) => `webspeak3:chatlog:${server.trim().toLowerCase()}:${kind}`;
export function readChatLog(server: string, kind: string, lines: number): LoggedLine[] {
if (!lines) return [];
try {
const all: LoggedLine[] = JSON.parse(localStorage.getItem(logKey(server, kind)) ?? "[]");
return all.slice(-lines);
} catch {
return [];
}
}
export function appendChatLog(server: string, kind: string, line: Omit<LoggedLine, "at">): void {
try {
const all = readChatLog(server, kind, MAX_LOGGED);
all.push({ ...line, at: Date.now() });
localStorage.setItem(logKey(server, kind), JSON.stringify(all.slice(-MAX_LOGGED)));
} catch {
// Quota full: logging is best effort.
}
}
/** Keeps the newest `max` entries. */
export function capLines<T>(lines: T[], max: number): T[] {
return lines.length > max ? lines.slice(-max) : lines;
}
+130
View File
@@ -0,0 +1,130 @@
/** Options -> Download (TS3's "Downloads" page). */
export interface DownloadSettings {
/** "dir": save into the picked folder (browser default when none); "ask": save dialog every time. */
saveMode: "dir" | "ask";
showWindowOnStart: boolean;
closeWindowWhenDone: boolean;
popupWhenDone: boolean;
/** KiB/s, 0 = unlimited. */
uploadLimit: number;
downloadLimit: number;
maxUploads: number;
maxDownloads: number;
}
export const DEFAULT_DOWNLOAD_SETTINGS: DownloadSettings = {
saveMode: "dir",
showWindowOnStart: true,
closeWindowWhenDone: false,
popupWhenDone: true,
uploadLimit: 0,
downloadLimit: 0,
maxUploads: 2,
maxDownloads: 2,
};
const SETTINGS_KEY = "webspeak3:download-settings";
export function loadDownloadSettings(): DownloadSettings {
try {
return { ...DEFAULT_DOWNLOAD_SETTINGS, ...JSON.parse(localStorage.getItem(SETTINGS_KEY) ?? "{}") };
} catch {
return DEFAULT_DOWNLOAD_SETTINGS;
}
}
export function saveDownloadSettings(settings: DownloadSettings): void {
localStorage.setItem(SETTINGS_KEY, JSON.stringify(settings));
}
// File System Access API: Chromium only. Elsewhere downloads go wherever the browser puts them.
type PickerWindow = Window & {
showDirectoryPicker?: (options?: { mode?: "readwrite" }) => Promise<FileSystemDirectoryHandle>;
showSaveFilePicker?: (options?: { suggestedName?: string }) => Promise<FileSystemFileHandle>;
};
type PermissionHandle = FileSystemHandle & {
queryPermission?: (d: { mode: "readwrite" }) => Promise<PermissionState>;
requestPermission?: (d: { mode: "readwrite" }) => Promise<PermissionState>;
};
export const canPickFolder = typeof (window as PickerWindow).showDirectoryPicker === "function";
// A directory handle survives reloads only in IndexedDB (it can't be JSON'd).
function withStore<T>(mode: IDBTransactionMode, run: (store: IDBObjectStore) => IDBRequest<T>): Promise<T> {
return new Promise((resolve, reject) => {
const open = indexedDB.open("webspeak3-downloads", 1);
open.onupgradeneeded = () => open.result.createObjectStore("handles");
open.onerror = () => reject(open.error);
open.onsuccess = () => {
const req = run(open.result.transaction("handles", mode).objectStore("handles"));
req.onsuccess = () => resolve(req.result);
req.onerror = () => reject(req.error);
};
});
}
export async function loadDownloadDir(): Promise<FileSystemDirectoryHandle | null> {
if (!canPickFolder) return null;
try {
return (await withStore("readonly", (s) => s.get("dir"))) ?? null;
} catch {
return null;
}
}
/** Opens the folder picker; null when cancelled. */
export async function pickDownloadDir(): Promise<FileSystemDirectoryHandle | null> {
try {
const dir = await (window as PickerWindow).showDirectoryPicker!({ mode: "readwrite" });
await withStore("readwrite", (s) => s.put(dir, "dir"));
return dir;
} catch {
return null;
}
}
export async function clearDownloadDir(): Promise<void> {
await withStore("readwrite", (s) => s.delete("dir")).catch(() => {});
}
/** Where a finished download goes; resolved at click time, while the user gesture
* still lets us show a save dialog or ask for folder permission. null = browser default. */
export type SaveTarget = FileSystemFileHandle | null;
export async function resolveSaveTarget(
settings: DownloadSettings,
dir: FileSystemDirectoryHandle | null,
filename: string
): Promise<SaveTarget | "cancelled"> {
const w = window as PickerWindow;
if (settings.saveMode === "ask" && w.showSaveFilePicker) {
try {
return await w.showSaveFilePicker({ suggestedName: filename });
} catch {
return "cancelled";
}
}
if (!dir) return null;
const handle = dir as PermissionHandle;
try {
if ((await handle.queryPermission?.({ mode: "readwrite" })) !== "granted" &&
(await handle.requestPermission?.({ mode: "readwrite" })) !== "granted")
return null;
return await dir.getFileHandle(filename, { create: true });
} catch {
return null;
}
}
/** Writes into the chosen file; false means fall back to a normal browser download. */
export async function writeToTarget(target: SaveTarget, blob: Blob): Promise<boolean> {
if (!target) return false;
try {
const writable = await target.createWritable();
await writable.write(blob);
await writable.close();
return true;
} catch {
return false;
}
}
+6 -3
View File
@@ -5,8 +5,9 @@ import en from "./locales/en.json";
import zhCN from "./locales/zh-CN.json";
import fa from "./locales/fa.json";
import csCZ from "./locales/cs-CZ.json";
import ru from "./locales/ru.json";
export type Lang = "de" | "en" | "zh-CN" | "fa" | "cs-CZ";
export type Lang = "de" | "en" | "zh-CN" | "fa" | "cs-CZ" | "ru";
const RTL_LANGS = new Set<Lang>(["fa"]);
export type LangPref = "auto" | Lang;
@@ -16,7 +17,7 @@ const LANGUAGE_KEY = "webspeak3:language";
// user-facing string in the app should have an entry in every file - falls
// back to the English string (or the raw key) if a translation is missing,
// so a partial dictionary never blanks out the UI. Plain JSON (not inline
// TS objects) so translation tools like Weblate can read/write these files
// TS objects) so translation tools can read/write these files
// directly.
const translations: Record<Lang, Record<string, string>> = {
de,
@@ -24,6 +25,7 @@ const translations: Record<Lang, Record<string, string>> = {
"zh-CN": zhCN,
fa,
"cs-CZ": csCZ,
ru,
};
function detectSystemLang(): Lang {
@@ -32,6 +34,7 @@ function detectSystemLang(): Lang {
if (normalized.startsWith("zh")) return "zh-CN";
if (normalized.startsWith("fa")) return "fa";
if (normalized.startsWith("cs")) return "cs-CZ";
if (normalized.startsWith("ru")) return "ru";
return normalized.startsWith("de") ? "de" : "en";
}
@@ -41,7 +44,7 @@ export function resolveLang(pref: LangPref): Lang {
export function loadLangPref(): LangPref {
const raw = localStorage.getItem(LANGUAGE_KEY);
return raw === "de" || raw === "en" || raw === "zh-CN" || raw === "fa" || raw === "cs-CZ" || raw === "auto" ? raw : "auto";
return raw === "de" || raw === "en" || raw === "zh-CN" || raw === "fa" || raw === "cs-CZ" || raw === "ru" || raw === "auto" ? raw : "auto";
}
export function saveLangPref(pref: LangPref) {
+126
View File
@@ -0,0 +1,126 @@
import { unzipSync } from "fflate";
/** Icons an icon pack can replace. Each element that shows one carries
* data-pack-icon="<id>"; iconPackCss() swaps its default for the pack's image. */
export type PackIconId =
| "talkIdle"
| "talking"
| "micMuted"
| "hardwareMicMuted"
| "soundMuted"
| "away"
| "commanderIdle"
| "commanderTalking"
| "channel"
| "server";
/** TS3 icon pack file names (gfx/<pack>/16x16_<name>.png or <name>.svg). */
const TS3_NAMES: Record<PackIconId, string> = {
talkIdle: "player_off",
talking: "player_on",
micMuted: "input_muted",
hardwareMicMuted: "hardware_input_muted",
soundMuted: "output_muted",
away: "away",
commanderIdle: "player_commander_off",
commanderTalking: "player_commander_on",
channel: "channel_green",
server: "server_green",
};
const MIME_BY_EXTENSION: Record<string, string> = {
svg: "image/svg+xml",
png: "image/png",
gif: "image/gif",
jpg: "image/jpeg",
jpeg: "image/jpeg",
webp: "image/webp",
};
export interface IconPack {
id: string;
name: string;
/** data: URLs */
icons: Partial<Record<PackIconId, string>>;
}
const PACKS_KEY = "webspeak3:icon-packs";
const SELECTED_KEY = "webspeak3:icon-pack";
export function loadIconPacks(): IconPack[] {
try {
const parsed = JSON.parse(localStorage.getItem(PACKS_KEY) ?? "[]");
return Array.isArray(parsed) ? parsed : [];
} catch {
return [];
}
}
/** Throws when localStorage is full (a pack with huge images). */
export function saveIconPacks(packs: IconPack[]): void {
localStorage.setItem(PACKS_KEY, JSON.stringify(packs));
}
export function loadSelectedIconPack(): string {
return localStorage.getItem(SELECTED_KEY) ?? "";
}
export function saveSelectedIconPack(id: string): void {
localStorage.setItem(SELECTED_KEY, id);
}
function toDataUrl(data: Uint8Array, mime: string): string {
let binary = "";
for (let i = 0; i < data.length; i += 0x8000) binary += String.fromCharCode(...data.subarray(i, i + 0x8000));
return `data:${mime};base64,${btoa(binary)}`;
}
/** Reads a .ts3_iconpack (a zip) or any zip of images named like TS3's icons.
* Returns null when nothing in it matches a known icon. */
export async function parseIconPack(file: File): Promise<IconPack | null> {
const entries = unzipSync(new Uint8Array(await file.arrayBuffer()), {
filter: (entry) => (entry.name.split(".").pop()?.toLowerCase() ?? "") in MIME_BY_EXTENSION,
});
const byStem = new Map<string, { data: Uint8Array; ext: string }>();
for (const [path, data] of Object.entries(entries)) {
const base = path.slice(path.lastIndexOf("/") + 1).toLowerCase();
const ext = base.slice(base.lastIndexOf(".") + 1);
const stem = base.slice(0, base.lastIndexOf(".")).replace(/^\d+x\d+_/, "");
// Several sizes of the same icon: an SVG beats any PNG, else the largest file.
const prev = byStem.get(stem);
if (!prev || (ext === "svg" && prev.ext !== "svg") || (prev.ext !== "svg" && data.length > prev.data.length))
byStem.set(stem, { data, ext });
}
const icons: IconPack["icons"] = {};
for (const [id, name] of Object.entries(TS3_NAMES) as [PackIconId, string][]) {
const hit = byStem.get(name);
if (hit) icons[id] = toDataUrl(hit.data, MIME_BY_EXTENSION[hit.ext]);
}
if (Object.keys(icons).length === 0) return null;
return {
id: `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`,
name: file.name.replace(/\.(ts3_iconpack|zip)$/i, ""),
icons,
};
}
export function iconPackCss(pack: IconPack | undefined): string {
if (!pack) return "";
return Object.entries(pack.icons)
.map(
([id, url]) => `.ts-app [data-pack-icon="${id}"] {
background: url("${url}") center / contain no-repeat !important;
border: 0 !important;
border-radius: 0 !important;
box-shadow: none !important;
color: transparent !important;
display: inline-block !important;
width: 16px !important;
height: 16px !important;
overflow: hidden;
vertical-align: middle;
}
.ts-app [data-pack-icon="${id}"] > *, .ts-app [data-pack-icon="${id}"]::after { visibility: hidden !important; }`
)
.join("\n");
}
+112
View File
@@ -0,0 +1,112 @@
// Computes a TeamSpeak client UID from a stored identity, so the Identitäten dialog
// can show it without connecting. UID = base64(sha1(base64(tomcrypt public key DER))),
// same as tsproto's EccKeyPubP256::get_uid. Accepts what an identity blob can be:
// tsclientlib's JSON ({"key": base64 scalar}), a native "<counter>V<obfuscated>" string,
// or a plain base64 tomcrypt key. Needs crypto.subtle, so null on plain-http origins.
const OBFUSCATION = new TextEncoder().encode(
"b9dfaa7bee6ac57ac7b65f1094a1c155e747327bc2fe5d51c512023fe54a280201004e90ad1daaae1075d53b7d571c30e063b5a62a4a017bb394833aa0983e6e"
);
const unb64 = (s: string) => Uint8Array.from(atob(s), (c) => c.charCodeAt(0));
const b64 = (bytes: Uint8Array) => btoa(String.fromCharCode(...bytes));
const sha1 = async (data: Uint8Array) => new Uint8Array(await crypto.subtle.digest("SHA-1", data as BufferSource));
/** One DER element at pos -> [tag, content, end]. */
function derRead(buf: Uint8Array, pos: number): [number, Uint8Array, number] {
let len = buf[pos + 1];
let start = pos + 2;
if (len & 0x80) {
const n = len & 0x7f;
len = 0;
for (let i = 0; i < n; i++) len = (len << 8) | buf[start + i];
start += n;
}
if (start + len > buf.length) throw new Error("bad der");
return [buf[pos], buf.subarray(start, start + len), start + len];
}
/** Top-level DER sequence -> its elements as [tag, content]. */
function derSequence(der: Uint8Array): [number, Uint8Array][] {
const [tag, body] = derRead(der, 0);
if (tag !== 0x30) throw new Error("no sequence");
const items: [number, Uint8Array][] = [];
for (let pos = 0; pos < body.length; ) {
const [t, content, end] = derRead(body, pos);
items.push([t, content]);
pos = end;
}
return items;
}
function derLength(n: number): number[] {
return n < 0x80 ? [n] : [0x81, n];
}
/** DER INTEGER content for an unsigned big-endian number. */
function derUint(bytes: Uint8Array): Uint8Array {
let i = 0;
while (i < bytes.length - 1 && bytes[i] === 0) i++;
const trimmed = bytes.subarray(i);
return trimmed[0] & 0x80 ? Uint8Array.of(0, ...trimmed) : trimmed;
}
async function uidFromPoint(x: Uint8Array, y: Uint8Array): Promise<string> {
const parts = [
[0x03, 0x02, 0x07, 0x00], // BIT STRING: 1 bit, 0 = public key only
[0x02, 0x01, 0x20], // INTEGER 32
[0x02, ...derLength(x.length), ...x],
[0x02, ...derLength(y.length), ...y],
].flat();
const der = Uint8Array.of(0x30, ...derLength(parts.length), ...parts);
return b64(await sha1(new TextEncoder().encode(b64(der))));
}
/** Public point from a bare P-256 scalar, via a PKCS#8 import without public key. */
async function uidFromScalar(scalar: Uint8Array): Promise<string> {
const d = new Uint8Array(32);
d.set(scalar.subarray(Math.max(0, scalar.length - 32)), 32 - Math.min(32, scalar.length));
const pkcs8 = Uint8Array.of(
...[0x30, 0x41, 0x02, 0x01, 0x00, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01],
...[0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x04, 0x27, 0x30, 0x25, 0x02, 0x01, 0x01, 0x04, 0x20],
...d
);
const key = await crypto.subtle.importKey("pkcs8", pkcs8, { name: "ECDSA", namedCurve: "P-256" }, true, ["sign"]);
const jwk = await crypto.subtle.exportKey("jwk", key);
const fromUrl = (s: string) => unb64(s.replace(/-/g, "+").replace(/_/g, "/").padEnd(Math.ceil(s.length / 4) * 4, "="));
return uidFromPoint(derUint(fromUrl(jwk.x!)), derUint(fromUrl(jwk.y!)));
}
/** tomcrypt private key DER (with or without the public point, like tsproto's from_tomcrypt). */
async function uidFromTomcrypt(der: Uint8Array): Promise<string> {
const items = derSequence(der);
const [bitTag, bits] = items[0];
if (bitTag !== 0x03) throw new Error("no bit string");
// TS3AudioBot keys set two bits and leave out the public point.
const withPoint = bits[0] === 0x07;
if (withPoint) return uidFromPoint(items[2][1], items[3][1]);
return uidFromScalar(items[2][1]);
}
async function deobfuscate(data: Uint8Array): Promise<Uint8Array> {
const out = data.slice();
let end = out.indexOf(0, 20);
if (end < 0) end = out.length;
const hash = await sha1(out.subarray(20, end));
for (let i = 0; i < 20; i++) out[i] ^= hash[i];
for (let i = 0; i < Math.min(out.length, 100); i++) out[i] ^= OBFUSCATION[i];
return out;
}
export async function identityUid(blob: string): Promise<string | null> {
if (!crypto.subtle) return null;
try {
const text = blob.trim().replace(/^"|"$/g, "");
if (text.startsWith("{")) return await uidFromScalar(unb64(JSON.parse(text).key));
const native = /^\d+V(.+)$/.exec(text);
const tomcrypt = native ? atob(new TextDecoder().decode(await deobfuscate(unb64(native[1])))) : atob(text);
return await uidFromTomcrypt(Uint8Array.from(tomcrypt, (c) => c.charCodeAt(0)));
} catch {
return null;
}
}
+4 -1
View File
@@ -1,4 +1,5 @@
import { Fragment, type ReactNode } from "react";
import { StillImg } from "./still";
// TeamSpeak chat text -> React elements (never HTML strings, so message text
// can't inject markup). Understands the TS3/TS6 BBCode tags plus the basic
@@ -44,6 +45,8 @@ interface Node {
export interface RenderOptions {
/** Load [img] / ![](...) inline. Off: they render as links, so no remote host sees the reader's IP. */
images?: boolean;
/** GIF animation off: show only the first frame of inline images. */
stillImages?: boolean;
}
function emphasis(s: string): string {
@@ -263,7 +266,7 @@ function render(node: Node, key: number, opts: RenderOptions): ReactNode {
const label = textOf(node);
if (!href) return <span key={key}>{label}</span>;
if (node.tag === "img" && opts.images)
return link(href, <img className="ts-bb-img" src={href} alt="" loading="lazy" referrerPolicy="no-referrer" />, key);
return link(href, <StillImg still={!!opts.stillImages} className="ts-bb-img" src={href} alt="" loading="lazy" referrerPolicy="no-referrer" />, key);
return link(href, label, key);
}
default:
+55
View File
@@ -0,0 +1,55 @@
import { useEffect, useState, type ImgHTMLAttributes } from "react";
const stills = new Map<string, string | null>();
/** Options -> Sicherheit -> "Cache löschen". */
export function clearStillCache(): void {
stills.clear();
}
/** First frame of an (animated) image as a PNG data URL, or null when the
* browser won't let us read it (cross-origin image without CORS). */
function freeze(src: string): Promise<string | null> {
return new Promise((resolve) => {
const img = new Image();
img.crossOrigin = "anonymous";
img.referrerPolicy = "no-referrer";
img.onload = () => {
try {
const canvas = document.createElement("canvas");
canvas.width = img.naturalWidth;
canvas.height = img.naturalHeight;
canvas.getContext("2d")!.drawImage(img, 0, 0);
resolve(canvas.toDataURL());
} catch {
resolve(null);
}
};
img.onerror = () => resolve(null);
img.src = src;
});
}
/** <img> that shows only the first frame when `still` is set (GIF animation off).
* Falls back to the original image when it can't be frozen. */
export function StillImg({ still, src, ...rest }: ImgHTMLAttributes<HTMLImageElement> & { still: boolean; src: string }) {
const [frozen, setFrozen] = useState(() => (still ? stills.get(src) : undefined));
useEffect(() => {
if (!still) return;
if (stills.has(src)) {
setFrozen(stills.get(src));
return;
}
let live = true;
void freeze(src).then((url) => {
stills.set(src, url);
if (live) setFrozen(url);
});
return () => {
live = false;
};
}, [src, still]);
// While freezing, render nothing rather than letting the animation start.
if (still && frozen === undefined) return null;
return <img src={still && frozen ? frozen : src} {...rest} />;
}
+319 -7
View File
@@ -19,7 +19,7 @@
"menu.help.about": "O WebSpeak3",
"menu.help.github": "GitHub",
"menu.help.changelog": "Seznam změn",
"menu.help.translate": "Pomozte s překladem (Weblate)",
"menu.help.translate": "Pomozte s překladem (GitHub)",
"menu.extras.identities": "Identity",
"menu.extras.contacts": "Kontakty",
"menu.extras.collectedUrls": "Shromážděné URL",
@@ -70,7 +70,7 @@
"restartNotice.ack": "Rozumím",
"menu.extras.tos": "Podmínky používání",
"tos.title": "Podmínky používání pro client.webspeak3.de",
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/GreenTeaSpeak servers via browser.",
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/VoySpeak servers via browser.",
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting service, and circumventing bans.",
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to relevant authorities.",
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see",
@@ -125,6 +125,9 @@
"connect.serverType.auto": "Automaticky",
"connect.serverType.teamspeak": "TeamSpeak",
"connect.serverType.teaspeak": "TeaSpeak",
"connect.serverType.ts2": "TeamSpeak 2 (experimentální)",
"connect.ts2LoginName": "Název účtu TS2 (prázdné = anonymně):",
"connect.ts2LoginPassword": "Heslo účtu TS2:",
"connect.hotkeyProfile": "Profil klávesových zkratek:",
"connect.soundPack": "Balíček zvuků:",
"connect.more": "Více",
@@ -149,6 +152,7 @@
"inviteFriend.type": "Typ pozvánky",
"inviteFriend.includeChannel": "Vložit aktuální kanál",
"inviteFriend.link": "Odkaz",
"inviteFriend.webspeak3Link": "Odkaz WebSpeak3",
"inviteFriend.addPermissionKey": "Přidat klíč oprávnění",
"inviteFriend.copyToClipboard": "Kopírovat do schránky",
"inviteFriend.copied": "Zkopírováno!",
@@ -165,6 +169,17 @@
"whisperHistory.title": "Historie šeptání – {server}",
"whisperHistory.empty": "Zatím žádná historie šeptání.",
"whisperHistory.started": "Šeptání pro: {targets}",
"whisperSettings.subtitle": "Nastavení šeptání",
"whisperSettings.rights": "Oprávnění pro příchozí šeptání",
"whisperSettings.mode.allow": "Použít nastavení kontaktů, jinak povolit",
"whisperSettings.mode.block": "Použít nastavení kontaktů, jinak zakázat",
"whisperSettings.mode.blockAll": "Zakázat vše",
"whisperSettings.incoming": "Nastavení příchozího šeptání",
"whisperSettings.sound": "Přehrát zvuk, když vám někdo šeptá",
"whisperSettings.openHistory": "Vždy otevřít historii šeptání, když vám někdo šeptá",
"whisperSettings.clearAfter": "Odebrat klienty z historie šeptání po",
"whisperSettings.minutes": "minut",
"whisperHistory.received": "{name} vám šeptal(a)",
"whisperHistory.stopped": "Šeptání zastaveno",
"whisperHistory.clear": "Vymazat",
"whisperHistory.options": "Možnosti",
@@ -241,6 +256,10 @@
"contacts.category.blocked": "Blokovaný",
"contacts.category.friend": "Přítel",
"contacts.phoneticName": "Fonetické jméno:",
"contacts.whisperSetting": "Šeptání:",
"contacts.whisperSetting.default": "Výchozí",
"contacts.whisperSetting.allow": "Povolit",
"contacts.whisperSetting.block": "Zakázat",
"contacts.show": "Zobrazit",
"contacts.ignore": "Ignorovat",
"contacts.unignore": "Přestat ignorovat",
@@ -273,6 +292,7 @@
"options.cancel": "Zrušit",
"options.notImplemented": "Toto nastavení zatím není implementováno.",
"options.section.anwendung": "Aplikace",
"options.section.konto": "Účet",
"options.section.wiedergabe": "Přehrávání",
"options.section.aufnahme": "Snímání",
"options.section.design": "Vzhled",
@@ -281,13 +301,38 @@
"design.theme.standard.desc": "Původní vzhled WebSpeak3.",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "Modernější tmavý vzhled se zaoblenými prvky.",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "Klasické rozvržení klienta GreenTeaSpeak s tmavými panely a zlatou lištou nabídky.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "Rozvržení založené na kartách s navigační lištou a barevným zvýrazněním.",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "Technické, ploché rozvržení ve stylu IDE pro pokročilé uživatele.",
"design.idePixelFont": "Pixelové terminálové písmo",
"design.theme": "Motiv",
"design.customThemes": "Vlastní motivy",
"design.iconPack": "Balíček ikon",
"design.manage": "Spravovat motivy a ikony…",
"design.manage.title": "Správa motivů a ikon",
"design.iconPack.none": "Zatím není nainstalován žádný balíček ikon.",
"design.iconPack.import": "Importovat balíček ikon",
"design.iconPack.importError": "Tento soubor nelze načíst jako balíček ikon.",
"design.iconPack.deleteConfirm": "Opravdu smazat tento balíček ikon?",
"design.iconPack.hint": "Balíčky ikon TeamSpeak 3 (.ts3_iconpack) nebo ZIP se stejně pojmenovanými obrázky. Nahrazuje kontrolky mluvení, ztlumený mikrofon/zvuk, nepřítomnost, velitele kanálu, kanál a server.",
"design.notAvailable": "Ve webovém klientovi zatím není k dispozici",
"design.gif": "Podpora animací GIF",
"design.gif.avatars": "Povolit animaci avatarů",
"design.gif.images": "Povolit animaci obrázků",
"design.tree": "Strom kanálů",
"design.tree.expandAll": "Při připojení rozbalit všechny kanály",
"design.tree.expandDepth": "Rozbalit kanály do této úrovně (0 = vše)",
"design.tree.expandOwn": "Při připojení rozbalit jen vlastní kanál",
"design.tree.clientsBelow": "Řadit klienty pod kanály",
"design.tree.flags": "Zobrazit vlajky klientů",
"design.tree.overwolf": "Zobrazit ikony Overwolf",
"design.tree.badges": "Zobrazit odznaky",
"design.tree.groupIconsInMenus": "Zobrazit ikony skupin v kontextových nabídkách",
"design.tree.hideInaccessibleGroups": "Skrýt nepřístupné skupiny v kontextových nabídkách",
"design.tree.commanderLamp": "Zobrazit velitele kanálu jako kontrolku",
"design.tree.awayMessage": "Zobrazit zprávu nepřítomnosti vedle přezdívky",
"design.tree.tooltips": "Zobrazit nápovědu při najetí myší",
"design.status.connected": "Připojeno",
"design.custom.new": "+ Nový vzhled",
"design.custom.import": "Importovat vzhled",
@@ -345,6 +390,19 @@
"options.section.sounds": "Zvuky",
"app.title": "Aplikace",
"app.subtitle": "Obecná nastavení aplikace",
"app.group.server": "Server",
"app.group.misc": "Různé",
"app.group.subscribe": "Chování odběru kanálů",
"app.group.privacy": "Soukromí",
"app.micOnServerSwitch": "Při přepnutí serveru automaticky zapnout mikrofon",
"app.reconnectAfterSleep": "Znovu připojit po režimu spánku",
"app.middleClickQuickAccess": "Prostřední tlačítko myši jako rychlý přístup ve stromu",
"app.updateFavoriteNickname": "Automaticky aktualizovat přezdívku v oblíbených",
"app.autoOpenChannelChat": "Automaticky otevírat chaty kanálů",
"app.mutedTalkingSound": "Přehrát zvuk, když mluvíš se ztlumeným mikrofonem",
"app.neverShowPokeDialog": "Nikdy nezobrazovat dialog šťouchnutí",
"app.subscribe.all": "Odebírat všechny kanály",
"app.subscribe.current": "Odebírat jen aktuální a dříve odebírané kanály",
"app.language": "Jazyk",
"app.language.auto": "Výchozí systému",
"app.language.de": "Němčina",
@@ -352,7 +410,8 @@
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "Missing your language or spotted wrong translation? Help out on Weblate →",
"app.language.ru": "Русский (бета)",
"app.language.helpTranslate": "Chybí váš jazyk nebo jste našli chybu v překladu? Takto můžete pomoct →",
"app.serverBanner": "Zobrazovat bannery serveru",
"app.serverBanner.hint": "Banner se načítá přímo z adresy nastavené administrátorem serveru a tento hostitel vidí vaši IP adresu.",
"app.chatImages": "Načítat obrázky v chatu",
@@ -434,10 +493,13 @@
"publish.alphaTitle": "Alfa – nestabilní, může se kdykoli změnit nebo přestat fungovat",
"publish.demoUnavailable": "Streamování není v demu dostupné – vyžaduje skutečný server TeamSpeak 6.",
"publish.alphaNote": "Streamování je ve fázi alfa. Používá nezdokumentovaný protokol Stream/Call služby TeamSpeak 6, takže připojení, kvalita obrazu i práce s diváky mohou selhat nebo se bez upozornění změnit. Není určeno pro produkční použití.",
"publish.start": "Sdílet obrazovku",
"publish.start": "Sdílet obrazovku nebo kameru",
"publish.stop": "Zastavit sdílení",
"publish.title": "Vaše vysílání",
"publish.screen": "Obrazovka",
"publish.camera": "Kamera",
"publish.kind": "Sdílet",
"publish.kind.display": "Obrazovka / okno",
"publish.starting": "Spouštění…",
"publish.viewers": "Sleduje {count} diváků",
"publish.request.allow": "Povolit",
@@ -452,6 +514,7 @@
"publish.preset": "Předvolba",
"publish.preset.presentation": "Prezentace",
"publish.audio": "Snímat zvuk",
"publish.audio.cameraHint": "U kamery jde tvůj zvuk jako obvykle přes mikrofon.",
"publish.privacy": "Soukromí",
"publish.privacy.public": "Veřejné",
"publish.privacy.contacts": "Kontakty",
@@ -654,6 +717,7 @@
"serverContext.addFavorite": "Přidat do oblíbených",
"serverContext.disconnect": "Odpojit",
"connectError.dismiss": "Zavřít",
"connectError.gatewayFull": "Brána je právě plná. Zkus to za pár minut znovu – nebo si WebSpeak3 hostuj sám: github.com/WebSpeak3/webspeak3",
"dialog.close": "Zavřít",
"sounds.title": "Zvuky",
"sounds.subtitle": "Nastavit zvuková upozornění na události",
@@ -667,6 +731,9 @@
"sounds.event.message": "Přijata zpráva",
"sounds.event.poke": "Přijato šťouchnutí",
"sounds.event.mute": "Přepnutí ztlumení",
"sounds.event.micClickOn": "Kliknutí mikrofonu zap.",
"sounds.event.micClickOff": "Kliknutí mikrofonu vyp.",
"sounds.event.whisper": "Přijato šeptání",
"sounds.default": "Výchozí",
"sounds.custom": "Vlastní soubor: {name}",
"sounds.test": "▶ Test",
@@ -697,5 +764,250 @@
"about.text": "WebSpeak3 je TeamSpeak klient pro prohlížeč, open source a bez instalace.",
"about.memorial.title": "Na památku Akima",
"about.memorial.text": "Odešel přes duhový most 21. 10. 2026. 🌈🐾",
"about.close": "Zavřít"
"about.close": "Zavřít",
"menu.extras.fileTransfers": "Přenosy souborů",
"transfers.title": "Přenosy souborů",
"transfers.empty": "Žádné přenosy.",
"transfers.up": "Nahrávání",
"transfers.down": "Stahování",
"transfers.status.queued": "Čeká",
"transfers.status.running": "Probíhá",
"transfers.status.done": "Hotovo",
"transfers.status.error": "Selhalo",
"transfers.clearFinished": "Odstranit dokončené",
"transfers.finished": "Přenos dokončen: {name}",
"downloadSettings.subtitle": "Nastavení stahování",
"downloadSettings.directory": "Složka pro stahování",
"downloadSettings.directoryLabel": "Složka pro stažené soubory:",
"downloadSettings.browserDefault": "Výchozí prohlížeče",
"downloadSettings.change": "Změnit",
"downloadSettings.reset": "Obnovit",
"downloadSettings.alwaysDir": "Vždy ukládat do této složky",
"downloadSettings.askEachTime": "Pokaždé se ptát na složku",
"downloadSettings.unsupported": "Tento prohlížeč neumí vybrat složku; soubory se ukládají do složky stahování prohlížeče.",
"downloadSettings.interface": "Rozhraní",
"downloadSettings.showWindowOnStart": "Zobrazit okno přenosů při zahájení stahování",
"downloadSettings.closeWindowWhenDone": "Zavřít okno přenosů po dokončení všech stahování",
"downloadSettings.popupWhenDone": "Zobrazit oznámení po dokončení přenosu",
"downloadSettings.uploadLimit": "Šířka pásma pro nahrávání",
"downloadSettings.downloadLimit": "Šířka pásma pro stahování",
"downloadSettings.maxUploads": "Souběžná nahrávání",
"downloadSettings.maxDownloads": "Souběžná stahování",
"downloadSettings.unlimited": "Neomezovat",
"downloadSettings.limitedTo": "Omezit na",
"chatSettings.subtitle": "Nastavení chatu",
"chatSettings.window": "Okno chatu",
"chatSettings.maxLines": "Maximální počet řádků:",
"chatSettings.font": "Písmo:",
"chatSettings.fontDefault": "Výchozí",
"chatSettings.fontReset": "Obnovit písmo",
"chatSettings.fontPreview": "Takto vypadá chat s tímto písmem.",
"chatSettings.autoLog": "Automatické protokolování",
"chatSettings.logChannel": "Protokolovat chaty kanálu",
"chatSettings.logPrivate": "Protokolovat soukromé chaty",
"chatSettings.logServer": "Protokolovat chaty serveru",
"chatSettings.logHint": "Protokoly se ukládají jen v tomto prohlížeči (posledních 1000 řádků na chat).",
"chatSettings.restore": "Načíst protokoly",
"chatSettings.restoreChannelLines": "Načíst protokoly chatu kanálu",
"chatSettings.restorePrivateLines": "Načíst protokoly soukromých chatů",
"chatSettings.notify": "Upozornění na příchozí zprávy",
"chatSettings.notifyServer": "Server",
"chatSettings.notifyChannel": "Kanál",
"chatSettings.notifyPrivate": "Soukromé",
"chatSettings.linesUnit": "řádků",
"chatSettings.last": "posledních",
"securitySettings.subtitle": "Nastavení zabezpečení",
"securitySettings.passwords": "Hesla",
"securitySettings.saveChannelPasswords": "Ukládat hesla kanálů",
"securitySettings.clearChannelPasswords": "Smazat hesla kanálů",
"securitySettings.channelPasswordsCleared": "Uložená hesla kanálů byla smazána.",
"securitySettings.masterPassword": "Použít hlavní heslo",
"securitySettings.changeMasterPassword": "Změnit hlavní heslo",
"securitySettings.cleanup": "Úklid",
"securitySettings.clearCacheOnExit": "Vyprázdnit mezipaměť při ukončení",
"securitySettings.clearUrlsOnExit": "Smazat URL při ukončení",
"securitySettings.clearCache": "Vyprázdnit mezipaměť",
"securitySettings.cacheCleared": "Mezipaměť vyprázdněna.",
"securitySettings.identities": "Identity",
"securitySettings.manageIdentities": "Spravovat identity",
"notify.connection": "Připojení",
"notify.connected": "Připojeno k serveru",
"notify.disconnected": "Odpojeno od serveru",
"notify.lostConnection": "Ztraceno spojení se serverem",
"notify.channel": "Kanál",
"notify.created": "Vytvořen",
"notify.deleted": "Smazán",
"notify.edited": "Upraven",
"notify.moved": "Přesunut",
"notify.currentChannel": "Aktuální kanál",
"notify.otherChannel": "Jiný kanál",
"notify.byYou": "Vámi",
"notify.byOther": "Jiným klientem",
"notify.server": "Server",
"notify.insufficientPermissions": "Nedostatečná oprávnění",
"notify.error": "Chyba",
"notify.client": "Klient",
"notify.switched": "Změnil kanál",
"notify.movedClient": "Přesunut",
"notify.kickedChannel": "Vyhozen z kanálu",
"notify.kickedServer": "Vyhozen ze serveru",
"notify.banned": "Zabanován",
"notify.toCurrent": "Do aktuálního kanálu",
"notify.fromCurrent": "Z aktuálního kanálu",
"notify.toOther": "Do jiného kanálu",
"notify.appears": "Objeví se",
"notify.stays": "Zůstane viditelný",
"notify.disappears": "Zmizí",
"notify.serverGroup": "Serverová skupina",
"notify.channelGroup": "Změněna skupina kanálu",
"notify.added": "Přidána",
"notify.removed": "Odebrána",
"notify.byServer": "Serverem",
"notify.byUser": "Uživatelem",
"notify.recording": "Nahrávání",
"notify.recordingStart": "Nahrávání zahájeno",
"notify.recordingStop": "Nahrávání ukončeno",
"notify.recordingInChannel": "Nahrávání v kanálu aktivní",
"notify.talkPowerRequested": "Požádal o právo mluvit",
"notify.self": "Já",
"notify.youSwitched": "Změna kanálu",
"notify.youMoved": "Přesunut do jiného kanálu",
"notify.youKickedServer": "Vyhozen ze serveru",
"notify.youKickedChannel": "Vyhozen z kanálu",
"notify.youBanned": "Zabanován",
"notify.talkPowerGranted": "Uděleno právo mluvit",
"notify.talkPowerRevoked": "Odebráno právo mluvit",
"notify.chat": "Chat",
"notify.messageSent": "Zpráva odeslána",
"notify.messageReceived": "Zpráva přijata",
"notify.capture": "Záznam zvuku",
"notify.playback": "Přehrávání zvuku",
"notify.muted": "Ztlumeno",
"notify.unmuted": "Zapnuto",
"notify.status": "Stav",
"notify.away": "Nepřítomen",
"notify.present": "Zpět",
"notify.other": "Ostatní",
"notify.poked": "Šťouchnutí",
"notify.transferComplete": "Přenos souboru dokončen",
"notify.transferFailed": "Přenos souboru selhal",
"notify.whisperListEmpty": "Seznam šeptání je prázdný",
"notify.whisperTargetNotFound": "Cíl šeptání nenalezen",
"notify.whisperTooMany": "Příliš mnoho cílů šeptání",
"notify.special": "Speciální",
"notify.micClickOtherOn": "Klik mikrofonu ostatní zap.",
"notify.micClickOtherOff": "Klik mikrofonu ostatní vyp.",
"notify.micClickSelfOn": "Klik mikrofonu vlastní zap.",
"notify.micClickSelfOff": "Klik mikrofonu vlastní vyp.",
"notify.whisperNotify": "Upozornění na šeptání",
"notify.soundTest": "Test zvuku",
"notify.test3d": "3D test",
"notify.talkingWhileMuted": "Mluvení při ztlumení",
"notify.subtitle": "Nastavení upozornění",
"notify.soundPack": "Zvukový balíček:",
"notify.pack.builtin": "WebSpeak3 výchozí",
"notify.pack.none": "Bez zvuků",
"notify.importPack": "Importovat zvukový balíček TS3 (.ts3_soundpack / .zip)",
"notify.deletePack": "Smazat zvukový balíček",
"notify.deletePackConfirm": "Smazat zvukový balíček \"{name}\"?",
"notify.importFailed": "Toto není platný zvukový balíček TS3 (chybí settings.ini).",
"notify.whenMuted": "Při ztlumeném výstupu:",
"notify.whenMuted.all": "Přehrávat všechny zvuky",
"notify.whenMuted.none": "Nepřehrávat žádné zvuky",
"notify.hintBefore": "Poznámka: zvukový balíček lze přepsat pro každého ",
"notify.hintLink": "oblíbeného",
"notify.hintAfter": ".",
"notify.col.action": "Akce",
"notify.col.script": "Zvukový skript",
"notify.col.text": "Pozice textu",
"notify.text.server": "Server",
"notify.text.channel": "Kanál",
"notify.resetAll": "Obnovit všechny změny",
"notify.applyToFavorites": "Použít tento zvukový balíček pro všechny oblíbené",
"notify.applyToFavoritesConfirm": "Nastavit všem oblíbeným tento zvukový balíček? Vlastní balíčky jednotlivých oblíbených budou zrušeny.",
"notify.whenMuted.important": "Přehrávat jen důležité zvuky",
"notify.text.client": "Klient",
"vault.title": "Hlavní heslo",
"vault.prompt": "Vaše identity a uložená hesla jsou zašifrovány. Zadejte hlavní heslo.",
"vault.unlock": "Odemknout",
"vault.wrong": "Špatné heslo.",
"vault.forgot": "Zapomenuté heslo",
"vault.forgotConfirm": "Bez hesla nelze data obnovit. Trvale smazat identity, oblíbené a uložená hesla a začít znovu?",
"securitySettings.masterHint": "Šifruje identity, oblíbené (s hesly) a uložená hesla kanálů. Vyžaduje se po každém načtení.",
"securitySettings.masterCurrent": "Současné hlavní heslo",
"securitySettings.masterNew": "Nové hlavní heslo",
"securitySettings.masterRepeat": "Zopakovat",
"securitySettings.masterMismatch": "Hesla se neshodují.",
"securitySettings.masterNote": "Budete ho muset zadat znovu v každé nové relaci (po obnovení stránky nebo v nové kartě). Dobře si ho zapamatujte: bez něj přijdete o identity a uložená hesla.",
"sync.subtitle": "Tvá data na všech zařízeních",
"sync.intro": "Účet je jen náhodné číslo, volitelně s heslem. Žádný e-mail, žádné jméno. Vše se před nahráním zašifruje na tvém zařízení. Server vidí jen nečitelná data.",
"sync.create.title": "Nový účet",
"sync.create.withPassword": "Vygenerovat i náhodné heslo (doporučeno)",
"sync.create.withPasswordHint": "Bez hesla stačí k tvým datům samotné číslo účtu.",
"sync.create.button": "Vytvořit účet",
"sync.create.busy": "Účet se vytváří …",
"sync.login.title": "Existující účet",
"sync.number": "Číslo účtu",
"sync.password": "Heslo",
"sync.passwordOptional": "Heslo (pokud existuje)",
"sync.login.hint": "Data účtu pak nahradí data na tomto zařízení.",
"sync.login.button": "Přihlásit",
"sync.server": "Synchronizační server",
"sync.serverDefault": "Výchozí (oficiální server WebSpeak3)",
"sync.serverHint": "Nech prázdné pro oficiální server. Účet existuje jen na serveru, na kterém byl vytvořen.",
"sync.account.title": "Tvůj účet",
"sync.copy": "Kopírovat",
"sync.copied": "Zkopírováno",
"sync.show": "Zobrazit",
"sync.hide": "Skrýt",
"sync.noPassword": "Bez hesla",
"sync.keepSafe": "Číslo a heslo dobře uschovej. Když je ztratíš, nikdo tvá data neobnoví, ani my.",
"sync.recoveryFile": "Stáhnout soubor pro obnovení",
"sync.qr.show": "Zobrazit QR kód",
"sync.qr.hide": "Skrýt QR kód",
"sync.qr.hint": "Naskenuj ho druhým zařízením a přihlas se tam. Kdo kód uvidí, má přístup k tvému účtu.",
"sync.password.add": "Přidat heslo",
"sync.password.remove": "Odebrat heslo",
"sync.password.addConfirm": "Vygenerovat nové náhodné heslo? Ostatní zařízení se pak musí znovu přihlásit číslem a heslem.",
"sync.password.removeConfirm": "Odebrat heslo? Pak bude stačit samotné číslo účtu. Ostatní zařízení se musí znovu přihlásit.",
"sync.categories": "Synchronizovat",
"sync.category.identities": "Identity (včetně soukromých klíčů)",
"sync.category.favorites": "Oblíbené, hesla kanálů a kontakty",
"sync.category.settings": "Nastavení",
"sync.category.designs": "Vzhledy a balíčky ikon",
"sync.category.whisper": "Seznamy šeptání",
"sync.categoriesHint": "Zvuková zařízení, hlasitosti, klávesa PTT a záznamy chatu zůstávají vždy na zařízení.",
"sync.status": "Stav",
"sync.status.syncing": "Synchronizuje se …",
"sync.status.last": "Naposledy synchronizováno: {time}",
"sync.status.never": "Zatím nesynchronizováno",
"sync.conflict.title": "Synchronizace",
"sync.conflict.text": "Od poslední synchronizace se změnilo něco na tomto zařízení i v účtu. Který stav má platit?",
"sync.conflict.local": "Nahrát stav tohoto zařízení",
"sync.conflict.server": "Načíst stav z účtu",
"sync.syncNow": "Synchronizovat teď",
"sync.serverInfo": "Server: {server}",
"sync.logout": "Odhlásit",
"sync.logoutConfirm": "Odhlásit toto zařízení z účtu? Účet i data zůstanou zachovány.",
"sync.delete": "Smazat účet",
"sync.deleteConfirm": "Trvale smazat účet a všechna jeho data na serveru? Data na tomto zařízení zůstanou.",
"sync.link.title": "Připojit k účtu",
"sync.link.prompt": "Připojit toto zařízení k účtu {number}? Data účtu nahradí data na tomto zařízení.",
"sync.link.connect": "Připojit",
"sync.error.password_required": "Tento účet má heslo.",
"sync.error.unreachable": "Synchronizační server není dostupný.",
"sync.error.not_found": "Účet nenalezen nebo špatné heslo. Pokud bylo heslo změněno na jiném zařízení, přihlas se znovu.",
"sync.error.rate_limited": "Příliš mnoho požadavků, zkus to později.",
"sync.error.full": "Synchronizační server teď nepřijímá nové účty.",
"sync.error.pow_required": "Bezpečnostní kontrola selhala, zkus to znovu.",
"sync.error.conflict": "Jiné zařízení mezitím něco změnilo.",
"sync.error.payload_too_large": "Příliš mnoho dat pro synchronizaci (max. 1 MB).",
"sync.error.generic": "Synchronizace selhala.",
"mobile.tab.channels": "Kanály",
"mobile.tab.chat": "Chat",
"mobile.tab.info": "Info",
"mobile.mic": "Mikrofon",
"mobile.sound": "Zvuk",
"mobile.leave": "Odpojit",
"mobile.talk": "Mluvit"
}
+320 -8
View File
@@ -19,7 +19,7 @@
"menu.help.about": "Über WebSpeak3",
"menu.help.github": "GitHub",
"menu.help.changelog": "Changelog",
"menu.help.translate": "Mitübersetzen (Weblate)",
"menu.help.translate": "Mitübersetzen (GitHub)",
"menu.extras.identities": "Identitäten",
"menu.extras.contacts": "Kontakte",
"menu.extras.collectedUrls": "Gesammelte URLs",
@@ -71,7 +71,7 @@
"restartNotice.ack": "Verstanden",
"menu.extras.tos": "Nutzungsbedingungen",
"tos.title": "Nutzungsbedingungen für client.webspeak3.de",
"tos.rule1": "Dieser Client dient der privaten, nicht-kommerziellen Nutzung von TeamSpeak-/TeaSpeak-/GreenTeaSpeak-Servern über den Browser.",
"tos.rule1": "Dieser Client dient der privaten, nicht-kommerziellen Nutzung von TeamSpeak-/TeaSpeak-/VoySpeak-Servern über den Browser.",
"tos.rule2": "Verboten sind insbesondere: Straftaten jeder Art, Belästigung und Hassrede, Spam und Flooding, Störung des Dienstes sowie die Umgehung von Sperren.",
"tos.rule3": "Bei Verstößen kann der Zugang ohne Vorwarnung gesperrt werden; schwerwiegende Fälle werden ggf. an die zuständigen Behörden gemeldet.",
"tos.rule4Pre": "Zur Betriebssicherheit und Missbrauchserkennung werden Verbindungen protokolliert (Serveradresse, Servername, Zeitpunkt) und nach 90 Tagen automatisch gelöscht – siehe ",
@@ -125,6 +125,9 @@
"connect.serverType.auto": "Auto",
"connect.serverType.teamspeak": "TeamSpeak",
"connect.serverType.teaspeak": "TeaSpeak",
"connect.serverType.ts2": "TeamSpeak 2 (experimentell)",
"connect.ts2LoginName": "TS2-Kontoname (leer = anonym):",
"connect.ts2LoginPassword": "TS2-Kontopasswort:",
"connect.hotkeyProfile": "Hotkeyprofil:",
"connect.soundPack": "Sound Pack:",
"connect.more": "Mehr",
@@ -149,6 +152,7 @@
"inviteFriend.type": "Art der Einladung",
"inviteFriend.includeChannel": "Aktuellen Channel einfügen",
"inviteFriend.link": "Link",
"inviteFriend.webspeak3Link": "WebSpeak3-Link",
"inviteFriend.addPermissionKey": "Berechtigungsschlüssel hinzufügen",
"inviteFriend.copyToClipboard": "In Zwischenablage kopieren",
"inviteFriend.copied": "Kopiert!",
@@ -165,6 +169,17 @@
"whisperHistory.title": "Whisper Verlauf - {server}",
"whisperHistory.empty": "Kein Whisper-Verlauf vorhanden.",
"whisperHistory.started": "Whispern an: {targets}",
"whisperSettings.subtitle": "Whispereinstellungen",
"whisperSettings.rights": "Rechte für eingehende Whisper",
"whisperSettings.mode.allow": "Individuelle Einstellungen in Kontakten benutzen, ansonsten erlauben",
"whisperSettings.mode.block": "Individuelle Einstellungen in Kontakten benutzen, ansonsten verbieten",
"whisperSettings.mode.blockAll": "Alle verbieten",
"whisperSettings.incoming": "Einstellungen für eingehende Whisper",
"whisperSettings.sound": "Sound abspielen, wenn Sie angewhispert werden",
"whisperSettings.openHistory": "Whisper Verlauf immer öffnen, wenn Sie angewhispert werden",
"whisperSettings.clearAfter": "Clients in Whisper Verlauf löschen nach",
"whisperSettings.minutes": "Minuten",
"whisperHistory.received": "{name} hat dir zugewhispert",
"whisperHistory.stopped": "Whispern beendet",
"whisperHistory.clear": "Löschen",
"whisperHistory.options": "Optionen",
@@ -241,6 +256,10 @@
"contacts.category.blocked": "Blockiert",
"contacts.category.friend": "Freund",
"contacts.phoneticName": "Phonetischer Name:",
"contacts.whisperSetting": "Whisper:",
"contacts.whisperSetting.default": "Standard",
"contacts.whisperSetting.allow": "Erlauben",
"contacts.whisperSetting.block": "Verbieten",
"contacts.show": "Anzeige",
"contacts.ignore": "Ignorieren",
"contacts.unignore": "Nicht mehr ignorieren",
@@ -273,6 +292,7 @@
"options.cancel": "Abbrechen",
"options.notImplemented": "Diese Einstellungen sind noch nicht implementiert.",
"options.section.anwendung": "Anwendung",
"options.section.konto": "Konto",
"options.section.wiedergabe": "Wiedergabe",
"options.section.aufnahme": "Aufnahme",
"options.section.design": "Design",
@@ -281,13 +301,38 @@
"design.theme.standard.desc": "Das originale WebSpeak3-Design.",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "Moderneres, dunkles Design mit abgerundeten Elementen.",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "Klassisches GreenTeaSpeak-Client-Layout mit dunklen Panels und goldener Menüleiste.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "Karten-Layout mit Breadcrumb-Leiste und farbigem Akzent.",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "Technisches, flaches Layout im IDE-Stil für Power-User.",
"design.idePixelFont": "Pixel-Terminal-Schrift",
"design.theme": "Thema",
"design.customThemes": "Eigene Designs",
"design.iconPack": "Icon Pack",
"design.manage": "Designs & Icons verwalten…",
"design.manage.title": "Designs & Icons verwalten",
"design.iconPack.none": "Noch kein Icon Pack installiert.",
"design.iconPack.import": "Icon Pack importieren",
"design.iconPack.importError": "Diese Datei konnte nicht als Icon Pack gelesen werden.",
"design.iconPack.deleteConfirm": "Dieses Icon Pack wirklich löschen?",
"design.iconPack.hint": "TeamSpeak-3-Icon-Packs (.ts3_iconpack) oder ZIPs mit gleich benannten Bildern. Ersetzt werden Sprechlampen, Mikro/Ton aus, Abwesend, Channel Commander, Channel und Server.",
"design.notAvailable": "Im Webclient noch nicht verfügbar",
"design.gif": "Unterstützung für GIF Animation",
"design.gif.avatars": "Avatar Animation aktivieren",
"design.gif.images": "Bilder Animation aktivieren",
"design.tree": "Channel Baum",
"design.tree.expandAll": "Beim Anmelden alle Channel aufklappen",
"design.tree.expandDepth": "Channel bis zu dieser Ebene aufklappen (0 = alle)",
"design.tree.expandOwn": "Eigenen Channel bei der Anmeldung ausklappen",
"design.tree.clientsBelow": "Clients unter Channel sortieren",
"design.tree.flags": "Flaggen für Clients anzeigen",
"design.tree.overwolf": "Overwolf Icons anzeigen",
"design.tree.badges": "Abzeichen anzeigen",
"design.tree.groupIconsInMenus": "Gruppen Icons in Kontextmenüs anzeigen",
"design.tree.hideInaccessibleGroups": "Nicht zugängliche Gruppen in Kontextmenüs verbergen",
"design.tree.commanderLamp": "Zeige Channel Commander als Lampe",
"design.tree.awayMessage": "Away Nachricht neben Nickname anzeigen",
"design.tree.tooltips": "Tooltip Info bei Hover anzeigen",
"design.status.connected": "Verbunden",
"design.custom.new": "+ Neues Design",
"design.custom.import": "Design importieren",
@@ -345,6 +390,19 @@
"options.section.sounds": "Sounds",
"app.title": "Anwendung",
"app.subtitle": "Allgemeine Anwendungseinstellungen",
"app.group.server": "Server",
"app.group.misc": "Verschiedenes",
"app.group.subscribe": "Channel Abonnement Verhalten",
"app.group.privacy": "Datenschutz",
"app.micOnServerSwitch": "Mikrofon beim Wechseln des Servers automatisch aktivieren",
"app.reconnectAfterSleep": "Neu verbinden nach Energiesparmodus",
"app.middleClickQuickAccess": "Mittleren Mousebutton als Schnellzugriff im Baum benutzen",
"app.updateFavoriteNickname": "Automatisch Nicknamen in Favoriten aktualisieren",
"app.autoOpenChannelChat": "Channel Chats automatisch öffnen",
"app.mutedTalkingSound": "Akustischen Hinweis abspielen, wenn das Mikrofon gemutet ist",
"app.neverShowPokeDialog": "Anstupsen Dialog nie zeigen",
"app.subscribe.all": "Alle Channel abonnieren",
"app.subscribe.current": "Nur aktuellen und zuvor abonnierte Channel abonnieren",
"app.language": "Sprache",
"app.language.auto": "Systemvorgabe",
"app.language.de": "Deutsch",
@@ -352,7 +410,8 @@
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "Fehlt deine Sprache oder eine Übersetzung ist ungenau? Hilf mit auf Weblate →",
"app.language.ru": "Русский (бета)",
"app.language.helpTranslate": "Fehlt deine Sprache oder eine Übersetzung ist ungenau? So hilfst du mit →",
"app.serverBanner": "Server-Banner anzeigen",
"app.serverBanner.hint": "Das Banner lädt direkt von der Adresse, die der Serverbetreiber eingetragen hat. Dieser Host sieht dabei deine IP-Adresse.",
"app.chatImages": "Bilder im Chat laden",
@@ -391,7 +450,7 @@
"recording.hangoverDelay": "Abschaltverzögerung:",
"recording.secondsUnit": "Sek",
"recording.dsp": "Digital Signal Processing",
"recording.typingAttenuation": "Typing attenuation",
"recording.typingAttenuation": "Tippgeräusche dämpfen",
"recording.echoCancellation": "Echo Dämpfung",
"recording.noiseSuppression": "Hintergrundgeräusche entfernen",
"recording.autoGainControl": "Automatische Verstärkung",
@@ -434,10 +493,13 @@
"publish.alphaTitle": "Alpha – instabil, kann sich jederzeit ändern oder brechen",
"publish.demoUnavailable": "Übertragen ist in der Demo nicht verfügbar – dafür braucht es einen echten TeamSpeak-6-Server.",
"publish.alphaNote": "Streaming ist Alpha. Es spricht TeamSpeak 6s Stream/Call-Protokoll, das nicht dokumentiert ist – Verbindungsaufbau, Bildqualität und Zuschauerverwaltung können fehlschlagen oder sich ohne Vorankündigung ändern. Nicht für produktive Nutzung gedacht.",
"publish.start": "Bildschirm übertragen",
"publish.start": "Bildschirm oder Kamera übertragen",
"publish.stop": "Übertragung beenden",
"publish.title": "Deine Übertragung",
"publish.screen": "Bildschirm",
"publish.camera": "Kamera",
"publish.kind": "Übertragen",
"publish.kind.display": "Bildschirm / Fenster",
"publish.starting": "Wird gestartet…",
"publish.viewers": "{count} Zuschauer",
"publish.request.allow": "Zulassen",
@@ -452,6 +514,7 @@
"publish.preset": "Voreinstellung",
"publish.preset.presentation": "Präsentation",
"publish.audio": "Audio aufnehmen",
"publish.audio.cameraHint": "Bei der Kamera läuft dein Ton wie gewohnt übers Mikrofon.",
"publish.privacy": "Privatsphäre",
"publish.privacy.public": "Öffentlich",
"publish.privacy.contacts": "Kontakte",
@@ -654,6 +717,7 @@
"serverContext.addFavorite": "Zu Favoriten hinzufügen",
"serverContext.disconnect": "Verbindung trennen",
"connectError.dismiss": "Schließen",
"connectError.gatewayFull": "Das Gateway ist gerade voll. Versuch es in ein paar Minuten nochmal – oder hoste WebSpeak3 selbst: github.com/WebSpeak3/webspeak3",
"dialog.close": "Schließen",
"sounds.title": "Sounds",
"sounds.subtitle": "Sound-Benachrichtigungen für Ereignisse festlegen",
@@ -667,6 +731,9 @@
"sounds.event.message": "Nachricht empfangen",
"sounds.event.poke": "Anstupsen erhalten",
"sounds.event.mute": "Stummschaltung umgeschaltet",
"sounds.event.micClickOn": "Mikro Klick an",
"sounds.event.micClickOff": "Mikro Klick aus",
"sounds.event.whisper": "Whisper empfangen",
"sounds.default": "Standard",
"sounds.custom": "Eigene Datei: {name}",
"sounds.test": "▶ Testen",
@@ -697,5 +764,250 @@
"about.text": "WebSpeak3 ist ein TeamSpeak-Client für den Browser, quelloffen und ohne Installation.",
"about.memorial.title": "In Erinnerung an Akimo",
"about.memorial.text": "Am 21.10.2026 über die Regenbogenbrücke gegangen. 🌈🐾",
"about.close": "Schließen"
"about.close": "Schließen",
"menu.extras.fileTransfers": "Dateiübertragungen",
"transfers.title": "Dateiübertragungen",
"transfers.empty": "Keine Übertragungen.",
"transfers.up": "Upload",
"transfers.down": "Download",
"transfers.status.queued": "Wartet",
"transfers.status.running": "Läuft",
"transfers.status.done": "Fertig",
"transfers.status.error": "Fehlgeschlagen",
"transfers.clearFinished": "Beendete entfernen",
"transfers.finished": "Übertragung beendet: {name}",
"downloadSettings.subtitle": "Download Einstellungen",
"downloadSettings.directory": "Download Verzeichnis",
"downloadSettings.directoryLabel": "Verzeichnis für Downloads:",
"downloadSettings.browserDefault": "Browser-Standard",
"downloadSettings.change": "Ändern",
"downloadSettings.reset": "Zurücksetzen",
"downloadSettings.alwaysDir": "Immer in dieses Verzeichnis speichern",
"downloadSettings.askEachTime": "Jedesmal nach Downloadverzeichnis fragen",
"downloadSettings.unsupported": "Dieser Browser kann keinen Ordner wählen; Downloads landen im Download-Ordner des Browsers.",
"downloadSettings.interface": "Interface",
"downloadSettings.showWindowOnStart": "Das Dateitransfer Fenster anzeigen, wenn ein Download startet",
"downloadSettings.closeWindowWhenDone": "Das Dateitransfer Fenster schließen, wenn alle Downloads beendet wurden",
"downloadSettings.popupWhenDone": "Pop-up bei beendeten Übertragungen einblenden",
"downloadSettings.uploadLimit": "Upload-Bandbreite",
"downloadSettings.downloadLimit": "Download-Bandbreite",
"downloadSettings.maxUploads": "Gleichzeitige Uploads",
"downloadSettings.maxDownloads": "Gleichzeitige Downloads",
"downloadSettings.unlimited": "Nicht limitieren",
"downloadSettings.limitedTo": "Limitiert auf",
"chatSettings.subtitle": "Chat Einstellungen",
"chatSettings.window": "Chat Fenster",
"chatSettings.maxLines": "Maximale Anzahl an Zeilen:",
"chatSettings.font": "Schrift:",
"chatSettings.fontDefault": "Standard",
"chatSettings.fontReset": "Schrift zurücksetzen",
"chatSettings.fontPreview": "So sieht der Chat mit dieser Schrift aus.",
"chatSettings.autoLog": "Automatisch protokollieren",
"chatSettings.logChannel": "Channel Chats protokollieren",
"chatSettings.logPrivate": "Private Chats protokollieren",
"chatSettings.logServer": "Server Chats protokollieren",
"chatSettings.logHint": "Protokolle bleiben nur in diesem Browser gespeichert (letzte 1000 Zeilen je Chat).",
"chatSettings.restore": "Protokolle aktualisieren",
"chatSettings.restoreChannelLines": "Channel Chat Protokolle aktualisieren",
"chatSettings.restorePrivateLines": "Private Chat Protokolle aktualisieren",
"chatSettings.notify": "Hinweis für eingehende Nachrichten",
"chatSettings.notifyServer": "Server",
"chatSettings.notifyChannel": "Channel",
"chatSettings.notifyPrivate": "Privat",
"chatSettings.linesUnit": "Zeilen",
"chatSettings.last": "letzten",
"securitySettings.subtitle": "Sicherheitseinstellungen",
"securitySettings.passwords": "Passwörter",
"securitySettings.saveChannelPasswords": "Channel Passwörter speichern",
"securitySettings.clearChannelPasswords": "Channel Passwörter löschen",
"securitySettings.channelPasswordsCleared": "Gespeicherte Channel Passwörter wurden gelöscht.",
"securitySettings.masterPassword": "Master Passwort benutzen",
"securitySettings.changeMasterPassword": "Master Passwort ändern",
"securitySettings.cleanup": "Aufräumen",
"securitySettings.clearCacheOnExit": "Cache beim Beenden leeren",
"securitySettings.clearUrlsOnExit": "URLs beim Beenden löschen",
"securitySettings.clearCache": "Cache löschen",
"securitySettings.cacheCleared": "Cache gelöscht.",
"securitySettings.identities": "Identitäten",
"securitySettings.manageIdentities": "Identitäten verwalten",
"notify.connection": "Verbindung",
"notify.connected": "Zu Server verbunden",
"notify.disconnected": "Von Server getrennt",
"notify.lostConnection": "Verbindung zum Server verloren",
"notify.channel": "Channel",
"notify.created": "Erstellt",
"notify.deleted": "Gelöscht",
"notify.edited": "Editiert",
"notify.moved": "Bewegt",
"notify.currentChannel": "Aktueller Channel",
"notify.otherChannel": "Anderer Channel",
"notify.byYou": "Von Ihnen",
"notify.byOther": "Von anderem Client",
"notify.server": "Server",
"notify.insufficientPermissions": "Unzureichende Rechte",
"notify.error": "Fehler",
"notify.client": "Client",
"notify.switched": "Channel gewechselt",
"notify.movedClient": "Verschoben",
"notify.kickedChannel": "Aus Channel gekickt",
"notify.kickedServer": "Vom Server gekickt",
"notify.banned": "Gebannt",
"notify.toCurrent": "In aktuellen Channel",
"notify.fromCurrent": "Aus aktuellem Channel",
"notify.toOther": "In anderen Channel",
"notify.appears": "Erscheint",
"notify.stays": "Bleibt sichtbar",
"notify.disappears": "Verschwindet",
"notify.serverGroup": "Servergruppe",
"notify.channelGroup": "Channelgruppe geändert",
"notify.added": "Hinzugefügt",
"notify.removed": "Entfernt",
"notify.byServer": "Durch Server",
"notify.byUser": "Durch Benutzer",
"notify.recording": "Aufnahme",
"notify.recordingStart": "Aufnahme gestartet",
"notify.recordingStop": "Aufnahme beendet",
"notify.recordingInChannel": "Aufnahme im Channel aktiv",
"notify.talkPowerRequested": "Sprechrecht angefragt",
"notify.self": "Selbst",
"notify.youSwitched": "Channel gewechselt",
"notify.youMoved": "In anderen Channel verschoben",
"notify.youKickedServer": "Vom Server gekickt",
"notify.youKickedChannel": "Aus Channel gekickt",
"notify.youBanned": "Gebannt",
"notify.talkPowerGranted": "Sprechrecht erhalten",
"notify.talkPowerRevoked": "Sprechrecht entzogen",
"notify.chat": "Chat",
"notify.messageSent": "Nachricht gesendet",
"notify.messageReceived": "Nachricht empfangen",
"notify.capture": "Sound Aufnahme",
"notify.playback": "Sound Wiedergabe",
"notify.muted": "Stumm geschaltet",
"notify.unmuted": "Aktiviert",
"notify.status": "Status",
"notify.away": "Abwesend",
"notify.present": "Wieder da",
"notify.other": "Andere",
"notify.poked": "Angestupst",
"notify.transferComplete": "Dateiübertragung abgeschlossen",
"notify.transferFailed": "Dateiübertragung fehlgeschlagen",
"notify.whisperListEmpty": "Flüsterliste leer",
"notify.whisperTargetNotFound": "Kein Flüsterziel gefunden",
"notify.whisperTooMany": "Zu viele Flüsterziele",
"notify.special": "Speziell",
"notify.micClickOtherOn": "Mikrofonklick andere an",
"notify.micClickOtherOff": "Mikrofonklick andere aus",
"notify.micClickSelfOn": "Mikrofonklick selbst an",
"notify.micClickSelfOff": "Mikrofonklick selbst aus",
"notify.whisperNotify": "Flüster-Hinweis",
"notify.soundTest": "Soundtest",
"notify.test3d": "3D-Test",
"notify.talkingWhileMuted": "Sprechen trotz Stummschaltung",
"notify.subtitle": "Meldungen einstellen",
"notify.soundPack": "Sound Pack:",
"notify.pack.builtin": "WebSpeak3 Standard",
"notify.pack.none": "Keine Sounds",
"notify.importPack": "TS3 Sound Pack importieren (.ts3_soundpack / .zip)",
"notify.deletePack": "Sound Pack löschen",
"notify.deletePackConfirm": "Sound Pack \"{name}\" löschen?",
"notify.importFailed": "Das ist kein gültiges TS3 Sound Pack (settings.ini fehlt).",
"notify.whenMuted": "Wenn Ausgabe stumm:",
"notify.whenMuted.all": "Alle Sounds spielen",
"notify.whenMuted.none": "Keine Sounds spielen",
"notify.hintBefore": "Hinweis: Das Sound Pack kann für jeden ",
"notify.hintLink": "Favoriten",
"notify.hintAfter": " überschrieben werden.",
"notify.col.action": "Aktion",
"notify.col.script": "Sound Skript",
"notify.col.text": "Text Position",
"notify.text.server": "Server",
"notify.text.channel": "Channel",
"notify.resetAll": "Alle Anpassungen zurücksetzen",
"notify.applyToFavorites": "Dieses Sound Pack für alle Favoriten verwenden",
"notify.applyToFavoritesConfirm": "Alle Favoriten auf dieses Sound Pack setzen? Eigene Sound Packs einzelner Favoriten werden dabei zurückgesetzt.",
"notify.whenMuted.important": "Nur wichtige Sounds spielen",
"notify.text.client": "Client",
"vault.title": "Master Passwort",
"vault.prompt": "Deine Identitäten und gespeicherten Passwörter sind verschlüsselt. Gib dein Master Passwort ein.",
"vault.unlock": "Entsperren",
"vault.wrong": "Falsches Passwort.",
"vault.forgot": "Passwort vergessen",
"vault.forgotConfirm": "Ohne Passwort lassen sich die Daten nicht wiederherstellen. Identitäten, Favoriten und gespeicherte Passwörter endgültig löschen und neu anfangen?",
"securitySettings.masterHint": "Verschlüsselt Identitäten, Favoriten (mit Passwörtern) und gespeicherte Channel-Passwörter. Nach jedem Neuladen wird das Passwort abgefragt.",
"securitySettings.masterCurrent": "Aktuelles Master Passwort",
"securitySettings.masterNew": "Neues Master Passwort",
"securitySettings.masterRepeat": "Wiederholen",
"securitySettings.masterMismatch": "Die Passwörter stimmen nicht überein.",
"securitySettings.masterNote": "Du musst es bei jeder neuen Sitzung (Neuladen oder neuer Tab) wieder eingeben. Merk es dir gut: Ohne das Passwort sind Identitäten und gespeicherte Passwörter weg.",
"sync.subtitle": "Deine Daten auf allen Geräten",
"sync.intro": "Ein Konto besteht nur aus einer zufälligen Nummer, optional mit Passwort. Keine Mail, kein Name. Alles wird auf deinem Gerät verschlüsselt, bevor es hochgeladen wird. Der Server sieht nur unlesbare Daten.",
"sync.create.title": "Neues Konto",
"sync.create.withPassword": "Zusätzlich ein zufälliges Passwort erzeugen (empfohlen)",
"sync.create.withPasswordHint": "Ohne Passwort reicht die Kontonummer allein, um an deine Daten zu kommen.",
"sync.create.button": "Konto erstellen",
"sync.create.busy": "Konto wird erstellt …",
"sync.login.title": "Bestehendes Konto",
"sync.number": "Kontonummer",
"sync.password": "Passwort",
"sync.passwordOptional": "Passwort (falls vorhanden)",
"sync.login.hint": "Die Daten des Kontos ersetzen danach die auf diesem Gerät.",
"sync.login.button": "Anmelden",
"sync.server": "Sync-Server",
"sync.serverDefault": "Standard (offizieller WebSpeak3-Server)",
"sync.serverHint": "Leer lassen für den offiziellen Server. Ein Konto gibt es nur auf dem Server, auf dem es erstellt wurde.",
"sync.account.title": "Dein Konto",
"sync.copy": "Kopieren",
"sync.copied": "Kopiert",
"sync.show": "Anzeigen",
"sync.hide": "Verbergen",
"sync.noPassword": "Kein Passwort",
"sync.keepSafe": "Bewahre Nummer und Passwort gut auf. Gehen sie verloren, kann niemand deine Daten wiederherstellen, auch wir nicht.",
"sync.recoveryFile": "Wiederherstellungsdatei herunterladen",
"sync.qr.show": "QR-Code anzeigen",
"sync.qr.hide": "QR-Code verbergen",
"sync.qr.hint": "Mit dem anderen Gerät scannen, um es dort anzumelden. Wer den Code sieht, hat Zugriff auf dein Konto.",
"sync.password.add": "Passwort hinzufügen",
"sync.password.remove": "Passwort entfernen",
"sync.password.addConfirm": "Ein neues zufälliges Passwort erzeugen? Andere Geräte müssen sich danach mit Nummer und Passwort neu anmelden.",
"sync.password.removeConfirm": "Passwort entfernen? Dann reicht die Kontonummer allein. Andere Geräte müssen sich neu anmelden.",
"sync.categories": "Synchronisieren",
"sync.category.identities": "Identitäten (inkl. privater Schlüssel)",
"sync.category.favorites": "Favoriten, Channel-Passwörter und Kontakte",
"sync.category.settings": "Einstellungen",
"sync.category.designs": "Designs und Icon Packs",
"sync.category.whisper": "Whisper-Listen",
"sync.categoriesHint": "Audiogeräte, Lautstärken, PTT-Taste und Chatprotokolle bleiben immer auf dem Gerät.",
"sync.status": "Status",
"sync.status.syncing": "Wird synchronisiert …",
"sync.status.last": "Zuletzt synchronisiert: {time}",
"sync.status.never": "Noch nicht synchronisiert",
"sync.conflict.title": "Synchronisierung",
"sync.conflict.text": "Auf diesem Gerät und im Konto wurde seit dem letzten Abgleich etwas geändert. Welcher Stand soll gelten?",
"sync.conflict.local": "Diesen Stand hochladen",
"sync.conflict.server": "Stand aus dem Konto laden",
"sync.syncNow": "Jetzt synchronisieren",
"sync.serverInfo": "Server: {server}",
"sync.logout": "Abmelden",
"sync.logoutConfirm": "Dieses Gerät vom Konto abmelden? Konto und Daten bleiben erhalten.",
"sync.delete": "Konto löschen",
"sync.deleteConfirm": "Konto mit allen Daten auf dem Server endgültig löschen? Die Daten auf diesem Gerät bleiben.",
"sync.link.title": "Mit Konto verbinden",
"sync.link.prompt": "Dieses Gerät mit dem Konto {number} verbinden? Die Daten des Kontos ersetzen die auf diesem Gerät.",
"sync.link.connect": "Verbinden",
"sync.error.password_required": "Dieses Konto hat ein Passwort.",
"sync.error.unreachable": "Sync-Server nicht erreichbar.",
"sync.error.not_found": "Konto nicht gefunden oder Passwort falsch. Wurde das Passwort auf einem anderen Gerät geändert, melde dich neu an.",
"sync.error.rate_limited": "Zu viele Anfragen, bitte später nochmal.",
"sync.error.full": "Der Sync-Server nimmt gerade keine neuen Konten an.",
"sync.error.pow_required": "Sicherheitsprüfung fehlgeschlagen, bitte nochmal versuchen.",
"sync.error.conflict": "Ein anderes Gerät hat inzwischen etwas geändert.",
"sync.error.payload_too_large": "Zu viele Daten für die Synchronisierung (max. 1 MB).",
"sync.error.generic": "Synchronisierung fehlgeschlagen.",
"mobile.tab.channels": "Kanäle",
"mobile.tab.chat": "Chat",
"mobile.tab.info": "Info",
"mobile.mic": "Mikro",
"mobile.sound": "Ton",
"mobile.leave": "Trennen",
"mobile.talk": "Sprechen"
}
+319 -7
View File
@@ -19,7 +19,7 @@
"menu.help.about": "About WebSpeak3",
"menu.help.github": "GitHub",
"menu.help.changelog": "Changelog",
"menu.help.translate": "Help translate (Weblate)",
"menu.help.translate": "Help translate (GitHub)",
"menu.extras.identities": "Identities",
"menu.extras.contacts": "Contacts",
"menu.extras.collectedUrls": "Collected URLs",
@@ -70,7 +70,7 @@
"restartNotice.ack": "Got it",
"menu.extras.tos": "Terms of use",
"tos.title": "Terms of use for client.webspeak3.de",
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/GreenTeaSpeak servers via the browser.",
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/VoySpeak servers via the browser.",
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting the service, and circumventing bans.",
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to the relevant authorities.",
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see the ",
@@ -125,6 +125,9 @@
"connect.serverType.auto": "Auto",
"connect.serverType.teamspeak": "TeamSpeak",
"connect.serverType.teaspeak": "TeaSpeak",
"connect.serverType.ts2": "TeamSpeak 2 (experimental)",
"connect.ts2LoginName": "TS2 account name (empty = anonymous):",
"connect.ts2LoginPassword": "TS2 account password:",
"connect.hotkeyProfile": "Hotkey profile:",
"connect.soundPack": "Sound pack:",
"connect.more": "More",
@@ -149,6 +152,7 @@
"inviteFriend.type": "Invitation type",
"inviteFriend.includeChannel": "Insert current channel",
"inviteFriend.link": "Link",
"inviteFriend.webspeak3Link": "WebSpeak3 link",
"inviteFriend.addPermissionKey": "Add permission key",
"inviteFriend.copyToClipboard": "Copy to clipboard",
"inviteFriend.copied": "Copied!",
@@ -165,6 +169,17 @@
"whisperHistory.title": "Whisper History - {server}",
"whisperHistory.empty": "No whisper history yet.",
"whisperHistory.started": "Whispering to: {targets}",
"whisperSettings.subtitle": "Whisper settings",
"whisperSettings.rights": "Permissions for incoming whispers",
"whisperSettings.mode.allow": "Use individual contact settings, otherwise allow",
"whisperSettings.mode.block": "Use individual contact settings, otherwise block",
"whisperSettings.mode.blockAll": "Block all",
"whisperSettings.incoming": "Incoming whisper settings",
"whisperSettings.sound": "Play a sound when someone whispers to you",
"whisperSettings.openHistory": "Always open the whisper history when someone whispers to you",
"whisperSettings.clearAfter": "Remove clients from the whisper history after",
"whisperSettings.minutes": "minutes",
"whisperHistory.received": "{name} whispered to you",
"whisperHistory.stopped": "Stopped whispering",
"whisperHistory.clear": "Clear",
"whisperHistory.options": "Options",
@@ -241,6 +256,10 @@
"contacts.category.blocked": "Blocked",
"contacts.category.friend": "Friend",
"contacts.phoneticName": "Phonetic Name:",
"contacts.whisperSetting": "Whisper:",
"contacts.whisperSetting.default": "Default",
"contacts.whisperSetting.allow": "Allow",
"contacts.whisperSetting.block": "Block",
"contacts.show": "Show",
"contacts.ignore": "Ignore",
"contacts.unignore": "Unignore",
@@ -273,6 +292,7 @@
"options.cancel": "Cancel",
"options.notImplemented": "This setting isn't implemented yet.",
"options.section.anwendung": "Application",
"options.section.konto": "Account",
"options.section.wiedergabe": "Playback",
"options.section.aufnahme": "Capture",
"options.section.design": "Appearance",
@@ -281,13 +301,38 @@
"design.theme.standard.desc": "The original WebSpeak3 design.",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "A more modern, dark design with rounded elements.",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "Classic GreenTeaSpeak client layout with dark panels and a gold menu bar.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "Card-based layout with a breadcrumb bar and a color accent.",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "A technical, flat IDE-style layout for power users.",
"design.idePixelFont": "Pixel terminal font",
"design.theme": "Theme",
"design.customThemes": "Custom designs",
"design.iconPack": "Icon pack",
"design.manage": "Manage designs & icons…",
"design.manage.title": "Manage designs & icons",
"design.iconPack.none": "No icon pack installed yet.",
"design.iconPack.import": "Import icon pack",
"design.iconPack.importError": "This file could not be read as an icon pack.",
"design.iconPack.deleteConfirm": "Really delete this icon pack?",
"design.iconPack.hint": "TeamSpeak 3 icon packs (.ts3_iconpack) or ZIPs with images named the same way. Replaces talk lamps, mic/sound muted, away, channel commander, channel and server icons.",
"design.notAvailable": "Not available in the web client yet",
"design.gif": "GIF animation support",
"design.gif.avatars": "Enable avatar animation",
"design.gif.images": "Enable image animation",
"design.tree": "Channel tree",
"design.tree.expandAll": "Expand all channels on connect",
"design.tree.expandDepth": "Expand channels up to this level (0 = all)",
"design.tree.expandOwn": "Expand only my own channel on connect",
"design.tree.clientsBelow": "Sort clients below channels",
"design.tree.flags": "Show client flags",
"design.tree.overwolf": "Show Overwolf icons",
"design.tree.badges": "Show badges",
"design.tree.groupIconsInMenus": "Show group icons in context menus",
"design.tree.hideInaccessibleGroups": "Hide inaccessible groups in context menus",
"design.tree.commanderLamp": "Show channel commander as lamp",
"design.tree.awayMessage": "Show away message next to nickname",
"design.tree.tooltips": "Show tooltip info on hover",
"design.status.connected": "Connected",
"design.custom.new": "+ New design",
"design.custom.import": "Import design",
@@ -345,6 +390,19 @@
"options.section.sounds": "Sounds",
"app.title": "Application",
"app.subtitle": "General application settings",
"app.group.server": "Server",
"app.group.misc": "Miscellaneous",
"app.group.subscribe": "Channel subscription behavior",
"app.group.privacy": "Privacy",
"app.micOnServerSwitch": "Automatically activate microphone when switching servers",
"app.reconnectAfterSleep": "Reconnect after sleep mode",
"app.middleClickQuickAccess": "Use middle mouse button as quick access in the tree",
"app.updateFavoriteNickname": "Automatically update nickname in favorites",
"app.autoOpenChannelChat": "Open channel chats automatically",
"app.mutedTalkingSound": "Play a sound when talking while the microphone is muted",
"app.neverShowPokeDialog": "Never show poke dialog",
"app.subscribe.all": "Subscribe to all channels",
"app.subscribe.current": "Only subscribe to current and previously subscribed channels",
"app.language": "Language",
"app.language.auto": "System default",
"app.language.de": "Deutsch",
@@ -352,7 +410,8 @@
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "Missing your language or spotted a wrong translation? Help out on Weblate →",
"app.language.ru": "Русский (бета)",
"app.language.helpTranslate": "Missing your language or spotted a wrong translation? Here's how to help →",
"app.serverBanner": "Show server banners",
"app.serverBanner.hint": "The banner loads straight from the address the server admin set, and that host sees your IP address.",
"app.chatImages": "Load images in chat",
@@ -434,10 +493,13 @@
"publish.alphaTitle": "Alpha - unstable, may change or break at any time",
"publish.demoUnavailable": "Streaming is not available in the demo - it needs a real TeamSpeak 6 server.",
"publish.alphaNote": "Streaming is alpha. It speaks TeamSpeak 6's undocumented Stream/Call protocol, so connecting, picture quality and viewer handling can fail or change without notice. Not meant for production use.",
"publish.start": "Share your screen",
"publish.start": "Share your screen or camera",
"publish.stop": "Stop sharing",
"publish.title": "Your broadcast",
"publish.screen": "Screen",
"publish.camera": "Camera",
"publish.kind": "Share",
"publish.kind.display": "Screen / window",
"publish.starting": "Starting…",
"publish.viewers": "{count} watching",
"publish.request.allow": "Allow",
@@ -452,6 +514,7 @@
"publish.preset": "Preset",
"publish.preset.presentation": "Presentation",
"publish.audio": "Capture audio",
"publish.audio.cameraHint": "With the camera, your sound goes out through your microphone as usual.",
"publish.privacy": "Privacy",
"publish.privacy.public": "Public",
"publish.privacy.contacts": "Contacts",
@@ -654,6 +717,7 @@
"serverContext.addFavorite": "Add to favorites",
"serverContext.disconnect": "Disconnect",
"connectError.dismiss": "Dismiss",
"connectError.gatewayFull": "The gateway is full right now. Try again in a few minutes – or host WebSpeak3 yourself: github.com/WebSpeak3/webspeak3",
"dialog.close": "Close",
"sounds.title": "Sounds",
"sounds.subtitle": "Configure sound notifications for events",
@@ -667,6 +731,9 @@
"sounds.event.message": "Message received",
"sounds.event.poke": "Poke received",
"sounds.event.mute": "Mute toggled",
"sounds.event.micClickOn": "Mic click on",
"sounds.event.micClickOff": "Mic click off",
"sounds.event.whisper": "Whisper received",
"sounds.default": "Default",
"sounds.custom": "Custom file: {name}",
"sounds.test": "▶ Test",
@@ -697,5 +764,250 @@
"about.text": "WebSpeak3 is a TeamSpeak client for the browser, open source and with nothing to install.",
"about.memorial.title": "In memory of Akimo",
"about.memorial.text": "Crossed the rainbow bridge on October 21, 2026. 🌈🐾",
"about.close": "Close"
"about.close": "Close",
"menu.extras.fileTransfers": "File transfers",
"transfers.title": "File transfers",
"transfers.empty": "No transfers.",
"transfers.up": "Upload",
"transfers.down": "Download",
"transfers.status.queued": "Queued",
"transfers.status.running": "Running",
"transfers.status.done": "Done",
"transfers.status.error": "Failed",
"transfers.clearFinished": "Remove finished",
"transfers.finished": "Transfer finished: {name}",
"downloadSettings.subtitle": "Download settings",
"downloadSettings.directory": "Download directory",
"downloadSettings.directoryLabel": "Directory for downloads:",
"downloadSettings.browserDefault": "Browser default",
"downloadSettings.change": "Change",
"downloadSettings.reset": "Reset",
"downloadSettings.alwaysDir": "Always save to this directory",
"downloadSettings.askEachTime": "Ask for the download directory every time",
"downloadSettings.unsupported": "This browser can't pick a folder; downloads go to the browser's download folder.",
"downloadSettings.interface": "Interface",
"downloadSettings.showWindowOnStart": "Show the file transfer window when a download starts",
"downloadSettings.closeWindowWhenDone": "Close the file transfer window when all downloads are finished",
"downloadSettings.popupWhenDone": "Show a pop-up when transfers finish",
"downloadSettings.uploadLimit": "Upload bandwidth",
"downloadSettings.downloadLimit": "Download bandwidth",
"downloadSettings.maxUploads": "Simultaneous uploads",
"downloadSettings.maxDownloads": "Simultaneous downloads",
"downloadSettings.unlimited": "Unlimited",
"downloadSettings.limitedTo": "Limited to",
"chatSettings.subtitle": "Chat settings",
"chatSettings.window": "Chat window",
"chatSettings.maxLines": "Maximum number of lines:",
"chatSettings.font": "Font:",
"chatSettings.fontDefault": "Default",
"chatSettings.fontReset": "Reset font",
"chatSettings.fontPreview": "This is how the chat looks with this font.",
"chatSettings.autoLog": "Automatic logging",
"chatSettings.logChannel": "Log channel chats",
"chatSettings.logPrivate": "Log private chats",
"chatSettings.logServer": "Log server chats",
"chatSettings.logHint": "Logs are only stored in this browser (last 1000 lines per chat).",
"chatSettings.restore": "Reload logs",
"chatSettings.restoreChannelLines": "Reload channel chat logs",
"chatSettings.restorePrivateLines": "Reload private chat logs",
"chatSettings.notify": "Notify on incoming messages",
"chatSettings.notifyServer": "Server",
"chatSettings.notifyChannel": "Channel",
"chatSettings.notifyPrivate": "Private",
"chatSettings.linesUnit": "lines",
"chatSettings.last": "last",
"securitySettings.subtitle": "Security settings",
"securitySettings.passwords": "Passwords",
"securitySettings.saveChannelPasswords": "Save channel passwords",
"securitySettings.clearChannelPasswords": "Delete channel passwords",
"securitySettings.channelPasswordsCleared": "Saved channel passwords were deleted.",
"securitySettings.masterPassword": "Use master password",
"securitySettings.changeMasterPassword": "Change master password",
"securitySettings.cleanup": "Cleanup",
"securitySettings.clearCacheOnExit": "Clear cache on exit",
"securitySettings.clearUrlsOnExit": "Delete URLs on exit",
"securitySettings.clearCache": "Clear cache",
"securitySettings.cacheCleared": "Cache cleared.",
"securitySettings.identities": "Identities",
"securitySettings.manageIdentities": "Manage identities",
"notify.connection": "Connection",
"notify.connected": "Connected to server",
"notify.disconnected": "Disconnected from server",
"notify.lostConnection": "Lost connection to server",
"notify.channel": "Channel",
"notify.created": "Created",
"notify.deleted": "Deleted",
"notify.edited": "Edited",
"notify.moved": "Moved",
"notify.currentChannel": "Current channel",
"notify.otherChannel": "Other channel",
"notify.byYou": "By you",
"notify.byOther": "By another client",
"notify.server": "Server",
"notify.insufficientPermissions": "Insufficient permissions",
"notify.error": "Error",
"notify.client": "Client",
"notify.switched": "Switched channel",
"notify.movedClient": "Moved",
"notify.kickedChannel": "Kicked from channel",
"notify.kickedServer": "Kicked from server",
"notify.banned": "Banned",
"notify.toCurrent": "To current channel",
"notify.fromCurrent": "From current channel",
"notify.toOther": "To other channel",
"notify.appears": "Appears",
"notify.stays": "Stays visible",
"notify.disappears": "Disappears",
"notify.serverGroup": "Server group",
"notify.channelGroup": "Channel group changed",
"notify.added": "Added",
"notify.removed": "Removed",
"notify.byServer": "By server",
"notify.byUser": "By user",
"notify.recording": "Recording",
"notify.recordingStart": "Recording started",
"notify.recordingStop": "Recording stopped",
"notify.recordingInChannel": "Recording active in channel",
"notify.talkPowerRequested": "Requested talk power",
"notify.self": "Self",
"notify.youSwitched": "Switched channel",
"notify.youMoved": "Moved to another channel",
"notify.youKickedServer": "Kicked from server",
"notify.youKickedChannel": "Kicked from channel",
"notify.youBanned": "Banned",
"notify.talkPowerGranted": "Granted talk power",
"notify.talkPowerRevoked": "Revoked talk power",
"notify.chat": "Chat",
"notify.messageSent": "Message sent",
"notify.messageReceived": "Message received",
"notify.capture": "Sound capture",
"notify.playback": "Sound playback",
"notify.muted": "Muted",
"notify.unmuted": "Unmuted",
"notify.status": "Status",
"notify.away": "Away",
"notify.present": "Back",
"notify.other": "Other",
"notify.poked": "Poked",
"notify.transferComplete": "File transfer complete",
"notify.transferFailed": "File transfer failed",
"notify.whisperListEmpty": "Whisper list empty",
"notify.whisperTargetNotFound": "No whisper target found",
"notify.whisperTooMany": "Too many whisper targets",
"notify.special": "Special",
"notify.micClickOtherOn": "Mic click others on",
"notify.micClickOtherOff": "Mic click others off",
"notify.micClickSelfOn": "Mic click self on",
"notify.micClickSelfOff": "Mic click self off",
"notify.whisperNotify": "Whisper notify",
"notify.soundTest": "Sound test",
"notify.test3d": "3D test",
"notify.talkingWhileMuted": "Talking while muted",
"notify.subtitle": "Configure notifications",
"notify.soundPack": "Sound pack:",
"notify.pack.builtin": "WebSpeak3 default",
"notify.pack.none": "No sounds",
"notify.importPack": "Import TS3 sound pack (.ts3_soundpack / .zip)",
"notify.deletePack": "Delete sound pack",
"notify.deletePackConfirm": "Delete sound pack \"{name}\"?",
"notify.importFailed": "That's not a valid TS3 sound pack (settings.ini missing).",
"notify.whenMuted": "When output muted:",
"notify.whenMuted.all": "Play all sounds",
"notify.whenMuted.none": "Play no sounds",
"notify.hintBefore": "Note: the sound pack can be overridden for each ",
"notify.hintLink": "favorite",
"notify.hintAfter": " separately.",
"notify.col.action": "Action",
"notify.col.script": "Sound script",
"notify.col.text": "Text position",
"notify.text.server": "Server",
"notify.text.channel": "Channel",
"notify.resetAll": "Reset all changes",
"notify.applyToFavorites": "Use this sound pack for all favorites",
"notify.applyToFavoritesConfirm": "Set all favorites to this sound pack? Sound packs set on individual favorites will be reset.",
"notify.whenMuted.important": "Play only important sounds",
"notify.text.client": "Client",
"vault.title": "Master password",
"vault.prompt": "Your identities and saved passwords are encrypted. Enter your master password.",
"vault.unlock": "Unlock",
"vault.wrong": "Wrong password.",
"vault.forgot": "Forgot password",
"vault.forgotConfirm": "Without the password the data can't be recovered. Permanently delete identities, favorites and saved passwords and start over?",
"securitySettings.masterHint": "Encrypts identities, favorites (with passwords) and saved channel passwords. Asked for after every reload.",
"securitySettings.masterCurrent": "Current master password",
"securitySettings.masterNew": "New master password",
"securitySettings.masterRepeat": "Repeat",
"securitySettings.masterMismatch": "The passwords don't match.",
"securitySettings.masterNote": "You'll have to enter it again in every new session (reload or new tab). Remember it well: without it, identities and saved passwords are lost.",
"sync.subtitle": "Your data on all your devices",
"sync.intro": "An account is just a random number, optionally with a password. No email, no name. Everything is encrypted on your device before it is uploaded. The server only sees unreadable data.",
"sync.create.title": "New account",
"sync.create.withPassword": "Also generate a random password (recommended)",
"sync.create.withPasswordHint": "Without a password, the account number alone gives access to your data.",
"sync.create.button": "Create account",
"sync.create.busy": "Creating account …",
"sync.login.title": "Existing account",
"sync.number": "Account number",
"sync.password": "Password",
"sync.passwordOptional": "Password (if any)",
"sync.login.hint": "The account's data then replaces the data on this device.",
"sync.login.button": "Log in",
"sync.server": "Sync server",
"sync.serverDefault": "Default (official WebSpeak3 server)",
"sync.serverHint": "Leave empty for the official server. An account only exists on the server it was created on.",
"sync.account.title": "Your account",
"sync.copy": "Copy",
"sync.copied": "Copied",
"sync.show": "Show",
"sync.hide": "Hide",
"sync.noPassword": "No password",
"sync.keepSafe": "Keep the number and password safe. If you lose them, nobody can recover your data, not even us.",
"sync.recoveryFile": "Download recovery file",
"sync.qr.show": "Show QR code",
"sync.qr.hide": "Hide QR code",
"sync.qr.hint": "Scan it with the other device to log in there. Anyone who sees this code can access your account.",
"sync.password.add": "Add password",
"sync.password.remove": "Remove password",
"sync.password.addConfirm": "Generate a new random password? Other devices will have to log in again with number and password.",
"sync.password.removeConfirm": "Remove the password? The account number alone will then be enough. Other devices will have to log in again.",
"sync.categories": "Sync",
"sync.category.identities": "Identities (including private keys)",
"sync.category.favorites": "Favorites, channel passwords and contacts",
"sync.category.settings": "Settings",
"sync.category.designs": "Designs and icon packs",
"sync.category.whisper": "Whisper lists",
"sync.categoriesHint": "Audio devices, volumes, PTT key and chat logs always stay on the device.",
"sync.status": "Status",
"sync.status.syncing": "Syncing …",
"sync.status.last": "Last synced: {time}",
"sync.status.never": "Not synced yet",
"sync.conflict.title": "Sync",
"sync.conflict.text": "Both this device and the account changed since the last sync. Which one should win?",
"sync.conflict.local": "Upload this device's data",
"sync.conflict.server": "Load the account's data",
"sync.syncNow": "Sync now",
"sync.serverInfo": "Server: {server}",
"sync.logout": "Log out",
"sync.logoutConfirm": "Log this device out of the account? The account and its data are kept.",
"sync.delete": "Delete account",
"sync.deleteConfirm": "Permanently delete the account and all its data on the server? The data on this device stays.",
"sync.link.title": "Connect to account",
"sync.link.prompt": "Connect this device to account {number}? The account's data replaces the data on this device.",
"sync.link.connect": "Connect",
"sync.error.password_required": "This account has a password.",
"sync.error.unreachable": "Sync server not reachable.",
"sync.error.not_found": "Account not found or wrong password. If the password was changed on another device, log in again.",
"sync.error.rate_limited": "Too many requests, please try again later.",
"sync.error.full": "The sync server isn't accepting new accounts right now.",
"sync.error.pow_required": "Security check failed, please try again.",
"sync.error.conflict": "Another device changed something in the meantime.",
"sync.error.payload_too_large": "Too much data to sync (max. 1 MB).",
"sync.error.generic": "Sync failed.",
"mobile.tab.channels": "Channels",
"mobile.tab.chat": "Chat",
"mobile.tab.info": "Info",
"mobile.mic": "Mic",
"mobile.sound": "Sound",
"mobile.leave": "Leave",
"mobile.talk": "Talk"
}
+319 -7
View File
@@ -19,7 +19,7 @@
"menu.help.about": "درباره WebSpeak3",
"menu.help.github": "گیت‌هاب",
"menu.help.changelog": "تاریخچه تغییرات",
"menu.help.translate": "کمک به ترجمه (Weblate)",
"menu.help.translate": "کمک به ترجمه (GitHub)",
"menu.extras.identities": "هویت‌ها",
"menu.extras.contacts": "مخاطبین",
"menu.extras.collectedUrls": "لینک‌های جمع‌آوری‌شده",
@@ -70,7 +70,7 @@
"restartNotice.ack": "متوجه شدم",
"menu.extras.tos": "شرایط استفاده",
"tos.title": "شرایط استفاده از client.webspeak3.de",
"tos.rule1": "این کلاینت برای استفاده خصوصی و غیرتجاری از سرورهای TeamSpeak/TeaSpeak/GreenTeaSpeak از طریق مرورگر است.",
"tos.rule1": "این کلاینت برای استفاده خصوصی و غیرتجاری از سرورهای TeamSpeak/TeaSpeak/VoySpeak از طریق مرورگر است.",
"tos.rule2": "به‌طور خاص ممنوع است: هرگونه فعالیت مجرمانه، آزار و سخنان نفرت‌پراکنانه، اسپم و سیل پیام، ایجاد اختلال در سرویس، و دور زدن مسدودیت‌ها.",
"tos.rule3": "تخلفات ممکن است بدون هشدار منجر به مسدود شدن دسترسی شوند؛ در موارد جدی، گزارش به مراجع ذی‌صلاح نیز ممکن است.",
"tos.rule4Pre": "به‌منظور امنیت عملیاتی و شناسایی سوءاستفاده، اطلاعات اتصال (آدرس سرور، نام سرور، زمان اتصال) ثبت می‌شود و پس از ۹۰ روز به‌صورت خودکار حذف می‌شود - برای جزئیات به ",
@@ -125,6 +125,9 @@
"connect.serverType.auto": "خودکار",
"connect.serverType.teamspeak": "TeamSpeak",
"connect.serverType.teaspeak": "TeaSpeak",
"connect.serverType.ts2": "TeamSpeak 2 (آزمایشی)",
"connect.ts2LoginName": "نام حساب TS2 (خالی = ناشناس):",
"connect.ts2LoginPassword": "رمز حساب TS2:",
"connect.hotkeyProfile": "پروفایل کلید میانبر:",
"connect.soundPack": "بسته صوتی:",
"connect.more": "بیشتر",
@@ -149,6 +152,7 @@
"inviteFriend.type": "نوع دعوت",
"inviteFriend.includeChannel": "افزودن کانال فعلی",
"inviteFriend.link": "لینک",
"inviteFriend.webspeak3Link": "لینک WebSpeak3",
"inviteFriend.addPermissionKey": "افزودن کلید مجوز",
"inviteFriend.copyToClipboard": "کپی در کلیپ‌بورد",
"inviteFriend.copied": "کپی شد!",
@@ -165,6 +169,17 @@
"whisperHistory.title": "تاریخچه نجوا - {server}",
"whisperHistory.empty": "هنوز تاریخچه نجوایی وجود ندارد.",
"whisperHistory.started": "در حال نجوا با: {targets}",
"whisperSettings.subtitle": "تنظیمات نجوا",
"whisperSettings.rights": "مجوز نجواهای ورودی",
"whisperSettings.mode.allow": "استفاده از تنظیمات مخاطبین، در غیر این صورت اجازه",
"whisperSettings.mode.block": "استفاده از تنظیمات مخاطبین، در غیر این صورت مسدود",
"whisperSettings.mode.blockAll": "مسدود کردن همه",
"whisperSettings.incoming": "تنظیمات نجواهای ورودی",
"whisperSettings.sound": "پخش صدا هنگام دریافت نجوا",
"whisperSettings.openHistory": "باز کردن تاریخچهٔ نجوا هنگام دریافت نجوا",
"whisperSettings.clearAfter": "حذف کاربران از تاریخچهٔ نجوا پس از",
"whisperSettings.minutes": "دقیقه",
"whisperHistory.received": "{name} با شما نجوا کرد",
"whisperHistory.stopped": "نجوا متوقف شد",
"whisperHistory.clear": "پاک کردن",
"whisperHistory.options": "گزینه‌ها",
@@ -241,6 +256,10 @@
"contacts.category.blocked": "مسدود",
"contacts.category.friend": "دوست",
"contacts.phoneticName": "تلفظ نام:",
"contacts.whisperSetting": "نجوا:",
"contacts.whisperSetting.default": "پیش‌فرض",
"contacts.whisperSetting.allow": "اجازه",
"contacts.whisperSetting.block": "مسدود",
"contacts.show": "نمایش",
"contacts.ignore": "نادیده گرفتن",
"contacts.unignore": "لغو نادیده گرفتن",
@@ -273,6 +292,7 @@
"options.cancel": "لغو",
"options.notImplemented": "این تنظیم هنوز پیاده‌سازی نشده است.",
"options.section.anwendung": "برنامه",
"options.section.konto": "حساب",
"options.section.wiedergabe": "پخش",
"options.section.aufnahme": "ضبط",
"options.section.design": "ظاهر",
@@ -281,13 +301,38 @@
"design.theme.standard.desc": "طراحی اصلی WebSpeak3.",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "طراحی مدرن‌تر و تیره با عناصر گرد.",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "چیدمان کلاسیک کلاینت GreenTeaSpeak با پنل‌های تیره و نوار منوی طلایی.",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "چیدمان کارتی با نوار مسیر و رنگ تأکیدی.",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "چیدمانی فنی و تخت به سبک IDE برای کاربران حرفه‌ای.",
"design.idePixelFont": "فونت پیکسلی ترمینال",
"design.theme": "تم",
"design.customThemes": "طرح‌های سفارشی",
"design.iconPack": "بستهٔ آیکون",
"design.manage": "مدیریت طرح‌ها و آیکون‌ها…",
"design.manage.title": "مدیریت طرح‌ها و آیکون‌ها",
"design.iconPack.none": "هنوز هیچ بستهٔ آیکونی نصب نشده است.",
"design.iconPack.import": "وارد کردن بستهٔ آیکون",
"design.iconPack.importError": "این فایل به‌عنوان بستهٔ آیکون خوانده نشد.",
"design.iconPack.deleteConfirm": "این بستهٔ آیکون واقعاً حذف شود؟",
"design.iconPack.hint": "بسته‌های آیکون TeamSpeak 3 (.ts3_iconpack) یا فایل ZIP با تصاویر هم‌نام. چراغ صحبت، بی‌صدا بودن میکروفون/صدا، غایب، فرمانده کانال، کانال و سرور را جایگزین می‌کند.",
"design.notAvailable": "هنوز در کلاینت وب در دسترس نیست",
"design.gif": "پشتیبانی از انیمیشن GIF",
"design.gif.avatars": "فعال‌سازی انیمیشن آواتار",
"design.gif.images": "فعال‌سازی انیمیشن تصاویر",
"design.tree": "درخت کانال",
"design.tree.expandAll": "باز کردن همهٔ کانال‌ها هنگام اتصال",
"design.tree.expandDepth": "باز کردن کانال‌ها تا این سطح (0 = همه)",
"design.tree.expandOwn": "فقط کانال خودم هنگام اتصال باز شود",
"design.tree.clientsBelow": "مرتب‌سازی کاربران زیر کانال‌ها",
"design.tree.flags": "نمایش پرچم کاربران",
"design.tree.overwolf": "نمایش آیکون‌های Overwolf",
"design.tree.badges": "نمایش نشان‌ها",
"design.tree.groupIconsInMenus": "نمایش آیکون گروه‌ها در منوهای راست‌کلیک",
"design.tree.hideInaccessibleGroups": "پنهان کردن گروه‌های غیرقابل‌دسترس در منوها",
"design.tree.commanderLamp": "نمایش فرمانده کانال به‌صورت چراغ",
"design.tree.awayMessage": "نمایش پیام غیبت کنار نام",
"design.tree.tooltips": "نمایش راهنما هنگام نگه‌داشتن ماوس",
"design.status.connected": "متصل",
"design.custom.new": "+ طراحی جدید",
"design.custom.import": "وارد کردن طراحی",
@@ -345,6 +390,19 @@
"options.section.sounds": "صداها",
"app.title": "برنامه",
"app.subtitle": "تنظیمات عمومی برنامه",
"app.group.server": "سرور",
"app.group.misc": "متفرقه",
"app.group.subscribe": "رفتار اشتراک کانال",
"app.group.privacy": "حریم خصوصی",
"app.micOnServerSwitch": "فعال‌سازی خودکار میکروفون هنگام تغییر سرور",
"app.reconnectAfterSleep": "اتصال مجدد پس از حالت خواب",
"app.middleClickQuickAccess": "استفاده از دکمه وسط ماوس برای دسترسی سریع در درخت",
"app.updateFavoriteNickname": "به‌روزرسانی خودکار نام مستعار در علاقه‌مندی‌ها",
"app.autoOpenChannelChat": "باز کردن خودکار چت کانال",
"app.mutedTalkingSound": "پخش صدای هشدار هنگام صحبت با میکروفون بی‌صدا",
"app.neverShowPokeDialog": "هرگز پنجره سقلمه را نشان نده",
"app.subscribe.all": "اشتراک همه کانال‌ها",
"app.subscribe.current": "فقط اشتراک کانال فعلی و کانال‌های قبلاً مشترک‌شده",
"app.language": "زبان",
"app.language.auto": "پیش‌فرض سیستم",
"app.language.de": "Deutsch",
@@ -352,7 +410,8 @@
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "زبان شما موجود نیست یا ترجمه‌ای اشتباه دیدید؟ در Weblate کمک کنید →",
"app.language.ru": "Русский (бета)",
"app.language.helpTranslate": "زبان شما موجود نیست یا ترجمه‌ای اشتباه دیدید؟ روش کمک کردن →",
"app.serverBanner": "نمایش بنر سرور",
"app.serverBanner.hint": "بنر مستقیماً از نشانی‌ای بارگیری می‌شود که مدیر سرور تعیین کرده است و آن میزبان نشانی IP شما را می‌بیند.",
"app.chatImages": "بارگیری تصاویر در گفتگو",
@@ -433,10 +492,13 @@
"publish.alphaTitle": "آلفا - ناپایدار، ممکن است هر زمان تغییر کند یا از کار بیفتد",
"publish.demoUnavailable": "پخش زنده در حالت دمو در دسترس نیست - به یک سرور واقعی TeamSpeak 6 نیاز دارد.",
"publish.alphaNote": "پخش زنده در مرحله آلفا است. این ویژگی از پروتکل مستندنشده Stream/Call در TeamSpeak 6 استفاده می‌کند، بنابراین اتصال، کیفیت تصویر و مدیریت بینندگان ممکن است بدون اطلاع قبلی دچار خطا شوند یا تغییر کنند. برای استفاده تولیدی مناسب نیست.",
"publish.start": "اشتراک‌گذاری صفحه",
"publish.start": "اشتراک‌گذاری صفحه یا دوربین",
"publish.stop": "توقف اشتراک‌گذاری",
"publish.title": "پخش زنده تو",
"publish.screen": "صفحه نمایش",
"publish.camera": "دوربین",
"publish.kind": "اشتراک‌گذاری",
"publish.kind.display": "صفحه / پنجره",
"publish.starting": "در حال شروع…",
"publish.viewers": "{count} بیننده",
"publish.request.allow": "اجازه دادن",
@@ -451,6 +513,7 @@
"publish.preset": "پیش‌تنظیم",
"publish.preset.presentation": "ارائه",
"publish.audio": "ضبط صدا",
"publish.audio.cameraHint": "با دوربین، صدای شما مثل همیشه از طریق میکروفون ارسال می‌شود.",
"publish.privacy": "حریم خصوصی",
"publish.privacy.public": "عمومی",
"publish.privacy.contacts": "مخاطبین",
@@ -653,6 +716,7 @@
"serverContext.addFavorite": "افزودن به نشانک‌ها",
"serverContext.disconnect": "قطع اتصال",
"connectError.dismiss": "رد کردن",
"connectError.gatewayFull": "گیت‌وی در حال حاضر پر است. چند دقیقه دیگر دوباره امتحان کنید – یا WebSpeak3 را خودتان میزبانی کنید: github.com/WebSpeak3/webspeak3",
"dialog.close": "بستن",
"sounds.title": "صداها",
"sounds.subtitle": "پیکربندی اعلان‌های صوتی برای رویدادها",
@@ -666,6 +730,9 @@
"sounds.event.message": "پیام دریافت شد",
"sounds.event.poke": "سقلمه دریافت شد",
"sounds.event.mute": "تغییر حالت بی‌صدا",
"sounds.event.micClickOn": "کلیک میکروفون روشن",
"sounds.event.micClickOff": "کلیک میکروفون خاموش",
"sounds.event.whisper": "نجوا دریافت شد",
"sounds.default": "پیش‌فرض",
"sounds.custom": "فایل سفارشی: {name}",
"sounds.test": "▶ آزمایش",
@@ -696,5 +763,250 @@
"about.text": "WebSpeak3 یک کلاینت TeamSpeak برای مرورگر است، متن‌باز و بدون نیاز به نصب.",
"about.memorial.title": "به یاد Akimo",
"about.memorial.text": "در ۲۱ اکتبر ۲۰۲۶ از پل رنگین‌کمان گذشت. 🌈🐾",
"about.close": "بستن"
"about.close": "بستن",
"menu.extras.fileTransfers": "انتقال فایل‌ها",
"transfers.title": "انتقال فایل‌ها",
"transfers.empty": "انتقالی وجود ندارد.",
"transfers.up": "آپلود",
"transfers.down": "دانلود",
"transfers.status.queued": "در صف",
"transfers.status.running": "در حال انجام",
"transfers.status.done": "تمام شد",
"transfers.status.error": "ناموفق",
"transfers.clearFinished": "حذف تمام‌شده‌ها",
"transfers.finished": "انتقال تمام شد: {name}",
"downloadSettings.subtitle": "تنظیمات دانلود",
"downloadSettings.directory": "پوشه دانلود",
"downloadSettings.directoryLabel": "پوشه برای دانلودها:",
"downloadSettings.browserDefault": "پیش‌فرض مرورگر",
"downloadSettings.change": "تغییر",
"downloadSettings.reset": "بازنشانی",
"downloadSettings.alwaysDir": "همیشه در این پوشه ذخیره شود",
"downloadSettings.askEachTime": "هر بار پوشه دانلود پرسیده شود",
"downloadSettings.unsupported": "این مرورگر نمی‌تواند پوشه انتخاب کند؛ دانلودها در پوشه دانلود مرورگر ذخیره می‌شوند.",
"downloadSettings.interface": "رابط",
"downloadSettings.showWindowOnStart": "نمایش پنجره انتقال فایل هنگام شروع دانلود",
"downloadSettings.closeWindowWhenDone": "بستن پنجره انتقال فایل پس از پایان همه دانلودها",
"downloadSettings.popupWhenDone": "نمایش پیام پس از پایان انتقال",
"downloadSettings.uploadLimit": "پهنای باند آپلود",
"downloadSettings.downloadLimit": "پهنای باند دانلود",
"downloadSettings.maxUploads": "آپلودهای همزمان",
"downloadSettings.maxDownloads": "دانلودهای همزمان",
"downloadSettings.unlimited": "بدون محدودیت",
"downloadSettings.limitedTo": "محدود به",
"chatSettings.subtitle": "تنظیمات چت",
"chatSettings.window": "پنجره چت",
"chatSettings.maxLines": "حداکثر تعداد خطوط:",
"chatSettings.font": "قلم:",
"chatSettings.fontDefault": "پیش‌فرض",
"chatSettings.fontReset": "بازنشانی قلم",
"chatSettings.fontPreview": "چت با این قلم این‌گونه دیده می‌شود.",
"chatSettings.autoLog": "ثبت خودکار",
"chatSettings.logChannel": "ثبت چت‌های کانال",
"chatSettings.logPrivate": "ثبت چت‌های خصوصی",
"chatSettings.logServer": "ثبت چت‌های سرور",
"chatSettings.logHint": "گزارش‌ها فقط در این مرورگر ذخیره می‌شوند (۱۰۰۰ خط آخر هر چت).",
"chatSettings.restore": "بارگذاری گزارش‌ها",
"chatSettings.restoreChannelLines": "بارگذاری گزارش چت کانال",
"chatSettings.restorePrivateLines": "بارگذاری گزارش چت خصوصی",
"chatSettings.notify": "اعلان برای پیام‌های ورودی",
"chatSettings.notifyServer": "سرور",
"chatSettings.notifyChannel": "کانال",
"chatSettings.notifyPrivate": "خصوصی",
"chatSettings.linesUnit": "خط",
"chatSettings.last": "آخرین",
"securitySettings.subtitle": "تنظیمات امنیتی",
"securitySettings.passwords": "رمزها",
"securitySettings.saveChannelPasswords": "ذخیره رمز کانال‌ها",
"securitySettings.clearChannelPasswords": "حذف رمز کانال‌ها",
"securitySettings.channelPasswordsCleared": "رمزهای ذخیره‌شده کانال حذف شدند.",
"securitySettings.masterPassword": "استفاده از رمز اصلی",
"securitySettings.changeMasterPassword": "تغییر رمز اصلی",
"securitySettings.cleanup": "پاک‌سازی",
"securitySettings.clearCacheOnExit": "خالی کردن حافظه نهان هنگام خروج",
"securitySettings.clearUrlsOnExit": "حذف URLها هنگام خروج",
"securitySettings.clearCache": "خالی کردن حافظه نهان",
"securitySettings.cacheCleared": "حافظه نهان خالی شد.",
"securitySettings.identities": "هویت‌ها",
"securitySettings.manageIdentities": "مدیریت هویت‌ها",
"notify.connection": "اتصال",
"notify.connected": "به سرور متصل شد",
"notify.disconnected": "از سرور قطع شد",
"notify.lostConnection": "اتصال به سرور از دست رفت",
"notify.channel": "کانال",
"notify.created": "ایجاد شد",
"notify.deleted": "حذف شد",
"notify.edited": "ویرایش شد",
"notify.moved": "جابجا شد",
"notify.currentChannel": "کانال فعلی",
"notify.otherChannel": "کانال دیگر",
"notify.byYou": "توسط شما",
"notify.byOther": "توسط کلاینت دیگر",
"notify.server": "سرور",
"notify.insufficientPermissions": "دسترسی ناکافی",
"notify.error": "خطا",
"notify.client": "کلاینت",
"notify.switched": "کانال را عوض کرد",
"notify.movedClient": "منتقل شد",
"notify.kickedChannel": "از کانال اخراج شد",
"notify.kickedServer": "از سرور اخراج شد",
"notify.banned": "مسدود شد",
"notify.toCurrent": "به کانال فعلی",
"notify.fromCurrent": "از کانال فعلی",
"notify.toOther": "به کانال دیگر",
"notify.appears": "ظاهر می‌شود",
"notify.stays": "قابل مشاهده می‌ماند",
"notify.disappears": "ناپدید می‌شود",
"notify.serverGroup": "گروه سرور",
"notify.channelGroup": "گروه کانال تغییر کرد",
"notify.added": "اضافه شد",
"notify.removed": "حذف شد",
"notify.byServer": "توسط سرور",
"notify.byUser": "توسط کاربر",
"notify.recording": "ضبط",
"notify.recordingStart": "ضبط شروع شد",
"notify.recordingStop": "ضبط متوقف شد",
"notify.recordingInChannel": "ضبط در کانال فعال است",
"notify.talkPowerRequested": "درخواست اجازه صحبت",
"notify.self": "خود",
"notify.youSwitched": "کانال را عوض کردید",
"notify.youMoved": "به کانال دیگری منتقل شدید",
"notify.youKickedServer": "از سرور اخراج شدید",
"notify.youKickedChannel": "از کانال اخراج شدید",
"notify.youBanned": "مسدود شدید",
"notify.talkPowerGranted": "اجازه صحبت داده شد",
"notify.talkPowerRevoked": "اجازه صحبت گرفته شد",
"notify.chat": "گفتگو",
"notify.messageSent": "پیام ارسال شد",
"notify.messageReceived": "پیام دریافت شد",
"notify.capture": "ضبط صدا",
"notify.playback": "پخش صدا",
"notify.muted": "بی‌صدا شد",
"notify.unmuted": "فعال شد",
"notify.status": "وضعیت",
"notify.away": "غایب",
"notify.present": "برگشت",
"notify.other": "سایر",
"notify.poked": "سقلمه خوردید",
"notify.transferComplete": "انتقال فایل کامل شد",
"notify.transferFailed": "انتقال فایل ناموفق بود",
"notify.whisperListEmpty": "فهرست نجوا خالی است",
"notify.whisperTargetNotFound": "هدف نجوا پیدا نشد",
"notify.whisperTooMany": "اهداف نجوا بیش از حد",
"notify.special": "ویژه",
"notify.micClickOtherOn": "کلیک میکروفون دیگران روشن",
"notify.micClickOtherOff": "کلیک میکروفون دیگران خاموش",
"notify.micClickSelfOn": "کلیک میکروفون خود روشن",
"notify.micClickSelfOff": "کلیک میکروفون خود خاموش",
"notify.whisperNotify": "اعلان نجوا",
"notify.soundTest": "آزمایش صدا",
"notify.test3d": "آزمایش سه‌بعدی",
"notify.talkingWhileMuted": "صحبت در حالت بی‌صدا",
"notify.subtitle": "تنظیم اعلان‌ها",
"notify.soundPack": "بسته صدا:",
"notify.pack.builtin": "پیش‌فرض WebSpeak3",
"notify.pack.none": "بدون صدا",
"notify.importPack": "وارد کردن بسته صدای TS3 (.ts3_soundpack / .zip)",
"notify.deletePack": "حذف بسته صدا",
"notify.deletePackConfirm": "بسته صدای \"{name}\" حذف شود؟",
"notify.importFailed": "این یک بسته صدای معتبر TS3 نیست (settings.ini وجود ندارد).",
"notify.whenMuted": "وقتی خروجی بی‌صداست:",
"notify.whenMuted.all": "پخش همه صداها",
"notify.whenMuted.none": "هیچ صدایی پخش نشود",
"notify.hintBefore": "توجه: بسته صدا را می‌توان برای هر ",
"notify.hintLink": "مورد علاقه",
"notify.hintAfter": "جداگانه تنظیم کرد.",
"notify.col.action": "رویداد",
"notify.col.script": "اسکریپت صدا",
"notify.col.text": "محل متن",
"notify.text.server": "سرور",
"notify.text.channel": "کانال",
"notify.resetAll": "بازنشانی همه تغییرات",
"notify.applyToFavorites": "استفاده از این بسته صدا برای همه موارد علاقه",
"notify.applyToFavoritesConfirm": "همه موارد علاقه روی این بسته صدا تنظیم شوند؟ بسته‌های صدای جداگانه بازنشانی می‌شوند.",
"notify.whenMuted.important": "فقط صداهای مهم پخش شوند",
"notify.text.client": "کلاینت",
"vault.title": "رمز اصلی",
"vault.prompt": "هویت‌ها و رمزهای ذخیره‌شده شما رمزنگاری شده‌اند. رمز اصلی را وارد کنید.",
"vault.unlock": "باز کردن",
"vault.wrong": "رمز اشتباه است.",
"vault.forgot": "رمز را فراموش کرده‌ام",
"vault.forgotConfirm": "بدون رمز، داده‌ها قابل بازیابی نیستند. هویت‌ها، موارد علاقه و رمزهای ذخیره‌شده برای همیشه حذف شوند و از نو شروع کنید؟",
"securitySettings.masterHint": "هویت‌ها، موارد علاقه (با رمزها) و رمزهای ذخیره‌شده کانال را رمزنگاری می‌کند. پس از هر بارگذاری پرسیده می‌شود.",
"securitySettings.masterCurrent": "رمز اصلی فعلی",
"securitySettings.masterNew": "رمز اصلی جدید",
"securitySettings.masterRepeat": "تکرار",
"securitySettings.masterMismatch": "رمزها یکسان نیستند.",
"securitySettings.masterNote": "باید آن را در هر جلسهٔ جدید (بارگذاری دوباره یا زبانهٔ جدید) دوباره وارد کنید. آن را به خاطر بسپارید: بدون آن، هویت‌ها و رمزهای ذخیره‌شده از دست می‌روند.",
"sync.subtitle": "داده‌های تو روی همه دستگاه‌ها",
"sync.intro": "حساب فقط یک شماره تصادفی است، در صورت تمایل با رمز عبور. بدون ایمیل، بدون نام. همه چیز پیش از بارگذاری روی دستگاه تو رمزگذاری می‌شود. سرور فقط داده‌های ناخوانا می‌بیند.",
"sync.create.title": "حساب جدید",
"sync.create.withPassword": "یک رمز عبور تصادفی هم بساز (پیشنهادی)",
"sync.create.withPasswordHint": "بدون رمز عبور، شماره حساب به‌تنهایی برای دسترسی به داده‌هایت کافی است.",
"sync.create.button": "ساخت حساب",
"sync.create.busy": "در حال ساخت حساب …",
"sync.login.title": "حساب موجود",
"sync.number": "شماره حساب",
"sync.password": "رمز عبور",
"sync.passwordOptional": "رمز عبور (در صورت وجود)",
"sync.login.hint": "پس از آن داده‌های حساب جایگزین داده‌های این دستگاه می‌شوند.",
"sync.login.button": "ورود",
"sync.server": "سرور همگام‌سازی",
"sync.serverDefault": "پیش‌فرض (سرور رسمی WebSpeak3)",
"sync.serverHint": "برای سرور رسمی خالی بگذار. هر حساب فقط روی سروری وجود دارد که روی آن ساخته شده است.",
"sync.account.title": "حساب تو",
"sync.copy": "کپی",
"sync.copied": "کپی شد",
"sync.show": "نمایش",
"sync.hide": "پنهان",
"sync.noPassword": "بدون رمز عبور",
"sync.keepSafe": "شماره و رمز عبور را در جای امن نگه دار. اگر گم شوند، هیچ‌کس نمی‌تواند داده‌هایت را بازیابی کند، حتی ما.",
"sync.recoveryFile": "دانلود فایل بازیابی",
"sync.qr.show": "نمایش کد QR",
"sync.qr.hide": "پنهان کردن کد QR",
"sync.qr.hint": "با دستگاه دیگر اسکن کن تا آنجا وارد شوی. هر کسی این کد را ببیند به حسابت دسترسی دارد.",
"sync.password.add": "افزودن رمز عبور",
"sync.password.remove": "حذف رمز عبور",
"sync.password.addConfirm": "یک رمز عبور تصادفی جدید ساخته شود؟ دستگاه‌های دیگر باید با شماره و رمز عبور دوباره وارد شوند.",
"sync.password.removeConfirm": "رمز عبور حذف شود؟ آن‌گاه شماره حساب به‌تنهایی کافی است. دستگاه‌های دیگر باید دوباره وارد شوند.",
"sync.categories": "همگام‌سازی",
"sync.category.identities": "هویت‌ها (شامل کلیدهای خصوصی)",
"sync.category.favorites": "علاقه‌مندی‌ها، رمز کانال‌ها و مخاطبان",
"sync.category.settings": "تنظیمات",
"sync.category.designs": "طرح‌ها و بسته‌های آیکون",
"sync.category.whisper": "فهرست‌های نجوا",
"sync.categoriesHint": "دستگاه‌های صوتی، حجم صدا، کلید PTT و گزارش‌های چت همیشه روی دستگاه می‌مانند.",
"sync.status": "وضعیت",
"sync.status.syncing": "در حال همگام‌سازی …",
"sync.status.last": "آخرین همگام‌سازی: {time}",
"sync.status.never": "هنوز همگام‌سازی نشده",
"sync.conflict.title": "همگام‌سازی",
"sync.conflict.text": "از آخرین همگام‌سازی، هم این دستگاه و هم حساب تغییر کرده‌اند. کدام معتبر باشد؟",
"sync.conflict.local": "بارگذاری داده‌های این دستگاه",
"sync.conflict.server": "بارگیری داده‌های حساب",
"sync.syncNow": "همگام‌سازی اکنون",
"sync.serverInfo": "سرور: {server}",
"sync.logout": "خروج",
"sync.logoutConfirm": "این دستگاه از حساب خارج شود؟ حساب و داده‌هایش حفظ می‌شوند.",
"sync.delete": "حذف حساب",
"sync.deleteConfirm": "حساب و همه داده‌هایش روی سرور برای همیشه حذف شود؟ داده‌های این دستگاه باقی می‌مانند.",
"sync.link.title": "اتصال به حساب",
"sync.link.prompt": "این دستگاه به حساب {number} متصل شود؟ داده‌های حساب جایگزین داده‌های این دستگاه می‌شوند.",
"sync.link.connect": "اتصال",
"sync.error.password_required": "این حساب رمز عبور دارد.",
"sync.error.unreachable": "سرور همگام‌سازی در دسترس نیست.",
"sync.error.not_found": "حساب پیدا نشد یا رمز عبور اشتباه است. اگر رمز عبور روی دستگاه دیگری تغییر کرده، دوباره وارد شو.",
"sync.error.rate_limited": "درخواست‌ها بیش از حد است، لطفاً بعداً دوباره امتحان کن.",
"sync.error.full": "سرور همگام‌سازی فعلاً حساب جدید نمی‌پذیرد.",
"sync.error.pow_required": "بررسی امنیتی ناموفق بود، دوباره امتحان کن.",
"sync.error.conflict": "دستگاه دیگری در این فاصله چیزی را تغییر داده است.",
"sync.error.payload_too_large": "داده برای همگام‌سازی بیش از حد است (حداکثر ۱ مگابایت).",
"sync.error.generic": "همگام‌سازی ناموفق بود.",
"mobile.tab.channels": "کانال‌ها",
"mobile.tab.chat": "گفتگو",
"mobile.tab.info": "اطلاعات",
"mobile.mic": "میکروفون",
"mobile.sound": "صدا",
"mobile.leave": "خروج",
"mobile.talk": "صحبت"
}
File diff suppressed because it is too large. Load diff
+319 -7
View File
@@ -69,6 +69,9 @@
"connect.serverType.auto": "自动",
"connect.serverType.teamspeak": "TeamSpeak",
"connect.serverType.teaspeak": "TeaSpeak",
"connect.serverType.ts2": "TeamSpeak 2(实验性)",
"connect.ts2LoginName": "TS2 账户名(留空 = 匿名):",
"connect.ts2LoginPassword": "TS2 账户密码:",
"connect.hotkeyProfile": "快捷键配置:",
"connect.soundPack": "声音包:",
"connect.more": "更多",
@@ -88,6 +91,7 @@
"inviteFriend.type": "邀请类型",
"inviteFriend.includeChannel": "包含当前频道",
"inviteFriend.link": "链接",
"inviteFriend.webspeak3Link": "WebSpeak3 链接",
"inviteFriend.addPermissionKey": "添加权限密钥",
"inviteFriend.copyToClipboard": "复制到剪贴板",
"inviteFriend.copied": "已复制!",
@@ -104,6 +108,17 @@
"whisperHistory.title": "悄悄话历史 - {server}",
"whisperHistory.empty": "暂无悄悄话历史。",
"whisperHistory.started": "正在向以下目标发送悄悄话:{targets}",
"whisperSettings.subtitle": "悄悄话设置",
"whisperSettings.rights": "传入悄悄话权限",
"whisperSettings.mode.allow": "使用联系人单独设置,否则允许",
"whisperSettings.mode.block": "使用联系人单独设置,否则禁止",
"whisperSettings.mode.blockAll": "全部禁止",
"whisperSettings.incoming": "传入悄悄话设置",
"whisperSettings.sound": "有人对你悄悄话时播放声音",
"whisperSettings.openHistory": "有人对你悄悄话时总是打开悄悄话记录",
"whisperSettings.clearAfter": "从悄悄话记录中移除客户端的时间",
"whisperSettings.minutes": "分钟",
"whisperHistory.received": "{name} 对你说了悄悄话",
"whisperHistory.stopped": "已停止悄悄话",
"whisperHistory.clear": "清除",
"whisperHistory.options": "选项",
@@ -180,6 +195,10 @@
"contacts.category.blocked": "已屏蔽",
"contacts.category.friend": "好友",
"contacts.phoneticName": "名称读音:",
"contacts.whisperSetting": "悄悄话:",
"contacts.whisperSetting.default": "默认",
"contacts.whisperSetting.allow": "允许",
"contacts.whisperSetting.block": "禁止",
"contacts.show": "显示",
"contacts.ignore": "忽略",
"contacts.unignore": "取消忽略",
@@ -212,6 +231,7 @@
"options.cancel": "取消",
"options.notImplemented": "此设置尚未实现。",
"options.section.anwendung": "应用",
"options.section.konto": "账户",
"options.section.wiedergabe": "播放",
"options.section.aufnahme": "录音",
"options.section.design": "外观",
@@ -220,13 +240,38 @@
"design.theme.standard.desc": "原始 WebSpeak3 设计。",
"design.theme.nova": "Nova",
"design.theme.nova.desc": "更现代的深色设计,带圆角元素。",
"design.theme.greenteaspeak": "GreenTeaSpeak",
"design.theme.greenteaspeak.desc": "经典 GreenTeaSpeak 客户端布局:深色面板与金色菜单栏。",
"design.theme.pulse": "Pulse",
"design.theme.pulse.desc": "卡片式布局,带面包屑栏和彩色强调。",
"design.theme.ide": "Command Center",
"design.theme.ide.desc": "面向高级用户的扁平化 IDE 风格技术布局。",
"design.idePixelFont": "像素终端字体",
"design.theme": "主题",
"design.customThemes": "自定义主题",
"design.iconPack": "图标包",
"design.manage": "管理主题和图标…",
"design.manage.title": "管理主题和图标",
"design.iconPack.none": "尚未安装图标包。",
"design.iconPack.import": "导入图标包",
"design.iconPack.importError": "无法将此文件读取为图标包。",
"design.iconPack.deleteConfirm": "确定删除此图标包?",
"design.iconPack.hint": "TeamSpeak 3 图标包(.ts3_iconpack)或包含同名图片的 ZIP。替换说话指示灯、麦克风/声音静音、离开、频道指挥官、频道和服务器图标。",
"design.notAvailable": "网页客户端暂不可用",
"design.gif": "GIF 动画支持",
"design.gif.avatars": "启用头像动画",
"design.gif.images": "启用图片动画",
"design.tree": "频道树",
"design.tree.expandAll": "连接时展开所有频道",
"design.tree.expandDepth": "展开到此层级的频道(0 = 全部)",
"design.tree.expandOwn": "连接时仅展开自己的频道",
"design.tree.clientsBelow": "将客户端排在子频道下方",
"design.tree.flags": "显示客户端旗帜",
"design.tree.overwolf": "显示 Overwolf 图标",
"design.tree.badges": "显示徽章",
"design.tree.groupIconsInMenus": "在右键菜单中显示组图标",
"design.tree.hideInaccessibleGroups": "在右键菜单中隐藏不可访问的组",
"design.tree.commanderLamp": "以指示灯显示频道指挥官",
"design.tree.awayMessage": "在昵称旁显示离开消息",
"design.tree.tooltips": "悬停时显示提示信息",
"design.status.connected": "已连接",
"options.section.erweiterungen": "扩展",
"options.section.hotkeys": "快捷键",
@@ -239,6 +284,19 @@
"options.section.sounds": "声音",
"app.title": "应用",
"app.subtitle": "常规应用设置",
"app.group.server": "服务器",
"app.group.misc": "其他",
"app.group.subscribe": "频道订阅行为",
"app.group.privacy": "隐私",
"app.micOnServerSwitch": "切换服务器时自动启用麦克风",
"app.reconnectAfterSleep": "睡眠模式后重新连接",
"app.middleClickQuickAccess": "在频道树中使用鼠标中键快速操作",
"app.updateFavoriteNickname": "自动更新收藏中的昵称",
"app.autoOpenChannelChat": "自动打开频道聊天",
"app.mutedTalkingSound": "麦克风静音时说话播放提示音",
"app.neverShowPokeDialog": "从不显示戳一下对话框",
"app.subscribe.all": "订阅所有频道",
"app.subscribe.current": "仅订阅当前及之前订阅的频道",
"app.language": "语言",
"app.language.auto": "跟随系统",
"app.language.de": "Deutsch",
@@ -246,7 +304,8 @@
"app.language.zh-CN": "简体中文",
"app.language.fa": "فارسی (بتا)",
"app.language.cs-CZ": "Čeština",
"app.language.helpTranslate": "没有你的语言,或发现翻译有误?欢迎到 Weblate 参与改进 →",
"app.language.ru": "Русский (бета)",
"app.language.helpTranslate": "没有你的语言,或发现翻译有误?了解如何参与 →",
"app.serverBanner": "显示服务器横幅",
"app.serverBanner.hint": "横幅直接从服务器管理员设置的地址加载,该主机会看到你的 IP 地址。",
"app.chatImages": "在聊天中加载图片",
@@ -499,6 +558,7 @@
"serverContext.addFavorite": "添加到收藏夹",
"serverContext.disconnect": "断开连接",
"connectError.dismiss": "关闭",
"connectError.gatewayFull": "网关当前已满。请几分钟后再试,或自行部署 WebSpeak3:github.com/WebSpeak3/webspeak3",
"dialog.close": "关闭",
"sounds.title": "声音",
"sounds.subtitle": "配置事件提示音",
@@ -512,6 +572,9 @@
"sounds.event.message": "收到消息",
"sounds.event.poke": "收到戳一戳",
"sounds.event.mute": "切换静音",
"sounds.event.micClickOn": "麦克风开启提示音",
"sounds.event.micClickOff": "麦克风关闭提示音",
"sounds.event.whisper": "收到悄悄话",
"sounds.default": "默认",
"sounds.custom": "自定义文件:{name}",
"sounds.test": "▶ 测试",
@@ -533,7 +596,7 @@
"menu.help.about": "关于 WebSpeak3",
"menu.help.github": "GitHub",
"menu.help.changelog": "更新日志",
"menu.help.translate": "参与翻译(Weblate)",
"menu.help.translate": "参与翻译(GitHub)",
"menu.extras.feedback": "发送反馈",
"feedback.fab.nudge": "你觉得 WebSpeak3 怎么样?欢迎反馈!",
"donate.label": "捐助",
@@ -573,7 +636,7 @@
"restartNotice.ack": "知道了",
"menu.extras.tos": "使用条款",
"tos.title": "client.webspeak3.de 使用条款",
"tos.rule1": "本客户端仅供通过浏览器私人、非商业使用 TeamSpeak / TeaSpeak / GreenTeaSpeak 服务器。",
"tos.rule1": "本客户端仅供通过浏览器私人、非商业使用 TeamSpeak / TeaSpeak / VoySpeak 服务器。",
"tos.rule2": "尤其禁止:任何违法行为、骚扰与仇恨言论、垃圾信息与刷屏、干扰服务运行,以及规避封禁。",
"tos.rule3": "违规可能导致访问权限被无预警封禁;严重情况可能会上报相关部门。",
"tos.rule4Pre": "出于运行安全和滥用检测的目的,连接信息(服务器地址、服务器名称、连接时间)会被记录,并在 90 天后自动删除 —— 详见",
@@ -642,10 +705,13 @@
"publish.alphaTitle": "内测阶段 —— 不稳定,可能随时变更或失效",
"publish.demoUnavailable": "演示模式下无法使用直播功能 —— 需要真实的 TeamSpeak 6 服务器。",
"publish.alphaNote": "直播功能处于内测阶段,使用的是 TeamSpeak 6 未公开文档的 Stream/Call 协议,因此连接、画质和观众处理可能会出错或在无预警的情况下发生变化,不建议用于正式场合。",
"publish.start": "共享屏幕",
"publish.start": "共享屏幕或摄像头",
"publish.stop": "停止共享",
"publish.title": "你的直播",
"publish.screen": "屏幕",
"publish.camera": "摄像头",
"publish.kind": "共享内容",
"publish.kind.display": "屏幕 / 窗口",
"publish.starting": "启动中…",
"publish.viewers": "{count} 人观看",
"publish.request.allow": "允许",
@@ -660,6 +726,7 @@
"publish.preset": "预设",
"publish.preset.presentation": "演示",
"publish.audio": "采集音频",
"publish.audio.cameraHint": "使用摄像头时,你的声音照常通过麦克风发送。",
"publish.privacy": "可见范围",
"publish.privacy.public": "公开",
"publish.privacy.contacts": "联系人",
@@ -696,5 +763,250 @@
"about.text": "WebSpeak3 是一款浏览器 TeamSpeak 客户端,开源且无需安装。",
"about.memorial.title": "纪念 Akimo",
"about.memorial.text": "于 2026 年 10 月 21 日走过彩虹桥。🌈🐾",
"about.close": "关闭"
"about.close": "关闭",
"menu.extras.fileTransfers": "文件传输",
"transfers.title": "文件传输",
"transfers.empty": "没有传输。",
"transfers.up": "上传",
"transfers.down": "下载",
"transfers.status.queued": "排队中",
"transfers.status.running": "进行中",
"transfers.status.done": "完成",
"transfers.status.error": "失败",
"transfers.clearFinished": "移除已完成",
"transfers.finished": "传输完成:{name}",
"downloadSettings.subtitle": "下载设置",
"downloadSettings.directory": "下载目录",
"downloadSettings.directoryLabel": "下载目录:",
"downloadSettings.browserDefault": "浏览器默认",
"downloadSettings.change": "更改",
"downloadSettings.reset": "重置",
"downloadSettings.alwaysDir": "始终保存到此目录",
"downloadSettings.askEachTime": "每次询问下载目录",
"downloadSettings.unsupported": "此浏览器无法选择文件夹;下载将保存到浏览器的下载文件夹。",
"downloadSettings.interface": "界面",
"downloadSettings.showWindowOnStart": "开始下载时显示文件传输窗口",
"downloadSettings.closeWindowWhenDone": "所有下载完成后关闭文件传输窗口",
"downloadSettings.popupWhenDone": "传输完成时显示弹出提示",
"downloadSettings.uploadLimit": "上传带宽",
"downloadSettings.downloadLimit": "下载带宽",
"downloadSettings.maxUploads": "同时上传数",
"downloadSettings.maxDownloads": "同时下载数",
"downloadSettings.unlimited": "不限制",
"downloadSettings.limitedTo": "限制为",
"chatSettings.subtitle": "聊天设置",
"chatSettings.window": "聊天窗口",
"chatSettings.maxLines": "最大行数:",
"chatSettings.font": "字体:",
"chatSettings.fontDefault": "默认",
"chatSettings.fontReset": "重置字体",
"chatSettings.fontPreview": "使用此字体时聊天的样子。",
"chatSettings.autoLog": "自动记录",
"chatSettings.logChannel": "记录频道聊天",
"chatSettings.logPrivate": "记录私聊",
"chatSettings.logServer": "记录服务器聊天",
"chatSettings.logHint": "记录只保存在此浏览器中(每个聊天最近 1000 行)。",
"chatSettings.restore": "加载记录",
"chatSettings.restoreChannelLines": "加载频道聊天记录",
"chatSettings.restorePrivateLines": "加载私聊记录",
"chatSettings.notify": "新消息提示",
"chatSettings.notifyServer": "服务器",
"chatSettings.notifyChannel": "频道",
"chatSettings.notifyPrivate": "私聊",
"chatSettings.linesUnit": "行",
"chatSettings.last": "最近",
"securitySettings.subtitle": "安全设置",
"securitySettings.passwords": "密码",
"securitySettings.saveChannelPasswords": "保存频道密码",
"securitySettings.clearChannelPasswords": "删除频道密码",
"securitySettings.channelPasswordsCleared": "已删除保存的频道密码。",
"securitySettings.masterPassword": "使用主密码",
"securitySettings.changeMasterPassword": "更改主密码",
"securitySettings.cleanup": "清理",
"securitySettings.clearCacheOnExit": "退出时清空缓存",
"securitySettings.clearUrlsOnExit": "退出时删除 URL",
"securitySettings.clearCache": "清空缓存",
"securitySettings.cacheCleared": "缓存已清空。",
"securitySettings.identities": "身份",
"securitySettings.manageIdentities": "管理身份",
"notify.connection": "连接",
"notify.connected": "已连接到服务器",
"notify.disconnected": "已从服务器断开",
"notify.lostConnection": "与服务器的连接丢失",
"notify.channel": "频道",
"notify.created": "已创建",
"notify.deleted": "已删除",
"notify.edited": "已编辑",
"notify.moved": "已移动",
"notify.currentChannel": "当前频道",
"notify.otherChannel": "其他频道",
"notify.byYou": "由你",
"notify.byOther": "由其他客户端",
"notify.server": "服务器",
"notify.insufficientPermissions": "权限不足",
"notify.error": "错误",
"notify.client": "客户端",
"notify.switched": "切换频道",
"notify.movedClient": "被移动",
"notify.kickedChannel": "被踢出频道",
"notify.kickedServer": "被踢出服务器",
"notify.banned": "被封禁",
"notify.toCurrent": "进入当前频道",
"notify.fromCurrent": "离开当前频道",
"notify.toOther": "进入其他频道",
"notify.appears": "出现",
"notify.stays": "仍可见",
"notify.disappears": "消失",
"notify.serverGroup": "服务器组",
"notify.channelGroup": "频道组已更改",
"notify.added": "已添加",
"notify.removed": "已移除",
"notify.byServer": "由服务器",
"notify.byUser": "由用户",
"notify.recording": "录音",
"notify.recordingStart": "开始录音",
"notify.recordingStop": "停止录音",
"notify.recordingInChannel": "频道内正在录音",
"notify.talkPowerRequested": "请求发言权",
"notify.self": "自己",
"notify.youSwitched": "切换了频道",
"notify.youMoved": "被移动到其他频道",
"notify.youKickedServer": "被踢出服务器",
"notify.youKickedChannel": "被踢出频道",
"notify.youBanned": "被封禁",
"notify.talkPowerGranted": "获得发言权",
"notify.talkPowerRevoked": "发言权被撤销",
"notify.chat": "聊天",
"notify.messageSent": "消息已发送",
"notify.messageReceived": "收到消息",
"notify.capture": "声音采集",
"notify.playback": "声音播放",
"notify.muted": "已静音",
"notify.unmuted": "已取消静音",
"notify.status": "状态",
"notify.away": "离开",
"notify.present": "回来",
"notify.other": "其他",
"notify.poked": "被戳",
"notify.transferComplete": "文件传输完成",
"notify.transferFailed": "文件传输失败",
"notify.whisperListEmpty": "悄悄话列表为空",
"notify.whisperTargetNotFound": "未找到悄悄话目标",
"notify.whisperTooMany": "悄悄话目标过多",
"notify.special": "特殊",
"notify.micClickOtherOn": "他人麦克风开",
"notify.micClickOtherOff": "他人麦克风关",
"notify.micClickSelfOn": "自己麦克风开",
"notify.micClickSelfOff": "自己麦克风关",
"notify.whisperNotify": "悄悄话提示",
"notify.soundTest": "声音测试",
"notify.test3d": "3D 测试",
"notify.talkingWhileMuted": "静音时说话",
"notify.subtitle": "配置通知",
"notify.soundPack": "声音包:",
"notify.pack.builtin": "WebSpeak3 默认",
"notify.pack.none": "无声音",
"notify.importPack": "导入 TS3 声音包 (.ts3_soundpack / .zip)",
"notify.deletePack": "删除声音包",
"notify.deletePackConfirm": "删除声音包 \"{name}\"?",
"notify.importFailed": "这不是有效的 TS3 声音包(缺少 settings.ini)。",
"notify.whenMuted": "输出静音时:",
"notify.whenMuted.all": "播放所有声音",
"notify.whenMuted.none": "不播放声音",
"notify.hintBefore": "提示:可以为每个",
"notify.hintLink": "收藏",
"notify.hintAfter": "单独设置声音包。",
"notify.col.action": "动作",
"notify.col.script": "声音脚本",
"notify.col.text": "文本位置",
"notify.text.server": "服务器",
"notify.text.channel": "频道",
"notify.resetAll": "重置所有更改",
"notify.applyToFavorites": "将此声音包用于所有收藏",
"notify.applyToFavoritesConfirm": "将所有收藏设为此声音包?单个收藏的声音包设置将被重置。",
"notify.whenMuted.important": "仅播放重要声音",
"notify.text.client": "客户端",
"vault.title": "主密码",
"vault.prompt": "你的身份和已保存的密码已加密。请输入主密码。",
"vault.unlock": "解锁",
"vault.wrong": "密码错误。",
"vault.forgot": "忘记密码",
"vault.forgotConfirm": "没有密码无法恢复数据。永久删除身份、收藏和已保存的密码并重新开始?",
"securitySettings.masterHint": "加密身份、收藏(含密码)和已保存的频道密码。每次重新加载后都会询问。",
"securitySettings.masterCurrent": "当前主密码",
"securitySettings.masterNew": "新主密码",
"securitySettings.masterRepeat": "重复",
"securitySettings.masterMismatch": "两次密码不一致。",
"securitySettings.masterNote": "每次新会话(重新加载或新标签页)都需要重新输入。请牢记:没有它,身份和已保存的密码将丢失。",
"sync.subtitle": "在所有设备上使用你的数据",
"sync.intro": "账户只是一个随机号码,可选附加密码。无需邮箱,无需姓名。所有数据在上传前都会在你的设备上加密,服务器只能看到无法读取的数据。",
"sync.create.title": "新账户",
"sync.create.withPassword": "同时生成随机密码(推荐)",
"sync.create.withPasswordHint": "没有密码时,仅凭账户号码就能访问你的数据。",
"sync.create.button": "创建账户",
"sync.create.busy": "正在创建账户 …",
"sync.login.title": "已有账户",
"sync.number": "账户号码",
"sync.password": "密码",
"sync.passwordOptional": "密码(如有)",
"sync.login.hint": "之后账户中的数据将替换此设备上的数据。",
"sync.login.button": "登录",
"sync.server": "同步服务器",
"sync.serverDefault": "默认(WebSpeak3 官方服务器)",
"sync.serverHint": "留空则使用官方服务器。账户只存在于创建它的服务器上。",
"sync.account.title": "你的账户",
"sync.copy": "复制",
"sync.copied": "已复制",
"sync.show": "显示",
"sync.hide": "隐藏",
"sync.noPassword": "无密码",
"sync.keepSafe": "请妥善保管号码和密码。一旦丢失,任何人都无法恢复你的数据,包括我们。",
"sync.recoveryFile": "下载恢复文件",
"sync.qr.show": "显示二维码",
"sync.qr.hide": "隐藏二维码",
"sync.qr.hint": "用另一台设备扫描即可在那里登录。看到此二维码的人都能访问你的账户。",
"sync.password.add": "添加密码",
"sync.password.remove": "移除密码",
"sync.password.addConfirm": "生成新的随机密码?其他设备之后需要用号码和密码重新登录。",
"sync.password.removeConfirm": "移除密码?之后仅凭账户号码即可访问。其他设备需要重新登录。",
"sync.categories": "同步内容",
"sync.category.identities": "身份(包括私钥)",
"sync.category.favorites": "收藏、频道密码和联系人",
"sync.category.settings": "设置",
"sync.category.designs": "主题和图标包",
"sync.category.whisper": "悄悄话列表",
"sync.categoriesHint": "音频设备、音量、按键通话键和聊天记录始终保留在本设备上。",
"sync.status": "状态",
"sync.status.syncing": "正在同步 …",
"sync.status.last": "上次同步:{time}",
"sync.status.never": "尚未同步",
"sync.conflict.title": "同步",
"sync.conflict.text": "自上次同步以来,此设备和账户都有更改。以哪个为准?",
"sync.conflict.local": "上传此设备的数据",
"sync.conflict.server": "加载账户中的数据",
"sync.syncNow": "立即同步",
"sync.serverInfo": "服务器:{server}",
"sync.logout": "退出登录",
"sync.logoutConfirm": "将此设备退出账户?账户及其数据会保留。",
"sync.delete": "删除账户",
"sync.deleteConfirm": "永久删除服务器上的账户及其所有数据?此设备上的数据会保留。",
"sync.link.title": "连接账户",
"sync.link.prompt": "将此设备连接到账户 {number}?账户中的数据将替换此设备上的数据。",
"sync.link.connect": "连接",
"sync.error.password_required": "此账户设有密码。",
"sync.error.unreachable": "无法连接同步服务器。",
"sync.error.not_found": "账户不存在或密码错误。如果密码已在其他设备上更改,请重新登录。",
"sync.error.rate_limited": "请求过多,请稍后再试。",
"sync.error.full": "同步服务器暂不接受新账户。",
"sync.error.pow_required": "安全检查失败,请重试。",
"sync.error.conflict": "另一台设备在此期间做了更改。",
"sync.error.payload_too_large": "同步数据过多(最多 1 MB)。",
"sync.error.generic": "同步失败。",
"mobile.tab.channels": "频道",
"mobile.tab.chat": "聊天",
"mobile.tab.info": "信息",
"mobile.mic": "麦克风",
"mobile.sound": "声音",
"mobile.leave": "断开",
"mobile.talk": "说话"
}
+173 -8
View File
@@ -1,12 +1,177 @@
import './storageFallback'
import { StrictMode } from 'react'
import { StrictMode, useState, type FormEvent, type ReactNode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import './styles/greenteaspeak.css'
import App from './App.tsx'
import './App.css'
import { LanguageProvider, useT } from './i18n'
import { discardVault, hasVault, unlockVault } from './vault'
import {
SYNC_CATEGORIES,
accountInfo,
formatAccountNumber,
loginSyncAccount,
normalizePassword,
pullAtStartup,
resolveConflict,
startAutoSync,
syncErrorKey,
takeSyncLink,
} from './sync'
createRoot(document.getElementById('root')!).render(
<StrictMode>
<App />
</StrictMode>,
)
const root = createRoot(document.getElementById('root')!)
// App reads its stored identities/favorites while loading, so it's imported only after the vault is open
// and the sync account (Options -> Konto) had its chance to bring in newer data.
async function start() {
const { default: App } = await import('./App.tsx')
startAutoSync()
root.render(
<StrictMode>
<App />
</StrictMode>,
)
}
const dialog = (node: ReactNode) => root.render(<LanguageProvider>{node}</LanguageProvider>)
async function boot() {
const link = takeSyncLink()
if (link) return dialog(<SyncLinkDialog link={link} />)
// Don't hold the client hostage to a slow sync server.
const deadline = Date.now() + 5000
const result = await Promise.race([
pullAtStartup(deadline),
new Promise<'ok'>((resolve) => setTimeout(() => resolve('ok'), 5000)),
])
if (result === 'conflict') return dialog(<SyncConflictDialog />)
void start()
}
/** Opened through the QR code / link from Options -> Konto on another device. */
function SyncLinkDialog({ link }: { link: { number: string; password?: string; server: string } }) {
const t = useT()
const [password, setPassword] = useState(link.password ?? '')
const [askPassword, setAskPassword] = useState(false)
const [error, setError] = useState('')
const [busy, setBusy] = useState(false)
const submit = async (e: FormEvent) => {
e.preventDefault()
setBusy(true)
setError('')
try {
if (!password) {
const info = await accountInfo(link.number, link.server)
if (!info.exists) throw new Error('not_found')
if (info.hasPassword) {
setAskPassword(true)
setBusy(false)
return
}
}
await loginSyncAccount(link.number, password ? normalizePassword(password) : undefined, link.server, SYNC_CATEGORIES)
void start()
} catch (err) {
setError(t(syncErrorKey(err)))
setBusy(false)
}
}
return (
<div className="ts-dialog-backdrop">
<form className="ts-dialog ts-vault-dialog" onSubmit={submit}>
<h3>{t('sync.link.title')}</h3>
<p>{t('sync.link.prompt', { number: formatAccountNumber(link.number) })}</p>
{askPassword && (
<label className="ts-dialog-field">
{t('sync.password')}
<input autoFocus value={password} onChange={(e) => setPassword(e.target.value)} />
</label>
)}
{error && <p className="ts-vault-wrong">{error}</p>}
<div className="ts-dialog-buttons">
<button type="button" onClick={() => void start()}>
{t('dialog.cancel')}
</button>
<button type="submit" disabled={busy || (askPassword && !password)}>
{t('sync.link.connect')}
</button>
</div>
</form>
</div>
)
}
function SyncConflictDialog() {
const t = useT()
const [busy, setBusy] = useState(false)
const take = async (side: 'server' | 'local') => {
setBusy(true)
try {
await resolveConflict(side)
} finally {
void start()
}
}
return (
<div className="ts-dialog-backdrop">
<div className="ts-dialog ts-vault-dialog">
<h3>{t('sync.conflict.title')}</h3>
<p>{t('sync.conflict.text')}</p>
<div className="ts-dialog-buttons">
<button disabled={busy} onClick={() => void take('local')}>
{t('sync.conflict.local')}
</button>
<button disabled={busy} onClick={() => void take('server')}>
{t('sync.conflict.server')}
</button>
</div>
</div>
</div>
)
}
function Unlock() {
const t = useT()
const [password, setPassword] = useState('')
const [wrong, setWrong] = useState(false)
const [busy, setBusy] = useState(false)
const submit = async (e: FormEvent) => {
e.preventDefault()
setBusy(true)
if (await unlockVault(password)) return void boot()
setBusy(false)
setWrong(true)
}
return (
<div className="ts-dialog-backdrop">
<form className="ts-dialog ts-vault-dialog" onSubmit={submit}>
<h3>{t('vault.title')}</h3>
<p>{t('vault.prompt')}</p>
<input type="password" autoFocus value={password} onChange={(e) => setPassword(e.target.value)} />
{wrong && <p className="ts-vault-wrong">{t('vault.wrong')}</p>}
<div className="ts-dialog-buttons">
<button
type="button"
onClick={() => {
if (!window.confirm(t('vault.forgotConfirm'))) return
discardVault()
void boot()
}}
>
{t('vault.forgot')}
</button>
<button type="submit" disabled={busy || !password}>
{t('vault.unlock')}
</button>
</div>
</form>
</div>
)
}
if (hasVault())
root.render(
<LanguageProvider>
<Unlock />
</LanguageProvider>,
)
else void boot()
+323
View File
@@ -0,0 +1,323 @@
import { unzipSync } from "fflate";
import { SOUND_EVENTS, playSound, playSoundBlob, type SoundEventId } from "./sounds";
/** Options -> Meldungen: TS3's notification tree. Keys are TeamSpeak's own
* sound pack keys, so a real .ts3_soundpack's settings.ini maps 1:1. */
export interface NotificationNode {
/** Locale key under "notify.". */
label: string;
key?: string;
children?: NotificationNode[];
}
const leaf = (label: string, key: string): NotificationNode => ({ label, key });
const group = (label: string, children: NotificationNode[]): NotificationNode => ({ label, children });
const byWho = (p: string) => [leaf("byYou", `${p}_BY_YOU`), leaf("byOther", `${p}_BY_OTHER`)];
const where = (p: string) => [leaf("server", `${p}_SERVER`), leaf("currentChannel", `${p}_CURRENT_CHANNEL`)];
const byServerUser = (p: string) => [leaf("byServer", `${p}_BY_SERVER`), leaf("byUser", `${p}_BY_USER`)];
const moves = (p: string) => [
group("toCurrent", [leaf("appears", `${p}_TO_CURRENT_CHANNEL_APPEARS`), leaf("stays", `${p}_TO_CURRENT_CHANNEL_STAYS`)]),
group("fromCurrent", [
leaf("disappears", `${p}_FROM_CURRENT_CHANNEL_DISAPPEARS`),
leaf("stays", `${p}_FROM_CURRENT_CHANNEL_STAYS`),
]),
group("toOther", [
leaf("appears", `${p}_TO_OTHER_CHANNEL_APPEARS`),
leaf("disappears", `${p}_TO_OTHER_CHANNEL_DISAPPEARS`),
leaf("stays", `${p}_TO_OTHER_CHANNEL_STAYS`),
]),
];
export const NOTIFICATION_TREE: NotificationNode[] = [
group("connection", [
leaf("connected", "CONNECTION_CONNECTED"),
leaf("disconnected", "CONNECTION_DISCONNECTED"),
leaf("lostConnection", "CONNECTION_LOST_CONNECTION"),
]),
group("channel", [
group("created", byWho("CHANNEL_CREATED")),
group("deleted", byWho("CHANNEL_DELETED")),
group("edited", [
group("currentChannel", byWho("CHANNEL_EDITED_CURRENT")),
group("otherChannel", byWho("CHANNEL_EDITED_OTHER")),
]),
group("moved", byWho("CHANNEL_MOVED")),
]),
group("server", [
group("edited", byWho("SERVER_EDITED")),
leaf("insufficientPermissions", "SERVER_INSUFFICIENT_PERMISSIONS"),
leaf("error", "SERVER_ERROR"),
]),
group("client", [
group("connection", [
group("connected", where("CLIENT_CONNECTION_CONNECTED")),
group("disconnected", where("CLIENT_CONNECTION_DISCONNECTED")),
group("lostConnection", where("CLIENT_CONNECTION_LOST_CONNECTION")),
]),
group("switched", moves("CLIENT_SWITCHED")),
group("movedClient", moves("CLIENT_MOVED")),
group("kickedChannel", moves("CLIENT_WAS_KICKED_FROM_CHANNEL")),
group("kickedServer", where("CLIENT_WAS_KICKED_FROM_SERVER")),
group("banned", where("CLIENT_WAS_BANNED")),
group("serverGroup", [
group("added", byServerUser("CLIENT_SERVERGROUP_ADDED")),
group("removed", byServerUser("CLIENT_SERVERGROUP_REMOVED")),
]),
group("channelGroup", byServerUser("CLIENT_CHANNELGROUP_CHANGED")),
group("recording", [
leaf("recordingStart", "CLIENT_RECORDING_START"),
leaf("recordingStop", "CLIENT_RECORDING_STOP"),
leaf("recordingInChannel", "CLIENT_RECORDING_IN_CHANNEL"),
]),
leaf("talkPowerRequested", "CLIENT_REQUESTED_TALK_POWER"),
]),
group("self", [
leaf("youSwitched", "YOU_SWITCHED_CHANNEL"),
leaf("youMoved", "YOU_WERE_MOVED_TO_DIFFERENT_CHANNEL"),
leaf("youKickedServer", "YOU_WERE_KICKED_FROM_SERVER"),
leaf("youKickedChannel", "YOU_WERE_KICKED_FROM_CHANNEL"),
leaf("youBanned", "YOU_WERE_BANNED"),
leaf("talkPowerGranted", "YOU_WERE_GRANTED_TALK_POWER"),
leaf("talkPowerRevoked", "YOU_WERE_REVOKED_TALK_POWER"),
group("serverGroup", [
group("added", byServerUser("YOU_SERVERGROUP_ADDED")),
group("removed", byServerUser("YOU_SERVERGROUP_REMOVED")),
]),
group("channelGroup", byServerUser("YOU_CHANNELGROUP_CHANGED")),
]),
group("chat", [leaf("messageSent", "CHAT_SENT_MESSAGE"), leaf("messageReceived", "CHAT_RECEIVED_MESSAGE")]),
group("capture", [leaf("muted", "SOUND_CAPTURE_MUTED"), leaf("unmuted", "SOUND_CAPTURE_UNMUTED")]),
group("playback", [leaf("muted", "SOUND_PLAYBACK_MUTED"), leaf("unmuted", "SOUND_PLAYBACK_UNMUTED")]),
group("status", [leaf("away", "STATUS_SET_AWAY"), leaf("present", "STATUS_SET_PRESENT")]),
group("other", [
leaf("poked", "OTHER_RECEIVED_POKE"),
leaf("transferComplete", "OTHER_FILETRANSFER_COMPLETE"),
leaf("transferFailed", "OTHER_FILETRANSFER_FAILED"),
leaf("whisperListEmpty", "OTHER_WHISPERLIST_EMPTY"),
leaf("whisperTargetNotFound", "OTHER_WHISPERTARGET_NOT_FOUND"),
leaf("whisperTooMany", "OTHER_WHISPERTARGET_TOO_MANY"),
]),
// Like native: no checkboxes here, these are switched on/off on their own options pages.
group("special", [
leaf("micClickOtherOn", "SPECIAL_MIC_CLICK_OTHER_ON"),
leaf("micClickOtherOff", "SPECIAL_MIC_CLICK_OTHER_OFF"),
leaf("micClickSelfOn", "SPECIAL_MIC_CLICK_SELF_ON"),
leaf("micClickSelfOff", "SPECIAL_MIC_CLICK_SELF_OFF"),
leaf("whisperNotify", "SPECIAL_WHISPER_NOTIFY"),
leaf("soundTest", "SPECIAL_SOUND_TEST"),
leaf("test3d", "SPECIAL_3D_TEST"),
leaf("talkingWhileMuted", "SPECIAL_TALKING_WHILE_MUTED"),
]),
];
export const isSpecialKey = (key: string) => key.startsWith("SPECIAL_");
/** WebSpeak3's own pack: plays the chimes from Options -> Sounds (or the file you put there). */
const BUILTIN_SCRIPTS: Record<string, SoundEventId> = {
CONNECTION_CONNECTED: "connect",
CONNECTION_DISCONNECTED: "disconnect",
CONNECTION_LOST_CONNECTION: "disconnect",
CLIENT_CONNECTION_CONNECTED_SERVER: "clientJoin",
CLIENT_CONNECTION_CONNECTED_CURRENT_CHANNEL: "clientJoin",
CLIENT_CONNECTION_DISCONNECTED_SERVER: "clientLeave",
CLIENT_CONNECTION_DISCONNECTED_CURRENT_CHANNEL: "clientLeave",
CLIENT_CONNECTION_LOST_CONNECTION_SERVER: "clientLeave",
CLIENT_CONNECTION_LOST_CONNECTION_CURRENT_CHANNEL: "clientLeave",
CLIENT_SWITCHED_TO_CURRENT_CHANNEL_APPEARS: "clientJoin",
CLIENT_SWITCHED_TO_CURRENT_CHANNEL_STAYS: "clientJoin",
CLIENT_SWITCHED_FROM_CURRENT_CHANNEL_DISAPPEARS: "clientLeave",
CLIENT_SWITCHED_FROM_CURRENT_CHANNEL_STAYS: "clientLeave",
CHAT_RECEIVED_MESSAGE: "message",
OTHER_RECEIVED_POKE: "poke",
SOUND_CAPTURE_MUTED: "mute",
SOUND_CAPTURE_UNMUTED: "mute",
SOUND_PLAYBACK_MUTED: "mute",
SOUND_PLAYBACK_UNMUTED: "mute",
SPECIAL_MIC_CLICK_OTHER_ON: "micClickOn",
SPECIAL_MIC_CLICK_OTHER_OFF: "micClickOff",
SPECIAL_MIC_CLICK_SELF_ON: "micClickOn",
SPECIAL_MIC_CLICK_SELF_OFF: "micClickOff",
SPECIAL_WHISPER_NOTIFY: "whisper",
SPECIAL_TALKING_WHILE_MUTED: "mute",
};
export const BUILTIN_PACK = "builtin";
export const NO_SOUNDS_PACK = "none";
export interface SoundPack {
id: string;
name: string;
scripts: Record<string, string>;
/** Lowercased path relative to settings.ini -> audio. */
files: Record<string, Blob>;
}
/** Where an event's text line goes; several at once, like native's multiple choice.
* "client" = the private chat with the client it's about. */
export type TextPosition = "server" | "channel" | "client";
export interface NotificationOverride {
off?: boolean;
script?: string;
text?: TextPosition[];
}
export interface NotificationSettings {
pack: string;
/** "important": only IMPORTANT_KEYS while the output is muted. */
whenMuted: "all" | "important" | "none";
overrides: Record<string, NotificationOverride>;
}
const SETTINGS_KEY = "webspeak3:notification-settings";
const DEFAULT_SETTINGS: NotificationSettings = { pack: BUILTIN_PACK, whenMuted: "all", overrides: {} };
let settings: NotificationSettings = (() => {
try {
return { ...DEFAULT_SETTINGS, ...JSON.parse(localStorage.getItem(SETTINGS_KEY) ?? "{}") };
} catch {
return DEFAULT_SETTINGS;
}
})();
export const getNotificationSettings = () => settings;
export function saveNotificationSettings(next: NotificationSettings): void {
settings = next;
localStorage.setItem(SETTINGS_KEY, JSON.stringify(next));
}
/** Set by the app: output muted state, and the active favorite's pack override. */
let playbackMuted = false;
let sessionPack: string | undefined;
export const setNotificationPlaybackMuted = (muted: boolean) => void (playbackMuted = muted);
export const setSessionSoundPack = (pack: string | undefined) => void (sessionPack = pack || undefined);
// --- imported packs (IndexedDB, blobs don't fit localStorage) ---
function withPacks<T>(mode: IDBTransactionMode, run: (store: IDBObjectStore) => IDBRequest<T>): Promise<T> {
return new Promise((resolve, reject) => {
const open = indexedDB.open("webspeak3-soundpacks", 1);
open.onupgradeneeded = () => open.result.createObjectStore("packs", { keyPath: "id" });
open.onerror = () => reject(open.error);
open.onsuccess = () => {
const req = run(open.result.transaction("packs", mode).objectStore("packs"));
req.onsuccess = () => resolve(req.result);
req.onerror = () => reject(req.error);
};
});
}
let packsCache: Promise<SoundPack[]> | null = null;
export function loadSoundPacks(): Promise<SoundPack[]> {
packsCache ??= withPacks<SoundPack[]>("readonly", (s) => s.getAll()).catch(() => []);
return packsCache;
}
export async function deleteSoundPack(id: string): Promise<void> {
await withPacks("readwrite", (s) => s.delete(id)).catch(() => {});
packsCache = null;
}
const AUDIO = /\.(wav|mp3|ogg|m4a)$/i;
/** Parses a TS3 sound pack (.ts3_soundpack / .zip with a settings.ini). */
export function parseSoundPackZip(data: Uint8Array, fallbackName: string): SoundPack {
const entries = unzipSync(data);
const iniPath = Object.keys(entries)
.filter((p) => p.toLowerCase().endsWith("settings.ini"))
.sort((a, b) => a.length - b.length)[0];
if (!iniPath) throw new Error("settings.ini missing");
const base = iniPath.slice(0, iniPath.length - "settings.ini".length).toLowerCase();
const ini = new TextDecoder().decode(entries[iniPath]);
let section = "";
let name = fallbackName;
const scripts: Record<string, string> = {};
for (const raw of ini.split(/\r?\n/)) {
const line = raw.trim();
if (!line || line.startsWith("#") || line.startsWith(";")) continue;
const head = /^\[(.+)\]$/.exec(line);
if (head) {
section = head[1].toLowerCase();
continue;
}
const eq = line.indexOf("=");
if (eq < 0) continue;
const k = line.slice(0, eq).trim();
const v = line.slice(eq + 1).trim();
if (section === "info" && k === "name" && v) name = v;
else if (section === "soundfiles") scripts[k] = v;
}
const files: Record<string, Blob> = {};
for (const [path, bytes] of Object.entries(entries)) {
const lower = path.toLowerCase();
if (lower.startsWith(base) && AUDIO.test(lower)) files[lower.slice(base.length)] = new Blob([bytes.slice()]);
}
return { id: `pack:${Date.now()}`, name, scripts, files };
}
export async function importSoundPack(file: File): Promise<SoundPack> {
const pack = parseSoundPackZip(new Uint8Array(await file.arrayBuffer()), file.name.replace(/\.[^.]+$/, ""));
await withPacks("readwrite", (s) => s.put(pack));
packsCache = null;
return pack;
}
// --- resolving + playing ---
/** The pack's own script for a key ("" = silent). */
export function packScript(pack: SoundPack | undefined, packId: string, key: string): string {
if (packId === NO_SOUNDS_PACK) return "";
if (packId === BUILTIN_PACK) return BUILTIN_SCRIPTS[key] ? `play("${BUILTIN_SCRIPTS[key]}")` : "";
return pack?.scripts[key] ?? "";
}
/** Text positions native offers for a key: everything gets Server, events about
* channels/yourself also Channel, events about another client also Client. */
export function textPositionChoices(key: string): TextPosition[] {
if (key.startsWith("CLIENT_") || key === "OTHER_RECEIVED_POKE") return ["server", "channel", "client"];
if (/^(CHANNEL|YOU|CHAT)_/.test(key)) return ["server", "channel"];
return ["server"];
}
// ponytail: guessed set, native doesn't document which sounds count as "wichtig".
const IMPORTANT_KEYS = /^(CONNECTION_|YOU_WERE_|SOUND_|OTHER_RECEIVED_POKE$|SERVER_ERROR$)/;
export const isNotificationEnabled = (key: string) => isSpecialKey(key) || !settings.overrides[key]?.off;
/** Where the event's text goes; nowhere when the row is unticked. */
export function notificationTextPositions(key: string): TextPosition[] {
if (!isNotificationEnabled(key)) return [];
const text = settings.overrides[key]?.text;
return Array.isArray(text) ? text : ["server"];
}
export type NotificationVars = Record<string, string>;
export async function runSoundScript(script: string, packId: string, vars: NotificationVars = {}): Promise<void> {
const pack = packId.startsWith("pack:") ? (await loadSoundPacks()).find((p) => p.id === packId) : undefined;
const fill = (s: string) => s.replace(/\$\{(\w+)\}/g, (_, v: string) => vars[v] ?? (v === "clientType" ? "neutral" : ""));
for (const [, fn, arg] of script.matchAll(/(play|say)\(\s*"([^"]*)"\s*\)/g)) {
const value = fill(arg);
if (fn === "say") {
if ("speechSynthesis" in window) speechSynthesis.speak(new SpeechSynthesisUtterance(value));
} else if (packId === BUILTIN_PACK || !pack) {
if ((SOUND_EVENTS as string[]).includes(value)) await playSound(value as SoundEventId);
} else {
const blob = pack.files[value.toLowerCase().replace(/\\/g, "/")];
if (blob) await playSoundBlob(blob);
}
}
}
/** Plays the sound for a TS3 notification key, honouring the Meldungen settings. */
export async function notify(key: string, vars?: NotificationVars): Promise<void> {
if (!isNotificationEnabled(key)) return;
if (playbackMuted && (settings.whenMuted === "none" || (settings.whenMuted === "important" && !IMPORTANT_KEYS.test(key))))
return;
const packId = sessionPack ?? settings.pack;
const override = settings.overrides[key]?.script;
const pack = packId.startsWith("pack:") ? (await loadSoundPacks()).find((p) => p.id === packId) : undefined;
await runSoundScript(override ?? packScript(pack, packId, key), packId, vars);
}
+15 -9
View File
@@ -46,6 +46,8 @@ export const StreamMode = {
export interface StreamPublishOptions {
name: string;
/** Screen/window via the browser's picker, or the webcam. */
source: "display" | "camera";
/** Send the capture's audio track too, when the source has one. */
audio: boolean;
/** One of StreamAccess. */
@@ -112,15 +114,16 @@ export class StreamPublisher {
}
/**
* Captures a screen and announces the stream.
* Captures a screen or the webcam and announces the stream.
*
* `getDisplayMedia` is secure-context-only, so this throws on a plain-http
* Both capture APIs are secure-context-only, so this fails on a plain-http
* origin - the same limitation the microphone already has.
*/
async start(options: StreamPublishOptions): Promise<void> {
if (this.state === "live" || this.state === "starting") return;
if (!navigator.mediaDevices?.getDisplayMedia) {
this.fail("Screen sharing requires HTTPS (or localhost) - the site is not a secure context.");
const camera = options.source === "camera";
if (!(camera ? navigator.mediaDevices?.getUserMedia : navigator.mediaDevices?.getDisplayMedia)) {
this.fail("Streaming requires HTTPS (or localhost) - the site is not a secure context.");
return;
}
@@ -132,13 +135,15 @@ export class StreamPublisher {
if (options.fps > 0) video.frameRate = { ideal: options.fps };
try {
this.media = await navigator.mediaDevices.getDisplayMedia({
video: Object.keys(video).length > 0 ? video : true,
audio: options.audio,
});
const constraints = { video: Object.keys(video).length > 0 ? video : true };
// A camera's "audio" would be the microphone, which already goes out as
// voice - sending it again would only echo.
this.media = camera
? await navigator.mediaDevices.getUserMedia({ ...constraints, audio: false })
: await navigator.mediaDevices.getDisplayMedia({ ...constraints, audio: options.audio });
} catch (err) {
this.setState("idle");
this.fail(`Could not capture the screen: ${describe(err)}`);
this.fail(`Could not capture the ${camera ? "camera" : "screen"}: ${describe(err)}`);
return;
}
@@ -423,6 +428,7 @@ export class StreamPublisher {
* advance. A browser tab has no TS6 equivalent and reads closest to a window.
*/
private detectSourceType(): number {
if (this.options?.source === "camera") return StreamSource.CAMERA;
const surface = this.media?.getVideoTracks()[0]?.getSettings().displaySurface;
return surface === "monitor" ? StreamSource.SCREEN : StreamSource.WINDOW;
}
+3
View File
@@ -24,6 +24,9 @@ const EVENT_KEYWORDS: Record<SoundEventId, string[]> = {
message: ["textmessagereceived", "chatmessage", "newmessage", "message"],
poke: ["gotpoked", "poke"],
mute: ["micmuted", "microphonemuted", "micactivated", "microphoneactivated"],
micClickOn: ["micclickon"],
micClickOff: ["micclickoff"],
whisper: ["whisperreceived", "whisper"],
};
function normalize(filename: string): string {
+44 -2
View File
@@ -1,6 +1,27 @@
export type SoundEventId = "connect" | "disconnect" | "clientJoin" | "clientLeave" | "message" | "poke" | "mute";
export type SoundEventId =
| "connect"
| "disconnect"
| "clientJoin"
| "clientLeave"
| "message"
| "poke"
| "mute"
| "micClickOn"
| "micClickOff"
| "whisper";
export const SOUND_EVENTS: SoundEventId[] = ["connect", "disconnect", "clientJoin", "clientLeave", "message", "poke", "mute"];
export const SOUND_EVENTS: SoundEventId[] = [
"connect",
"disconnect",
"clientJoin",
"clientLeave",
"message",
"poke",
"mute",
"micClickOn",
"micClickOff",
"whisper",
];
/** "ide" swaps the default chimes for synthetic terminal blips (Command Center layout). */
type SoundStyle = "classic" | "ide";
@@ -215,6 +236,15 @@ function synthNotes(event: SoundEventId): SynthNote[] {
];
case "mute":
return [{ delay: 0, freq: 660, duration: 0.06, gain: 0.3 }];
case "micClickOn":
return [{ delay: 0, freq: 1400, duration: 0.03, gain: 0.15 }];
case "micClickOff":
return [{ delay: 0, freq: 900, duration: 0.03, gain: 0.15 }];
case "whisper":
return [
{ delay: 0, freq: 783.99, duration: 0.12, gain: 0.2 },
{ delay: 0.1, freq: 659.25, duration: 0.16, gain: 0.18 },
];
}
}
@@ -247,6 +277,12 @@ function ideNotes(event: SoundEventId): SynthNote[] {
];
case "mute":
return [{ delay: 0, freq: 300, endFreq: 50, duration: 0.04, gain: 0.15, type: "square" }];
case "micClickOn":
return [{ delay: 0, freq: 1600, duration: 0.02, gain: 0.08, type: "square" }];
case "micClickOff":
return [{ delay: 0, freq: 1000, duration: 0.02, gain: 0.08, type: "square" }];
case "whisper":
return [{ delay: 0, freq: 900, endFreq: 700, duration: 0.08, gain: 0.1, type: "triangle" }];
}
}
@@ -256,6 +292,12 @@ export function setSoundsOutputDevice(deviceId: string): void {
void player.setOutputDevice(deviceId);
}
/** A file from an imported sound pack (Options -> Meldungen). */
export async function playSoundBlob(blob: Blob): Promise<void> {
if (!loadSoundsEnabled()) return;
await player.playBlob(blob, loadSoundsVolume()).catch(() => {});
}
export async function playSound(event: SoundEventId): Promise<void> {
if (!loadSoundsEnabled()) return;
if (!loadEventSoundEnabled(event)) return;
File diff suppressed because it is too large. Load diff
+477
View File
@@ -0,0 +1,477 @@
// Options -> Konto: Mullvad-style account sync. A random 16-digit account number
// (+ an optional random password) is all there is. Both derive, on this device,
// the account id the server files the data under, the AES key and the auth
// secret, so the server only ever holds an encrypted blob (gateway/src/sync.ts).
//
// Pulled once at startup (main.tsx, before App reads localStorage) and pushed on
// a timer whenever a synced key changed. A remote change made while this tab is
// open shows up as a conflict on the next push, not live.
export type SyncCategory = "identities" | "favorites" | "settings" | "designs" | "whisper";
export const SYNC_CATEGORIES: SyncCategory[] = ["identities", "favorites", "settings", "designs", "whisper"];
// Device-specific keys (audio devices, volumes, PTT key, chat logs, caches) stay local.
const CATEGORY_KEYS: Record<SyncCategory, string[]> = {
identities: ["webspeak3:identities", "webspeak3:identity", "webspeak3:active-identity"],
favorites: ["webspeak3:favorites", "webspeak3:channel-passwords", "webspeak3:contacts"],
settings: [
"webspeak3:app-settings",
"webspeak3:chat-settings",
"webspeak3:chat-images",
"webspeak3:server-banner",
"webspeak3:download-settings",
"webspeak3:notification-settings",
"webspeak3:security-settings",
"webspeak3:away-presets",
"webspeak3:disconnect-message",
"webspeak3:language",
"webspeak3:sounds-enabled",
"webspeak3:sounds-volume",
"webspeak3:other-mic-clicks",
"webspeak3:own-mic-clicks",
],
designs: [
"webspeak3:custom-themes",
"webspeak3:design-selection",
"webspeak3:design-theme",
"webspeak3:icon-pack",
"webspeak3:icon-packs",
"webspeak3:ide-pixel-font",
"webspeak3:tree-options",
],
whisper: ["webspeak3:whisper-lists", "webspeak3:whisper-settings"],
};
/** Per-sound toggles are stored as "webspeak3:sounds-enabled:<id>". */
function categoryOf(key: string): SyncCategory | null {
for (const c of SYNC_CATEGORIES)
if (CATEGORY_KEYS[c].some((k) => key === k || (k === "webspeak3:sounds-enabled" && key.startsWith(`${k}:`)))) return c;
return null;
}
export const SYNC_ACCOUNT_KEY = "webspeak3:sync-account";
const meta = (name: string) => document.querySelector<HTMLMetaElement>(`meta[name="webspeak3-${name}"]`)?.content;
export const DEFAULT_SYNC_SERVER =
meta("sync-url") ||
import.meta.env.VITE_SYNC_URL ||
(import.meta.env.DEV ? "http://localhost:8081/api/sync" : "https://gateway.webspeak3.de/api/sync");
export interface SyncAccount {
number: string;
password?: string;
server: string;
categories: SyncCategory[];
/** Server version this device last wrote or read. */
version: number;
/** Hash of the synced keys at that point; differs = local changes to push. */
syncedHash: string;
lastSync?: number;
}
export type SyncState = "off" | "idle" | "syncing" | "error" | "conflict";
export interface SyncStatus {
state: SyncState;
error?: string;
lastSync?: number;
}
// --- tiny external store for the Konto panel ---------------------------------
let status: SyncStatus = { state: "off" };
const listeners = new Set<() => void>();
function setStatus(next: SyncStatus) {
status = next;
for (const l of listeners) l();
}
export const getSyncStatus = () => status;
export function subscribeSyncStatus(l: () => void) {
listeners.add(l);
return () => void listeners.delete(l);
}
export function loadSyncAccount(): SyncAccount | null {
try {
const raw = localStorage.getItem(SYNC_ACCOUNT_KEY);
return raw ? (JSON.parse(raw) as SyncAccount) : null;
} catch {
return null;
}
}
function saveSyncAccount(account: SyncAccount | null) {
if (account) localStorage.setItem(SYNC_ACCOUNT_KEY, JSON.stringify(account));
else localStorage.removeItem(SYNC_ACCOUNT_KEY);
}
// --- number, password, crypto -------------------------------------------------
function randomChars(alphabet: string, count: number): string {
let out = "";
const limit = 256 - (256 % alphabet.length); // reject to avoid modulo bias
while (out.length < count) {
for (const b of crypto.getRandomValues(new Uint8Array(count))) {
if (b < limit && out.length < count) out += alphabet[b % alphabet.length];
}
}
return out;
}
export const generateAccountNumber = () => randomChars("0123456789", 16);
/** 20 characters (~100 bits) without look-alikes, in groups of five. */
export const generatePassword = () => randomChars("ABCDEFGHJKLMNPQRSTUVWXYZ23456789", 20).replace(/(.{5})(?=.)/g, "$1-");
export const formatAccountNumber = (n: string) => n.replace(/(\d{4})(?=\d)/g, "$1 ");
/** null unless exactly 16 digits (spaces and dashes are ignored). */
export const normalizeAccountNumber = (s: string) => {
const digits = s.replace(/[\s-]/g, "");
return /^\d{16}$/.test(digits) ? digits : null;
};
export const normalizePassword = (s: string) => s.trim().toUpperCase();
const enc = (s: string) => new TextEncoder().encode(s);
const hex = (bytes: ArrayBuffer | Uint8Array) =>
[...new Uint8Array(bytes)].map((b) => b.toString(16).padStart(2, "0")).join("");
const b64 = (bytes: Uint8Array) => {
let s = "";
for (let i = 0; i < bytes.length; i += 0x8000) s += String.fromCharCode(...bytes.subarray(i, i + 0x8000));
return btoa(s);
};
const unb64 = (s: string) => Uint8Array.from(atob(s), (c) => c.charCodeAt(0));
const sha256Hex = async (s: string) => hex(await crypto.subtle.digest("SHA-256", enc(s)));
interface Keys {
id: string;
key: CryptoKey;
auth: string;
}
const keyCache = new Map<string, Promise<Keys>>();
function deriveKeys(number: string, password = ""): Promise<Keys> {
const cacheKey = `${number}\n${password}`;
let keys = keyCache.get(cacheKey);
if (!keys) {
keys = (async () => {
const base = await crypto.subtle.importKey("raw", enc(cacheKey), "PBKDF2", false, ["deriveBits"]);
const bits = new Uint8Array(
await crypto.subtle.deriveBits(
{ name: "PBKDF2", salt: enc(`webspeak3-sync:${number}`), iterations: 310_000, hash: "SHA-256" },
base,
512
)
);
return {
// The id depends on the number only, so a new device can ask whether a password is needed.
id: await sha256Hex(`webspeak3-sync-id:${number}`),
key: await crypto.subtle.importKey("raw", bits.slice(0, 32), "AES-GCM", false, ["encrypt", "decrypt"]),
auth: hex(bits.slice(32)),
};
})();
keyCache.set(cacheKey, keys);
}
return keys;
}
interface Payload {
v: 1;
categories: SyncCategory[];
items: Record<string, string>;
}
/** Padded to a power of two (min 4 KB) so the blob size says little about its content. */
async function encrypt(key: CryptoKey, payload: Payload): Promise<string> {
const json = enc(JSON.stringify(payload));
let size = 4096;
while (size < json.length) size *= 2;
const plain = new Uint8Array(size).fill(0x20); // trailing spaces: JSON.parse ignores them
plain.set(json);
const iv = crypto.getRandomValues(new Uint8Array(12));
const data = new Uint8Array(await crypto.subtle.encrypt({ name: "AES-GCM", iv }, key, plain));
const out = new Uint8Array(12 + data.length);
out.set(iv);
out.set(data, 12);
return b64(out);
}
async function decrypt(key: CryptoKey, data: string): Promise<Payload> {
const bytes = unb64(data);
const plain = await crypto.subtle.decrypt({ name: "AES-GCM", iv: bytes.subarray(0, 12) }, key, bytes.subarray(12));
return JSON.parse(new TextDecoder().decode(plain)) as Payload;
}
// --- local snapshot -------------------------------------------------------------
/** Goes through length/key(i), which the vault's stand-in Storage also answers for secrets. */
function snapshot(categories: SyncCategory[]): Record<string, string> {
const items: Record<string, string> = {};
for (let i = 0; i < localStorage.length; i++) {
const k = localStorage.key(i);
if (!k) continue;
const c = categoryOf(k);
if (c && categories.includes(c)) items[k] = localStorage.getItem(k) ?? "";
}
return items;
}
const hashItems = (items: Record<string, string>) =>
sha256Hex(JSON.stringify(Object.keys(items).sort().map((k) => [k, items[k]])));
/** Remote replaces local for every category both sides sync; keys gone remotely go locally too. */
function applyPayload(payload: Payload, categories: SyncCategory[]) {
const shared = categories.filter((c) => payload.categories.includes(c));
for (const k of Object.keys(snapshot(shared))) if (!(k in payload.items)) localStorage.removeItem(k);
for (const [k, v] of Object.entries(payload.items)) {
const c = categoryOf(k);
if (c && shared.includes(c)) localStorage.setItem(k, v);
}
}
// --- server calls ---------------------------------------------------------------
const ERROR_CODES = new Set(["password_required", "unreachable", "not_found", "rate_limited", "full", "pow_required", "conflict", "payload_too_large"]);
/** Locale key for an error thrown by the functions below. */
export const syncErrorKey = (err: unknown) => {
const code = err instanceof Error ? err.message : String(err);
return ERROR_CODES.has(code) ? `sync.error.${code}` : "sync.error.generic";
};
async function call(server: string, path: string, init: RequestInit = {}, auth?: string) {
let res: Response;
try {
res = await fetch(`${server.replace(/\/$/, "")}${path}`, {
...init,
headers: {
...(init.body ? { "Content-Type": "application/json" } : {}),
...(auth ? { Authorization: `Bearer ${auth}` } : {}),
},
});
} catch {
throw new Error("unreachable");
}
const body = (await res.json().catch(() => ({}))) as Record<string, unknown>;
if (!res.ok) throw new Error(String(body.error ?? res.status));
return body;
}
export async function accountInfo(number: string, server: string): Promise<{ exists: boolean; hasPassword?: boolean }> {
const { id } = await deriveKeys(number);
return (await call(server, `/${id}/meta`)) as { exists: boolean; hasPassword?: boolean };
}
/** Same check as gateway/src/sync.ts: leading zero bits of sha256(challenge:nonce).
* Batched, because one awaited digest at a time is dominated by the await. */
async function solvePow(challenge: string, bits: number): Promise<string> {
const zeroBits = (hash: Uint8Array) => {
let zeros = 0;
for (const b of hash) {
if (b !== 0) return zeros + Math.clz32(b) - 24;
zeros += 8;
}
return zeros;
};
for (let start = 0; ; start += 256) {
const hashes = await Promise.all(
Array.from({ length: 256 }, (_, i) => crypto.subtle.digest("SHA-256", enc(`${challenge}:${start + i}`)))
);
const hit = hashes.findIndex((h) => zeroBits(new Uint8Array(h)) >= bits);
if (hit >= 0) return String(start + hit);
}
}
async function push(account: SyncAccount, items: Record<string, string>, extra: Record<string, unknown> = {}) {
const k = await deriveKeys(account.number, account.password);
const data = await encrypt(k.key, { v: 1, categories: account.categories, items });
return (await call(
account.server,
`/${k.id}`,
{ method: "PUT", body: JSON.stringify({ version: account.version, data, hasPassword: !!account.password, ...extra }) },
k.auth
)) as { version: number };
}
async function pull(account: Pick<SyncAccount, "number" | "password" | "server">) {
const k = await deriveKeys(account.number, account.password);
const body = (await call(account.server, `/${k.id}`, {}, k.auth)) as { version: number; data: string };
return { version: body.version, payload: await decrypt(k.key, body.data) };
}
// --- what the Konto panel and main.tsx use ------------------------------------
export async function createSyncAccount(withPassword: boolean, server: string, categories: SyncCategory[]) {
const account: SyncAccount = {
number: generateAccountNumber(),
password: withPassword ? generatePassword() : undefined,
server,
categories,
version: 0,
syncedHash: "",
};
const { challenge, bits } = (await call(server, "/challenge", { method: "POST" })) as { challenge: string; bits: number };
const nonce = await solvePow(challenge, bits);
const items = snapshot(categories);
const { version } = await push(account, items, { pow: { challenge, nonce } });
saveSyncAccount({ ...account, version, syncedHash: await hashItems(items), lastSync: Date.now() });
setStatus({ state: "idle", lastSync: Date.now() });
}
/** Logs this device into an existing account: the account's data replaces the local one. Reload afterwards. */
export async function loginSyncAccount(number: string, password: string | undefined, server: string, categories: SyncCategory[]) {
const { version, payload } = await pull({ number, password, server });
applyPayload(payload, categories);
saveSyncAccount({
number,
password,
server,
categories,
version,
syncedHash: await hashItems(snapshot(categories)),
lastSync: Date.now(),
});
}
/** Startup pull (main.tsx). Returns "conflict" when both sides changed. Past
* `deadline` App is already running on the local data, so nothing is applied. */
export async function pullAtStartup(deadline: number): Promise<"ok" | "conflict"> {
const account = loadSyncAccount();
if (!account) return "ok";
setStatus({ state: "syncing", lastSync: account.lastSync });
try {
const { version, payload } = await pull(account);
if (version === account.version || Date.now() > deadline) {
setStatus({ state: "idle", lastSync: account.lastSync });
return "ok";
}
if ((await hashItems(snapshot(account.categories))) !== account.syncedHash) {
setStatus({ state: "conflict", lastSync: account.lastSync });
return "conflict";
}
applyPayload(payload, account.categories);
const lastSync = Date.now();
saveSyncAccount({ ...account, version, syncedHash: await hashItems(snapshot(account.categories)), lastSync });
setStatus({ state: "idle", lastSync });
return "ok";
} catch (err) {
setStatus({ state: "error", error: (err as Error).message, lastSync: account.lastSync });
return "ok";
}
}
/** "server": take the account's data (reload afterwards). "local": overwrite it with this device's. */
export async function resolveConflict(take: "server" | "local") {
const account = loadSyncAccount();
if (!account) return;
const { version, payload } = await pull(account);
if (take === "server") {
applyPayload(payload, account.categories);
saveSyncAccount({ ...account, version, syncedHash: await hashItems(snapshot(account.categories)), lastSync: Date.now() });
return;
}
saveSyncAccount({ ...account, version, syncedHash: "" });
setStatus({ state: "idle", lastSync: account.lastSync });
await syncNow();
}
let pushing = false;
/** Pushes when a synced key changed since the last sync. */
export async function syncNow() {
const account = loadSyncAccount();
if (!account || pushing || status.state === "conflict") return;
const items = snapshot(account.categories);
const hash = await hashItems(items);
if (hash === account.syncedHash) return;
pushing = true;
setStatus({ state: "syncing", lastSync: account.lastSync });
try {
const { version } = await push(account, items);
const lastSync = Date.now();
saveSyncAccount({ ...account, version, syncedHash: hash, lastSync });
setStatus({ state: "idle", lastSync });
} catch (err) {
const code = (err as Error).message;
setStatus({ state: code === "conflict" ? "conflict" : "error", error: code, lastSync: account.lastSync });
} finally {
pushing = false;
}
}
let timer: number | undefined;
export function startAutoSync() {
if (timer !== undefined) return;
if (loadSyncAccount() && status.state === "off") setStatus({ state: "idle", lastSync: loadSyncAccount()?.lastSync });
timer = window.setInterval(() => void syncNow(), 15_000);
document.addEventListener("visibilitychange", () => {
if (document.visibilityState === "hidden") void syncNow();
});
}
export async function setSyncCategories(categories: SyncCategory[]) {
const account = loadSyncAccount();
if (!account) return;
// syncedHash no longer matches the new selection, so the next tick pushes it.
saveSyncAccount({ ...account, categories, syncedHash: "" });
await syncNow();
}
/** Adds (random) or removes the password. Re-encrypts under the new key on the server. */
export async function changeSyncPassword(withPassword: boolean) {
const account = loadSyncAccount();
if (!account) return;
const next: SyncAccount = { ...account, password: withPassword ? generatePassword() : undefined };
const newKeys = await deriveKeys(next.number, next.password);
const items = snapshot(account.categories);
// Encrypted with the new key, authorized with the old one, handing over the new auth.
const k = await deriveKeys(account.number, account.password);
const data = await encrypt(newKeys.key, { v: 1, categories: account.categories, items });
const { version } = (await call(
account.server,
`/${k.id}`,
{ method: "PUT", body: JSON.stringify({ version: account.version, data, hasPassword: withPassword, newAuth: newKeys.auth }) },
k.auth
)) as { version: number };
saveSyncAccount({ ...next, version, syncedHash: await hashItems(items), lastSync: Date.now() });
setStatus({ state: "idle", lastSync: Date.now() });
}
/** Unlinks this device only; the account and its data stay on the server. */
export function logoutSyncAccount() {
saveSyncAccount(null);
setStatus({ state: "off" });
}
export async function deleteSyncAccount() {
const account = loadSyncAccount();
if (!account) return;
const k = await deriveKeys(account.number, account.password);
await call(account.server, `/${k.id}`, { method: "DELETE" }, k.auth);
logoutSyncAccount();
}
/** Link for the QR code: the fragment never reaches any server. */
export function syncLink(account: SyncAccount): string {
const params = new URLSearchParams({ sync: account.number });
if (account.password) params.set("syncpw", account.password);
if (account.server !== DEFAULT_SYNC_SERVER) params.set("syncserver", account.server);
return `${location.origin}${location.pathname}#${params}`;
}
/** Reads (and strips from the address bar) a link made by syncLink(). */
export function takeSyncLink(): { number: string; password?: string; server: string } | null {
const params = new URLSearchParams(location.hash.slice(1));
const number = normalizeAccountNumber(params.get("sync") ?? "");
if (!number) return null;
const password = params.get("syncpw") ?? undefined;
const server = params.get("syncserver") ?? DEFAULT_SYNC_SERVER;
for (const k of ["sync", "syncpw", "syncserver"]) params.delete(k);
history.replaceState(null, "", location.pathname + location.search + (params.size ? `#${params}` : ""));
return { number, password, server };
}
export function recoveryText(account: SyncAccount): string {
return [
"WebSpeak3",
"",
`Account number: ${formatAccountNumber(account.number)}`,
...(account.password ? [`Password: ${account.password}`] : []),
...(account.server !== DEFAULT_SYNC_SERVER ? [`Server: ${account.server}`] : []),
"",
].join("\n");
}
@@ -1,98 +0,0 @@
import type { ReactNode } from "react";
import { useT } from "../../i18n";
export type ConnectionTabItem = {
id: string;
label: string;
connected?: boolean;
connecting?: boolean;
};
export type GreenteaSpeakChromeProps = {
/** @deprecated Prefer `tabs` + `activeTabId` for multi-join. */
connected?: boolean;
/** @deprecated Prefer `tabs`. */
serverName?: string;
tabs?: ConnectionTabItem[];
activeTabId?: string | null;
onSelectTab?: (id: string) => void;
onCloseTab?: (id: string) => void;
children?: ReactNode;
};
/**
* GTS branding chrome: connection-tab strip (multi-join) + brand label when empty.
* Renders children unchanged — WebSpeak keeps its own React state/handlers.
*/
export function GreenteaSpeakChrome({
connected,
serverName,
tabs,
activeTabId,
onSelectTab,
onCloseTab,
children,
}: GreenteaSpeakChromeProps) {
const resolvedTabs: ConnectionTabItem[] =
tabs ??
(connected
? [{ id: "legacy", label: (serverName ?? "").trim() || "GreenTeaSpeak", connected: true }]
: []);
const hasTabs = resolvedTabs.length > 0;
const t = useT();
return (
<>
{hasTabs ? (
<div className="gts-connection-tabs" role="tablist" aria-label={t("tabs.connections")}>
{resolvedTabs.map((tab) => {
const isActive = tab.id === (activeTabId ?? resolvedTabs[0]?.id);
return (
<div
key={tab.id}
role="tab"
aria-selected={isActive}
className={`gts-connection-tab${isActive ? " gts-connection-tab-active" : ""}${
tab.connecting ? " gts-connection-tab-connecting" : ""
}`}
onClick={() => onSelectTab?.(tab.id)}
tabIndex={0}
aria-keyshortcuts={onCloseTab ? "Delete" : undefined}
onKeyDown={(e) => {
if (e.target !== e.currentTarget) return;
// The × below is mouse-only (a button can't sit inside a tab); Delete closes.
if (e.key === "Delete" && onCloseTab) onCloseTab(tab.id);
else if (e.key === "Enter" || e.key === " ") onSelectTab?.(tab.id);
else return;
e.preventDefault();
}}
title={tab.label}
>
<span className="gts-connection-tab-label">{tab.label}</span>
{onCloseTab ? (
<span
className="gts-connection-tab-close"
aria-hidden="true"
title={t("tabs.disconnect")}
onClick={(e) => {
e.stopPropagation();
onCloseTab(tab.id);
}}
>
×
</span>
) : null}
</div>
);
})}
</div>
) : (
<div className="gts-connection-tabs gts-brand-strip">
<span className="gts-brand-label">GreenTeaSpeak</span>
</div>
)}
{children}
</>
);
}
@@ -1,56 +0,0 @@
/**
* Maps WebSpeak gateway WebSocket payloads to the shape the GreenTeaSpeak
* shell expects. The browser UI still uses App.tsx state; this module is the
* contract layer so GTS chrome never talks to Electron IPC.
*/
export type GatewayServerType = "auto" | "teamspeak" | "teaspeak";
export type GatewayConnectPayload = {
type: "connect";
host: string;
nickname: string;
serverPassword?: string;
channelPassword?: string;
defaultChannel?: string;
identity?: string;
privilegeKey?: string;
serverType?: GatewayServerType;
};
export type GatewayOutboundAction =
| GatewayConnectPayload
| { type: "disconnect" }
| { type: "switchChannel"; channelId: number }
| { type: "sendChat"; message: string; target?: "channel" | "server" | number }
| { type: string; [key: string]: unknown };
/** Build the connect message sent on the WebSpeak gateway socket. */
export function buildGatewayConnect(input: {
host: string;
nickname: string;
serverPassword?: string;
channelPassword?: string;
defaultChannel?: string;
identity?: string;
privilegeKey?: string;
serverType?: GatewayServerType;
}): GatewayConnectPayload {
return {
type: "connect",
host: input.host.trim(),
nickname: input.nickname.trim(),
serverPassword: input.serverPassword?.trim() || undefined,
channelPassword: input.channelPassword?.trim() || undefined,
defaultChannel: input.defaultChannel?.trim() || undefined,
identity: input.identity || undefined,
privilegeKey: input.privilegeKey?.trim() || undefined,
serverType: input.serverType || "auto",
};
}
export function sendGatewayAction(ws: WebSocket | null, action: GatewayOutboundAction): boolean {
if (!ws || ws.readyState !== WebSocket.OPEN) return false;
ws.send(JSON.stringify(action));
return true;
}
-19
View File
@@ -1,19 +0,0 @@
export const GREENTEASPEAK_THEME_ID = "greenteaspeak" as const;
export function isGreenteaSpeakTheme(theme: string): boolean {
return theme === GREENTEASPEAK_THEME_ID;
}
export {
GreenteaSpeakChrome,
type GreenteaSpeakChromeProps,
type ConnectionTabItem,
} from "./GreenteaSpeakChrome";
export {
buildGatewayConnect,
sendGatewayAction,
type GatewayConnectPayload,
type GatewayOutboundAction,
type GatewayServerType,
} from "./gatewayAdapter";
+146
View File
@@ -0,0 +1,146 @@
// Options -> Sicherheit -> "Master Passwort benutzen". The keys below hold secrets
// (identity private keys, server/channel passwords, the store admin token). With a
// master password they live AES-GCM encrypted in one localStorage entry and only in
// memory once unlocked. Like storageFallback.ts, this swaps window.localStorage for
// a stand-in, so the dozens of plain localStorage reads in the app keep working.
// main.tsx unlocks before importing App, whose module-level code reads these keys.
export const PROTECTED_KEYS = [
"webspeak3:identities",
"webspeak3:identity",
"webspeak3:favorites",
"webspeak3:channel-passwords",
"webspeak3:store-admin-token",
"webspeak3:sync-account",
];
const VAULT_KEY = "webspeak3:vault";
const ITERATIONS = 310_000;
interface StoredVault {
salt: string;
iv: string;
data: string;
}
const real = window.localStorage;
let unlocked: { key: CryptoKey; salt: Uint8Array; secrets: Map<string, string> } | null = null;
const b64 = (bytes: Uint8Array) => btoa(String.fromCharCode(...bytes));
const unb64 = (s: string) => Uint8Array.from(atob(s), (c) => c.charCodeAt(0));
async function deriveKey(password: string, salt: Uint8Array): Promise<CryptoKey> {
const base = await crypto.subtle.importKey("raw", new TextEncoder().encode(password), "PBKDF2", false, ["deriveKey"]);
return crypto.subtle.deriveKey(
{ name: "PBKDF2", salt: salt as BufferSource, iterations: ITERATIONS, hash: "SHA-256" },
base,
{ name: "AES-GCM", length: 256 },
false,
["encrypt", "decrypt"]
);
}
export const hasVault = () => real.getItem(VAULT_KEY) !== null;
export const isVaultUnlocked = () => unlocked !== null;
// Writes are chained so an older encryption never lands after a newer one.
let writing: Promise<void> = Promise.resolve();
function persist(): Promise<void> {
writing = writing.then(async () => {
if (!unlocked) return;
const iv = crypto.getRandomValues(new Uint8Array(12));
const plain = new TextEncoder().encode(JSON.stringify(Object.fromEntries(unlocked.secrets)));
const data = new Uint8Array(await crypto.subtle.encrypt({ name: "AES-GCM", iv }, unlocked.key, plain));
real.setItem(VAULT_KEY, JSON.stringify({ salt: b64(unlocked.salt), iv: b64(iv), data: b64(data) } satisfies StoredVault));
});
return writing;
}
function installProxy(): void {
const secrets = () => unlocked!.secrets;
const isProtected = (k: string) => PROTECTED_KEYS.includes(k);
const proxy: Storage = {
get length() {
return real.length + secrets().size;
},
key: (i) => (i < real.length ? real.key(i) : ([...secrets().keys()][i - real.length] ?? null)),
getItem: (k) => (isProtected(k) ? (secrets().get(k) ?? null) : real.getItem(k)),
setItem: (k, v) => {
if (!isProtected(k)) return real.setItem(k, v);
secrets().set(k, String(v));
void persist();
},
removeItem: (k) => {
if (!isProtected(k)) return real.removeItem(k);
secrets().delete(k);
void persist();
},
clear: () => {
real.clear();
secrets().clear();
},
};
// Object.keys(localStorage) has to see real keys too.
for (let i = 0; i < real.length; i++) {
const k = real.key(i)!;
if (k !== VAULT_KEY) Object.defineProperty(proxy, k, { get: () => real.getItem(k), enumerable: true, configurable: true });
}
Object.defineProperty(window, "localStorage", { value: proxy, configurable: true });
}
async function openStored(password: string) {
await writing;
const stored: StoredVault = JSON.parse(real.getItem(VAULT_KEY)!);
const salt = unb64(stored.salt);
const key = await deriveKey(password, salt);
try {
const plain = await crypto.subtle.decrypt({ name: "AES-GCM", iv: unb64(stored.iv) as BufferSource }, key, unb64(stored.data) as BufferSource);
return { key, salt, secrets: new Map<string, string>(Object.entries(JSON.parse(new TextDecoder().decode(plain)))) };
} catch {
return null; // wrong password
}
}
/** false = wrong password. */
export async function unlockVault(password: string): Promise<boolean> {
unlocked = await openStored(password);
if (unlocked) installProxy();
return unlocked !== null;
}
/** Re-asks the current password before changing or removing it. */
export const checkMasterPassword = async (password: string) => (await openStored(password)) !== null;
/** Turns the master password on, or changes it when already on. */
export async function setMasterPassword(password: string): Promise<void> {
const salt = crypto.getRandomValues(new Uint8Array(16));
const key = await deriveKey(password, salt);
if (unlocked) {
unlocked = { ...unlocked, key, salt };
} else {
const secrets = new Map<string, string>();
for (const k of PROTECTED_KEYS) {
const v = real.getItem(k);
if (v !== null) secrets.set(k, v);
}
unlocked = { key, salt, secrets };
installProxy();
}
await persist();
for (const k of PROTECTED_KEYS) real.removeItem(k);
}
/** Turns it off: secrets go back to plain localStorage. */
export async function removeMasterPassword(): Promise<void> {
if (!unlocked) return;
await writing;
for (const [k, v] of unlocked.secrets) real.setItem(k, v);
real.removeItem(VAULT_KEY);
unlocked = null;
Object.defineProperty(window, "localStorage", { value: real, configurable: true });
}
/** "Passwort vergessen": drops the encrypted data for good. */
export function discardVault(): void {
real.removeItem(VAULT_KEY);
}
+46 -5
View File
@@ -87,6 +87,12 @@ export class MicCapture {
/** Push-to-talk: send while `pttPressed` instead of voice activation. */
pushToTalk = false;
pttPressed = false;
/** Send all the time, no voice activation (ignored while pushToTalk). */
continuous = false;
/** Damp the mic right after a keystroke, so typing doesn't trigger
* voice activation and is quieter while talking. See noteTyping(). */
typingAttenuation = false;
private typingUntil = 0;
constructor(context: AudioContext, options: MicCaptureOptions) {
this.context = context;
@@ -139,6 +145,10 @@ export class MicCapture {
this.aec3.process(this.aec3Out, captureIn);
input = this.aec3Out[0];
}
if (this.typingAttenuation && this.context.currentTime < this.typingUntil) {
// Copy first: `raw` is the input buffer, not ours to change.
input = input.map((v) => v * 0.1);
}
// Mirrors the (possibly AEC3-cancelled) signal to the output buffer, so
// setMonitoring() below can tap what's actually being sent rather than
// the raw pre-cancellation mic feed - a self-test through the raw feed
@@ -152,7 +162,7 @@ export class MicCapture {
const now = this.context.currentTime;
if (rms >= this.threshold) this.activeUntil = now + this.hangoverSeconds;
const talking = this.pushToTalk ? this.pttPressed : now < this.activeUntil;
const talking = this.pushToTalk ? this.pttPressed : this.continuous || now < this.activeUntil;
// Shared audio (music, a video) has its own pauses; keep sending throughout.
const shouldBeActive = this.extra !== null || talking;
if (shouldBeActive !== this.active) {
@@ -201,6 +211,11 @@ export class MicCapture {
this.silence.connect(this.context.destination);
}
/** Call on every keystroke; with typingAttenuation on, the next ~0.2 s are damped. */
noteTyping(): void {
this.typingUntil = this.context.currentTime + 0.2;
}
/** Mixes a second stream (e.g. a shared tab's audio) into what is sent, or
* removes it with null. The caller keeps ownership of the stream. */
setExtraAudio(stream: MediaStream | null): void {
@@ -357,6 +372,10 @@ export class AudioPlayer {
private destination: MediaStreamAudioDestinationNode | null = null;
private element: SinkableElement | null = null;
private gain: GainNode;
// Voice frames only (not test tone, clicks or mic monitoring), so the
// leveler can sit between them and the volume gain.
private voice: GainNode;
private leveler: DynamicsCompressorNode;
private context: AudioContext;
private aecTap: ScriptProcessorNode | null = null;
private aecSink: GainNode | null = null;
@@ -364,6 +383,18 @@ export class AudioPlayer {
constructor(context: AudioContext) {
this.context = context;
this.gain = context.createGain();
this.voice = context.createGain();
// "Automatic volume leveling": evens out loud and quiet speakers. Browsers
// add their own makeup gain, so quiet voices come up too.
// ponytail: one compressor for the whole mix, not per speaker like TS3.
this.leveler = context.createDynamicsCompressor();
this.leveler.threshold.value = -30;
this.leveler.knee.value = 10;
this.leveler.ratio.value = 4;
this.leveler.attack.value = 0.005;
this.leveler.release.value = 0.3;
this.leveler.connect(this.gain);
this.voice.connect(this.gain);
if (!("setSinkId" in HTMLMediaElement.prototype)) {
this.gain.connect(context.destination);
return;
@@ -398,7 +429,7 @@ export class AudioPlayer {
const source = this.context.createBufferSource();
source.buffer = buffer;
source.connect(this.gain);
source.connect(this.voice);
const now = this.context.currentTime;
if (this.nextTime < now + 0.02) {
@@ -419,6 +450,11 @@ export class AudioPlayer {
this.gain.gain.value = gain;
}
setAutoVolume(enabled: boolean): void {
this.voice.disconnect();
this.voice.connect(enabled ? this.leveler : this.gain);
}
/** The node all voice/test audio ultimately reaches - use as a mic-monitoring target so it also respects volume/output device. */
getInputNode(): AudioNode {
return this.gain;
@@ -430,12 +466,15 @@ export class AudioPlayer {
osc.type = "sine";
osc.frequency.value = 440;
const toneGain = this.context.createGain();
toneGain.gain.value = 0.3;
const now = this.context.currentTime;
// Soft fade in and decay instead of a flat, hard-edged beep.
toneGain.gain.setValueAtTime(0, now);
toneGain.gain.linearRampToValueAtTime(0.15, now + 0.03);
toneGain.gain.exponentialRampToValueAtTime(0.0001, now + 0.8);
osc.connect(toneGain);
toneGain.connect(this.gain);
const now = this.context.currentTime;
osc.start(now);
osc.stop(now + 0.6);
osc.stop(now + 0.85);
osc.onended = () => {
osc.disconnect();
toneGain.disconnect();
@@ -487,6 +526,8 @@ export class AudioPlayer {
dispose(): void {
this.detachAecRenderTap();
this.voice.disconnect();
this.leveler.disconnect();
this.gain.disconnect();
if (!this.element) return;
this.element.pause();