> 2026-11-12 集群验证结果见 [cluster.md](cluster.md):公网 P2P、双节点真机回退、Go race、Rust 测试及桌面真机投屏均已验证。以下保留早期单中继检查记录。 # Verification record Validated on Windows x64 during implementation: - `go test ./...`: role authentication, offline devices, duplicate registration, exclusive leases, ticket ownership and replay rejection, bidirectional bytes, stream cancellation, agent disconnect cleanup. - `go vet ./...`: passed. - `cargo test --workspace --locked`: configuration validation and ADB smart socket handshake with fragmented replies. - `cargo clippy --workspace --all-targets --locked -- -D warnings`: passed. - Release builds: Go relay and both Rust executables built successfully. - `python tests/e2e.py` against the release binaries: passed 2 MiB binary transfer, eight concurrent streams, an idle stream across control ping/pong, competing-client rejection, agent restart and relay restart recovery. - Existing Python bridge unit tests: all three passed. Read-only real-device smoke test: - Remote ADB Server `192.168.5.222:5037` listed `192.168.100.141:5555` as online. - Started a temporary relay and both Rust daemons, with the gateway using the existing remote ADB transport. - Initial attempt reached the phone but returned `unauthorized`. After the user approved the local computer's key, the same test was rerun successfully. - Ordinary local `adb devices -l` listed `127.0.0.1:51847` as `device`, with product `aosp_crosshatch` and model `AOSP_on_crosshatch`. - Remote `adb shell getprop ro.product.model` returned `AOSP on crosshatch`; the read-only shell echo marker also matched. All three release programs were involved in the successful test. - App installation, Android Studio and scrcpy have not yet been exercised through the new path. - Temporary processes and local ADB endpoint were disconnected after the test; unrelated local ADB devices were preserved. Public deployment follow-up: - Linux amd64 server is now running on Debian 12 at `175.178.213.60`, as an enabled systemd service under a dedicated user. - Existing Nginx proxies `https://ttstd.com/ads/` to loopback `127.0.0.1:18081`, stripping the prefix. Its existing root-domain certificate was verified without disabling certificate checks. - A real public WSS smoke test passed: both Rust daemons connected to the public origin while keeping TLS SNI/hostname `ttstd.com`; ordinary local ADB listed `127.0.0.1:59671` as `device`, and both read-only shell commands passed. - The initial public test used a temporary local gateway and the VPN-reachable remote ADB Server. Follow-up deployment now runs the actual gateway on the remote Windows PC; see the next section. - Public Cloudflare DNS connectivity timed out from the current PC; the explicit origin-address option was used. No DNS records were changed. - macOS runtime and Linux Rust daemon hosting remain untested. See `deployment-ttstd.md` for deployed configuration and certificate expiry. Remote Windows gateway follow-up: - Installed release `ads-agent.exe` on `192.168.5.222`, under `C:\Users\TT\AppData\Local\AndroidDeviceStreaming\agent`. Remote SHA256 matched the local release artifact. - Created an ACL-protected credential directory and registered `ADS-Agent` as a hidden background task under `TT`, with password logon, startup/logon triggers and failure restart. No account password is written into source or deployment files. - The gateway directly connects to phone `192.168.100.141:5555` and public relay origin `175.178.213.60:443`, retaining hostname `ttstd.com` and normal TLS checks. - Ran `tests/real_device.py --existing-device home-phone`: only a local client was started; no local gateway and no remote ADB Server transport were used. Ordinary local ADB showed the phone as `device`, and model query plus shell marker passed. - Restarted the remote task and repeated that test: passed again, with local endpoint `127.0.0.1:49832` and model `AOSP on crosshatch`. - Remote gateway remains running. Temporary local smoke-test endpoints/processes were cleaned up. Startup trigger configuration was inspected without rebooting the PC. System VPN was not disabled; it was only needed for remote SSH management, not the tested ADB data path. Desktop follow-up: - Avalonia now defaults to `wss://ttstd.com/ads`, with explicit origin `175.178.213.60:443`. HTTPS catalog requests and the Rust child share the same prefix/origin configuration; neither disables TLS validation. - Twelve .NET tests passed: URI prefix/port handling, invalid configuration, migration, role-token import, environment isolation and non-persistence, and rejection of an untrusted local TLS certificate even with an origin override. - Official Avalonia headless tests loaded the real XAML and checked bindings/button state. Real live-device tests passed public catalog discovery, GUI command connect, ADB readiness, model/Android/API display, reconnect, disconnect and lease release. - Official scrcpy 5.0.1 archive matched its published SHA-256. The desktop command started real public video streaming; scrcpy reported `Texture (D3D11VA): 944x1920`. Stop, reconnect and disconnect checks passed after that. - Rendered normal and minimum-size layouts were inspected. No token was present in saved settings or UI logs. Windows self-contained publishing succeeded, excluding credentials. - Native Windows UI automation could not initialize because its runtime reported a sandbox setup error. Tests were Avalonia headless plus real network/process/video operations; native mouse/keyboard, clipboard/file picker and tray behavior have not been automatically exercised in this run. Port cleanup follow-up: - Added the clear-port action to the connection card and local connection settings. Windows reads native IPv4/IPv6 TCP listener tables; non-Windows uses lsof when available. - Cleanup rechecks port ownership and process creation time, terminates only the matching process (not its entire process tree), verifies the port can be bound, and removes the corresponding local ADB endpoint. - Fifteen .NET tests passed, including actual disposable listener-process termination, unrelated-process survival, stale identity rejection, and protection for the current process / ADB main-service port. - Avalonia headless test invoked the new command against a real child listener and verified both process exit and port release. Temporary listener children were cleaned up after testing. ### 2026-11-13:模拟器离线修复与桌面日志同步 - Flutter 本地滚动日志中 `phone-006f8b2ae57e` 持续掉线;远端 Agent 对 emulator-5556/5558 报 `cannot reach phone adbd`。三个模拟器的主机 5555/5557/5559 端口均可返回 ADB CNXN。 - `ads-core` 对 `emulator-N` 改用同一 ADB 主机的 N+1 原始 adbd 端口;实体手机继续原有 smart socket 选定 transport 后连接内部 TCP adbd。错误状态保存完整错误链。 - 修复后的 Agent 已部署 Ubuntu-224,备份保留在原二进制旁。`phone-a9bbc18df94c` 通过公网 relay-1 被本地 ADB 识别并执行 shell;原离线虚拟 USB `ADS-phone-006f8b2ae57e` 已恢复 device,shell getprop ro.product.model 成功。临时网络 ADB 测试连接已断开。 - Rust ads-core 6 项测试、Avalonia 22 项测试、Flutter 27 项测试通过,Flutter analyze 无问题。 - 两桌面端新增打开日志目录;Avalonia 同步电脑名、电脑排序、固定高度刷新指示与按天滚动日志。安装位置采用 TongTongStudio,保留既有私有配置和日志路径。 ### 0.2.1 Windows DLL 精简发布 - Avalonia 根目录 DLL 从 211 降至 4:托管程序集使用 .NET bundle,保留 3 个原生图形/字体库与 Rust 工具必需的 vcruntime140.dll;没有启用反射裁剪或把 Rust、ADB、scrcpy 合并进主程序。 - Flutter 根目录 DLL 从 15 降至 6:保留引擎、4 个插件和 Rust 所需的 vcruntime140.dll;宿主、包装库及源码插件采用静态 MSVC CRT。PE 直接/延迟导入扫描按实际闭包补齐运行库,不再整目录复制 VC Redist。 - Avalonia 实际发布包 `--package-check` 成功创建窗口并退出,未读取正式凭据、未建立设备连接;Flutter 6 个根目录 DLL 可由 Windows 加载。Avalonia 22 项、Flutter 27 项测试通过。未在全新 Windows 虚拟机执行本轮完整安装回归。 - 新版 Windows Setup 安装包和 Linux amd64 Avalonia/Agent deb 均为 0.2.1,带 SHA256 校验。Linux deb 元数据已验证;Flutter Linux 宿主仍未实现,本轮未生成 Flutter Linux 包。 - DLL 数量指安装目录根目录;tools/scrcpy 自带库保持完整。打包减少散落 DLL,不承诺安装程序体积同步减小。 ### 0.2.2:安装目录迁移后的工具启动修复 - 现场 settings.json 中 client、adb、scrcpy 三项仍为 Programs/TTSTD/ADS-Flutter,且三文件已不存在;当前 TongTongStudio 安装目录中的工具存在,ads-client --version 与 adb version 可运行。已备份现场配置后修复三项路径,其他设置和凭据保持不变;已运行的旧 UI 需重启才能重新读取设置。 - Flutter 新增 ToolPaths:启动及连接前解析、持久化当前工具位置,优先当前安装包,保留有效自定义工具。缺失工具在分配端口和建立租约之前报出修复方法,避免底层 ProcessException。投屏也解析 scrcpy/ADB 及工作目录。 - Avalonia 同步旧路径回退、启动迁移及保存。Flutter 32 项测试、Dart 静态分析、Avalonia 24 项测试通过,实际发布包窗口启动检查 PACKAGE_CHECK_OK。并行编译压力下一次端口测试超时,完整复跑 24 项均通过。 ### 0.2.3:Avalonia Semi 主题与 UTF-8 日志 - 现场日志出现“鍦ㄥ叾…”等 UTF-8 字节被按 Windows 本地编码解释后的乱码。ProcessTools 对 stdout/stderr 显式使用 UTF-8,覆盖同步命令与流式日志;本机 Agent 管理 JSON stdin 同步 UTF-8,非重定向后台启动清空输出编码选项。 - 锁定 Semi.Avalonia 11.3.7.3,与当前 Avalonia 11.3.8 兼容。设备、Agent 管理、设置、日志及 Agent 托盘统一使用 Semi 资源;新增 WorkbenchStyles.axaml,替换硬编码深色配色,使用左侧导航和明暗主题开关。 - 27 项 Avalonia 测试通过,包含中文及 emoji stdout/stderr、流式日志和中文 JSON 输入。离屏渲染四个页面的浅色/深色和 980×700 最小窗口共 10 张 PNG 并检查截图;实际 Windows 发布包 PACKAGE_CHECK_OK,PE 运行库检查通过。 - Windows 安装器为 0.2.3;Linux 发布同版本 Avalonia/Agent deb。历史乱码日志不改写;安装新版本并重启后,新日志按 UTF-8 正常显示。尚未在本轮执行干净虚拟机完整安装/卸载和 Linux GUI 实机回归。