Repository navigation
T-1244 T-1239③ Cry Bot InstaBox 云电脑:远程桌面画面中继 - #58
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
台账任务
台账任务:T-1244
改了什么
改了什么(与
git status --short一致;云沙箱第一次运行中断后重跑,两次结果合并取回,均未提交):server/routes/desktop-viewer.ts:DesktopConnection新增可选upstream(服务端连上游 wss 并原样双向转发),createDesktopViewer新增仅供测试的allowInsecureLoopbackUpstream参数;无 upstream 时行为不变。shared/wire.ts:第 62 行原地改为"box" | "vps" | "instabox"。server/instabox/machine.ts:共享契约,与约定逐字一致。server/instabox/vnc.ts、server/instabox/vnc.test.ts:instaboxDesktopTarget及单测。server/instabox/vnc.e2e.test.ts:中继 e2e,含临时自签证书的可信 WSS 转发、不可信证书拒绝、真实 noVNC 浏览器连接。server/testing/fake-instabox-vnc.ts:假上游,支持 WS 与注入证书的 TLS。docs/tasks/T-1200/T-1244-instabox-vnc/report.md、verification.txt:本报告与验证记录。为什么:
第一次运行的改动以未提交形式取回;保留现有中继、适配器和共享契约,只补齐 TLS 验证。OpenSSL 在每轮 e2e 中生成证书并成功退出;测试只临时信任该证书,不关闭 TLS 校验。初次浏览器测试失败源于默认 macOS Chrome 路径,使用
CRYBOT_CDP_CHROME=/usr/bin/chromium后通过。供⑤接线的现有确切签名:
建议浏览器 target id 沿用
vps/<botId>(当前前后端均接受的云电脑路由),服务端key使用instabox/<botId>/<machineId>,便于换机后旧连接失效。⑤按该 target id 选择 provider,并接入machines.ensureRunning(botId)、machines.vncUpstream(id);instabox/<botId>目前不是可直接使用的浏览器 target id。前端无需修改:真实 Chromium/noVNC 已验证
password: [REDACTED]、RFB 3.8 None、1280×800 画面缩放至 640×400、像素显示及键盘回传。共享machine.ts与 brief 逐字一致,CloudBackend第 62 行符合约定。测试命令与结果摘要:
已先运行 依赖准备脚本,退出 0。下列文件逐个执行,未并行跑测试文件:
server/instabox/vnc.e2e.test.tsserver/routes/desktop-viewer.test.tsserver/request-auth.e2e.test.tsserver/instabox/vnc.test.tsserver/desktop-viewer-targets.test.tssrc/lib/desktop-connection.test.tsscripts/testing/file-size-ratchet.test.ts以上均退出 0。最终测试执行合计 232 项通过。
docs/verification/README.md在本工作区缺失;验证使用隔离 fixture、临时会话/浏览器目录及本地假服务,鉴权 e2e 启动隔离完整应用,未触碰真实 或用户应用数据。无未运行的上述检查;未提交 git。第 2 轮
改了什么(与
git status --short一致):server/instabox/vnc.e2e.test.ts:从headless-chrome.ts使用CHROME_PATH,路径不存在时用it.skipIf(...)跳过浏览器用例,并在跳过标题中注明需要CRYBOT_CDP_CHROME。docs/tasks/T-1200/T-1244-instabox-vnc/report.md、docs/tasks/T-1200/T-1244-instabox-vnc/verification.txt:本轮报告与验证记录。为什么:GitHub Actions 没有 Chrome;避免默认 macOS 路径启动失败及未捕获异常,同时保留有 Chrome 环境下的完整浏览器验证。
scripts/testing/headless-chrome.ts未修改。测试命令与结果摘要:未设置
CRYBOT_CDP_CHROME时,server/instabox/vnc.e2e.test.ts为 31 passed、1 skipped(跳过原因含“需要 CRYBOT_CDP_CHROME”),无 Unhandled Errors;设置CRYBOT_CDP_CHROME=/usr/bin/chromium后连续 3 轮均为 32 passed。pnpm exec oxlint --deny-warnings server/instabox/vnc.e2e.test.ts与git diff --check通过。pnpm exec tsc -p tsconfig.server.json仍被未改动的server/sessions.test.ts:79缺少label报错阻断。验收证据
审核、安全审查和测试结论见本 PR 检查状态及评论。
风险与回退
待补充风险;合并后可通过 revert 压缩提交回退。
🤖 Generated with Claude Code