feat: add verified console self-update for release packages

Check official GitHub Releases, require SHA256SUMS, safely extract and swap release-package code, roll back on failed health checks, and persist task state across restarts. Docker and source deployments stay check-only. Add updater tests, route security tests and five-language admin copy.
This commit is contained in:
OddTurtleHead committed 2026-11-24 01:44:24 +08:00
1 parent ae6788a796
commit 2de2e23fd3
32 files changed
+3573 -16

No files matched your search

+6 -2
View File
@@ -103,7 +103,7 @@ docker compose ps
docker compose logs -f webspeak
```
Upgrade:
Upgrade from the host. The administration console can check for newer stable releases on Docker, but it cannot replace the container image from inside the container:
```bash
git pull --ff-only
@@ -111,12 +111,14 @@ docker compose pull
docker compose up -d
```
Do not run `docker compose down -v`; it removes the database and administrator settings.
Do not run `docker compose down -v`; it removes the `webspeak-data` volume, including the database and administrator settings.
### Release package
Download the matching `windows-x64.zip`, `linux-x64.tar.gz`, or `linux-arm64.tar.gz` from [GitHub Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest). Extract it and run the included launcher. Packages include the Node.js runtime and production dependencies. Docker images support amd64/arm64.
A release-package install can be upgraded from the administration console. It checks the official GitHub Releases, refuses a package without a matching `SHA256SUMS.txt` entry, replaces only application code and restarts the process. `data/`, `config.json`, `certs/`, installed skins and plugins are preserved. Export a backup before starting. Docker and source deployments cannot apply an update from the console.
Android APKs for `arm64-v8a`, `armeabi-v7a`, and `x86_64` are also attached. They use debug signing for sideload testing; they are not Google Play packages, and real-device voice still needs validation.
### From source
@@ -134,6 +136,8 @@ npm start
Building `@discordjs/opus` requires Python, Make, and a C/C++ toolchain.
The administration console can check for newer stable versions when running from source, but one-click apply is unavailable because the tree has no bundled Node.js runtime. Pull the source and rebuild after reviewing the release notes. The console never downloads or swaps source-tree files.
### First-time setup
1. Open `http://<your-host>:3040/admin`.
+6 -2
View File
@@ -120,7 +120,7 @@ docker compose ps
docker compose logs -f webspeak
```
升级:
升级在宿主机执行。管理控制台在 Docker 部署中只能检查新版本,不能从容器内部替换镜像:
```bash
git pull --ff-only
@@ -128,12 +128,14 @@ docker compose pull
docker compose up -d
```
不要执行 `docker compose down -v`,否则会删除数据库和管理员设置。
不要执行 `docker compose down -v`,否则会删除 `webspeak-data` volume,包括数据库和管理员设置。
### 发布包
从 [GitHub Releases](https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak/releases/latest) 下载与系统和架构匹配的 `windows-x64.zip`、`linux-x64.tar.gz` 或 `linux-arm64.tar.gz`,解压后运行对应启动脚本。发布包自带 Node.js 运行时和生产依赖。Docker 镜像支持 amd64/arm64。
发布包安装可以在管理控制台直接升级:控制台只读取官方 GitHub Releases,缺少匹配的 `SHA256SUMS.txt` 条目时拒绝安装,校验通过后仅替换程序代码并重启进程。`data/`、`config.json`、`certs/`、已安装的皮肤和插件都会保留。开始前建议先导出备份。Docker 和源码运行不能在控制台应用更新。
Release 同时提供 Android `arm64-v8a`、`armeabi-v7a` 和 `x86_64` APK。它们使用 debug 签名,可手动侧载测试;不是 Google Play 发布包,Android 真机语音仍需验收。
### 源码运行
@@ -151,6 +153,8 @@ npm start
构建 `@discordjs/opus` 需要 Python、Make 和 C/C++ 编译工具。
源码运行时,管理控制台可以检查新的正式版本,但目录中没有捆绑的 Node.js 运行时,因此不能一键应用更新。请查看发行说明后拉取源码并重新构建;控制台不会下载或替换源码目录中的文件。
### 首次配置
1. 打开 `http://<你的主机>:3040/admin`。