mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 20:12:52 +08:00
M005: add local identity and preference persistence
This commit is contained in:
1 parent
3397e90749
commit
2f8301d188
9 files changed
+556
-17
No files matched your search
@@ -18,6 +18,9 @@ WebSpeak 是一个自托管的 TeamSpeak 浏览器客户端与访客接入网关
|
||||
- 中英文访客页面和中英文管理控制台。
|
||||
- Web 管理闭环:默认账号首次登录强制改密、单管理员登录、概览、服务器设置和真实连接测试。
|
||||
- `fixed` 与 `open` 两种访问模式。
|
||||
- 可选的持久 TeamSpeak identity:身份私钥仅保存在浏览器 IndexedDB,可导入/导出;访客也可继续使用临时身份。
|
||||
- 浏览器本地收藏、最近服务器、昵称、语言、音频设备/模式/音量和按 TeamSpeak UID 保存的成员音量。
|
||||
- 可清除全部 WebSpeak 本地数据;不保存服务器密码。
|
||||
- TeamSpeak 密码使用安装级主密钥加密保存,不向管理 API 返回明文。
|
||||
- 旧 `config.json` 一次性导入,导入后不再作为实时配置源。
|
||||
|
||||
@@ -115,6 +118,9 @@ data/
|
||||
- 管理 mutation 检查同源请求、JSON Content-Type、服务端 Session 与 CSRF token。
|
||||
- 管理登录具有固定窗口限速和连续失败延迟。
|
||||
- 日志、管理 API 和 Overview 不返回服务器密码、管理员密码或身份私钥。
|
||||
- 普通用户 identity 只通过当前 Join Ticket/Session 在内存中使用,不写入 Gateway 数据库、日志或诊断信息。
|
||||
|
||||
浏览器身份导出文件包含可冒用该 TeamSpeak identity 的私密凭据,只应保存到可信位置;不要上传到 WebSpeak 或提交到 Git。
|
||||
|
||||
请备份整个 `data/` 目录。只有数据库而没有对应 `master.key` 时,已加密的 TeamSpeak 密码无法恢复。不要提交 `data/`、`config.json`、证书、私钥或日志。
|
||||
|
||||
@@ -179,7 +185,7 @@ npm run dev
|
||||
# 前端开发服务;/api 和 /ws 代理到 3040
|
||||
npm run web:dev
|
||||
|
||||
# 自动测试(覆盖 M000–M003)
|
||||
# 自动测试(覆盖 M000–M005)
|
||||
npm test
|
||||
|
||||
# 后端类型检查与构建
|
||||
@@ -224,6 +230,9 @@ WebSpeak is a self-hosted TeamSpeak web client and guest gateway. Every browser
|
||||
- Bilingual guest UI and bilingual admin console.
|
||||
- Browser-based admin login, mandatory first-login password change, Overview, server settings, and a real short-lived connection test.
|
||||
- Fixed and open guest access modes.
|
||||
- Optional persistent TeamSpeak identity stored only in browser IndexedDB, with local import/export; guests can still join ephemerally.
|
||||
- Browser-local favorites, recent servers, nickname/language/audio preferences, and per-TeamSpeak-UID member volume.
|
||||
- Clear all WebSpeak local data at any time; server passwords are never stored there.
|
||||
- Encrypted TeamSpeak server password and one-time legacy config import.
|
||||
- No ServerQuery, WebQuery, admin token, or maintenance bot.
|
||||
|
||||
@@ -276,6 +285,8 @@ The first login is forced to a password-change screen. Set a password of at leas
|
||||
|
||||
Local state is stored under `data/` in SQLite plus a 32-byte `master.key`. Admin passwords use `crypto.scrypt`. A new instance starts with `admin/admin` and marks that credential for mandatory rotation on first login. TeamSpeak secrets use AES-256-GCM. Admin sessions are server-side with HttpOnly/SameSite Strict cookies, same-origin and CSRF checks, and fixed login throttling.
|
||||
|
||||
A normal user's identity is used only in memory for the current Join Ticket/Session and is never written to the Gateway database, logs, or diagnostics. An exported browser identity file contains private credentials that can impersonate the TeamSpeak identity. Keep it in a trusted location; never upload it to WebSpeak or commit it to Git.
|
||||
|
||||
In fixed mode, guests cannot override the configured target. In open mode, arbitrary public targets are validated after DNS resolution; private, loopback, link-local, multicast, broadcast, and reserved addresses are rejected. Session passwords travel through an opaque one-time Join Ticket and are never placed in share or WebSocket URLs.
|
||||
|
||||
When the welcome page has no target parameters from an invite link, its address and port field is prefilled from the admin-configured default TeamSpeak target. Invite-link target parameters take precedence.
|
||||
|
||||
Reference in new issue
Block a user