Deploy Windows gateway as persistent scheduled task and verify public ADB
This commit is contained in:
1 parent
c38f067bea
commit
3fb894c1a1
9 files changed
+193
-13
No files matched your search
@@ -38,6 +38,8 @@ TLS 沿用现有主站证书,核验到的有效期截止 `2026-11-28 06:59:59
|
||||
|
||||
## 远程 Windows 电脑
|
||||
|
||||
已部署到 `192.168.5.222`,目录为 `C:\Users\TT\AppData\Local\AndroidDeviceStreaming\agent`。`ADS-Agent` 计划任务已运行,使用账号 `TT` 的后台密码登录,设置开机和登录触发、故障重启。详细管理方式见 `deploy/windows/README.md`。以下项目目录脚本方式仍可用于手动运行其他网关,勿对同一设备 ID 重复启动。
|
||||
|
||||
复制以下文件并保持目录结构,角色配置不要公开或提交 Git:
|
||||
|
||||
```text
|
||||
@@ -85,10 +87,12 @@ scrcpy -s 127.0.0.1:15555
|
||||
|
||||
## 本次验证
|
||||
|
||||
已使用正式 Rust 二进制经公网 Linux 中继完成真实手机测试:普通本地 `adb devices` 显示为 `device`,读取型号 `AOSP on crosshatch`,Shell 回显正确。临时网关为本地启动并借助已有 VPN 访问远程 ADB;因此该测试证明公网中继的数据路径,尚未证明远程 Windows 上开机自启或完全关闭 VPN 后的现场部署。
|
||||
已使用正式 Rust 二进制经公网 Linux 中继完成真实手机测试:普通本地 `adb devices` 显示为 `device`,读取型号 `AOSP on crosshatch`,Shell 回显正确。最新测试只启动本地客户端,连接远程 Windows 后台任务注册的 `home-phone`;远程守护程序直接接入手机 TCP 5555。没有在本地启动网关,也没有通过远程 ADB Server 5037 中转。
|
||||
|
||||
远程任务重启后重复测试也通过。测试的 ADB 数据链路只使用公网中继;部署管理仍通过提供的 VPN 地址 SSH 进行,没有关闭系统 VPN,以免影响其他工作。开机启动触发器已配置和检查,未重启远程电脑。测试临时本地连接已清理,远程网关保留后台运行。
|
||||
|
||||
可复现命令(角色令牌只从私有文件读取):
|
||||
|
||||
```powershell
|
||||
python tests/real_device.py --relay-url wss://ttstd.com/ads --connect-address 175.178.213.60:443 --credentials-dir config/private --adb-server 192.168.5.222:5037 --serial 192.168.100.141:5555
|
||||
python tests/real_device.py --relay-url wss://ttstd.com/ads --connect-address 175.178.213.60:443 --credentials-dir config/private --existing-device home-phone
|
||||
```
|
||||
+10
-1
@@ -25,6 +25,15 @@ 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 test gateway still used the existing VPN-reachable remote ADB Server to reach the phone. Installing the gateway on the remote Windows PC and verifying with VPN disabled remain separate deployment steps.
|
||||
- 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.
|
||||
Reference in new issue
Block a user