ykxmz 1.5.0:手表端 TLS 证书兼容 + 三端分开打包 + 下载区

手表端
- 内置 GTS Root R4 / GlobalSign Root CA
  修 SSLHandshakeException: Chain validation failed
- 连接错误翻译成人话:证书 / 时间 / 解析 / 超时分别给提示
- 经中转连上后用服务器报的地址刷新已配对记录
- 版本号 1.3.0 -> 1.5.0(AndroidManifest 之前漏改了)

服务器端
- 支持 chunked 请求体,修每 16 秒一次的连接错乱与大面积 502
- 网络调优 net-tune.sh(开机自动应用)
- 新增下载区,管理页加下载卡片
- 隧道改 HTTP/2 + 双连接

打包方式变更
- 从一个合并 zip 改成三个独立产物:
    ykxmz-agent-*.zip    被控端
    ykxmz-server-*.zip   服务器端
    ykxmz-watch-*.apk    控制端
This commit is contained in:
xmz7891
2026-10-06 23:08:05 +08:00
parent edac13dbe2
commit 8111fb6d97
20 changed files with 3770 additions and 2943 deletions
+68
View File
@@ -0,0 +1,68 @@
# -*- coding: utf-8 -*-
r"""两件事:
1. 给 verify_all.ps1 补回 UTF-8 BOM
(edit 工具写出来不带 BOM,PowerShell 里中文会乱码)
2. 把三个成品上传到设备的下载目录
"""
from __future__ import annotations
import sys
from pathlib import Path
ROOT = Path(r"C:\Users\shu\Desktop\deepseekagent\LanRemote")
sys.path.insert(0, str(ROOT / "_build"))
from devssh import run, upload # noqa: E402
VERIFY = ROOT / "_tests" / "verify_all.ps1"
UPLOADS = [
("dist/ykxmz-agent-1.5.0.zip",
"/root/lanremote-relay/downloads/ykxmz-agent-1.5.0.zip"),
("dist/ykxmz-server-1.5.0.zip",
"/root/lanremote-relay/downloads/ykxmz-server-1.5.0.zip"),
("dist/ykxmz-watch-1.5.0.apk",
"/root/lanremote-relay/downloads/ykxmz-watch-1.5.0.apk"),
("dist/ykxmz-watch-1.5.0-说明.txt",
"/root/lanremote-relay/downloads/ykxmz-watch-1.5.0-说明.txt"),
]
def main() -> int:
# ---- 1. 补 BOM ----
raw = VERIFY.read_bytes()
if raw.startswith(b"\xef\xbb\xbf"):
print(" verify_all.ps1: BOM 正常")
else:
VERIFY.write_bytes(b"\xef\xbb\xbf" + raw)
print(" verify_all.ps1: 补回了 UTF-8 BOM")
# ---- 2. 建目录 ----
run("mkdir -p /root/lanremote-relay/downloads", timeout=30)
run("rm -f /root/lanremote-relay/downloads/ykxmz-1.5.0.zip", timeout=30)
# ---- 3. 上传 ----
print()
print(" 上传成品:")
for local, remote in UPLOADS:
src = ROOT / local
if not src.is_file():
print(f" [跳过] {local} 不存在")
continue
try:
upload(str(src), remote, 0o644)
size = src.stat().st_size
print(f" ✓ {src.name} ({size / 1024 / 1024:.2f} MB)")
except Exception as exc: # noqa: BLE001
print(f" ✗ {src.name}: {exc}")
# ---- 4. 确认 ----
print()
code, out, _err = run(
"ls -la /root/lanremote-relay/downloads/ | tail -8", timeout=30)
print(out)
return 0
if __name__ == "__main__":
sys.exit(main())