{"id":50780910,"url":"https://github.com/faithleysath/remote-control-for-windows","last_synced_at":"2026-06-12T03:03:07.347Z","repository":{"id":364017334,"uuid":"1266003955","full_name":"faithleysath/remote-control-for-windows","owner":"faithleysath","description":"临时、可见、可审计的 Windows 远程协助工具","archived":false,"fork":false,"pushed_at":"2026-06-11T09:25:31.000Z","size":140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-11T10:24:45.518Z","etag":null,"topics":["cli","remote-assistance","rust","websocket","windows"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/faithleysath.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-11T08:44:53.000Z","updated_at":"2026-06-11T09:25:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/faithleysath/remote-control-for-windows","commit_stats":null,"previous_names":["faithleysath/remote-control-for-windows"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/faithleysath/remote-control-for-windows","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithleysath%2Fremote-control-for-windows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithleysath%2Fremote-control-for-windows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithleysath%2Fremote-control-for-windows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithleysath%2Fremote-control-for-windows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faithleysath","download_url":"https://codeload.github.com/faithleysath/remote-control-for-windows/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faithleysath%2Fremote-control-for-windows/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34226630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","remote-assistance","rust","websocket","windows"],"created_at":"2026-06-12T03:03:06.776Z","updated_at":"2026-06-12T03:03:07.336Z","avatar_url":"https://github.com/faithleysath.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Remote Control for Windows\n\n`remote-control-for-windows` 是一套临时、可见、可审计的 Windows 远程协助工具。它面向授权支持场景，让研发、运维或 Codex agent 可以通过命令行完成诊断、文件传输、截图和基础 GUI 操作。\n\n项目现在已经从 v1 的从零实现阶段进入长期维护和迭代阶段。v1 远控主链路已经实现，并在真实 Windows VM 中完成主要闭环验证；后续工作应在保持当前安全模型的前提下继续强化打包、自动化验证和操作体验。\n\n## 组件\n\n- `rcw-server`：WebSocket 中继服务器，连接被控端和控制端。\n- `rcw-host.exe`：客户或测试人员在 Windows 上运行的可见被控端。\n- `rcwctl`：研发、脚本或 Codex agent 使用的控制端 CLI。\n- `rcw-common`：共享协议、ID、TOTP、审计、配置和传输逻辑。\n\n```text\nrcwctl  \u003c--WebSocket--\u003e  rcw-server  \u003c--WebSocket--\u003e  rcw-host.exe\n```\n\n所有连接都由 host/control 侧主动发起。被控端上线不需要控制端 token；控制端必须同时持有服务端控制 token 和被控端当前 TOTP，才能打开会话。\n\n## 当前状态\n\n2026-06-11 已验证：\n\n- 本地 Rust 检查：`cargo fmt --check`、`cargo test --workspace`、`cargo clippy --workspace -- -D warnings`。\n- Linux 上通过 `cargo-xwin` 交叉构建静态 CRT 的 Windows 被控端。\n- Windows VM 实机 E2E：会话 `open/status/close`、错误 token/TOTP/TOTP 周期处理、命令执行、命令超时清理、上传/下载 SHA-256、窗口枚举、截图、鼠标移动/点击/滚轮、键盘文本和按键输入、剪贴板安全边界、防休眠/防熄屏请求、旧 session 失效、server/host 审计日志。\n\n仍需补齐的验证项：\n\n- 在真实标准用户交互桌面中启动 `rcw-host.exe`，最终确认控制台显示 `Privilege: standard user`。管理员 elevated 桌面行为已经验证通过。\n\n## 安全模型\n\n这个工具明确不是静默远控工具：\n\n- Windows 被控端是可见控制台进程。\n- 关闭被控端窗口即终止控制。\n- 被控端不安装服务、不写入启动项、不隐藏自身、不在退出后驻留。\n- 被控端不自动提权，也不绕过 UAC。\n- 被控端控制台显示当前权限状态和操作摘要。\n- 剪贴板连接信息不包含控制端 token、session token、TOTP seed 或原始机器标识。\n- host、controller、server 三端都记录审计日志。\n\n完整安全边界见 [docs/security.md](docs/security.md)。\n\n## 快速开始\n\n安装控制端 CLI：\n\n```bash\nnpm install -g rcwctl\nrcwctl --version\n```\n\n启动本地中继服务器：\n\n```bash\nexport RCW_BIND_ADDR=127.0.0.1:7800\nexport RCW_CONTROL_TOKEN='replace-with-a-random-token'\ncargo run -p rcw-server\n```\n\n在 Windows 上启动被控端：\n\n```powershell\n.\\rcw-host.exe --server ws://\u003cserver-host\u003e:7800\n```\n\n打开控制端会话并执行命令：\n\n```bash\nexport RCW_SERVER_URL=ws://127.0.0.1:7800\nexport RCW_CONTROL_TOKEN='replace-with-a-random-token'\n\nrcwctl open --id \u003cmachine-id\u003e --totp \u003ccurrent-totp\u003e\nrcwctl status\nrcwctl exec -- pwsh -NoProfile -Command \"hostname\"\nrcwctl screenshot --output screen.png\nrcwctl close\n```\n\n给 agent 使用时建议开启 JSON 输出：\n\n```bash\nrcwctl --json exec -- pwsh -NoProfile -Command \"hostname\"\n```\n\n## 构建\n\n本地 Linux 构建：\n\n```bash\ncargo build --workspace\ncargo test --workspace\n```\n\n如果只需要使用控制端，优先通过 npm 安装预编译 `rcwctl`；本地 Rust 构建主要面向开发和发布验证。\n\n从 Linux 交叉构建 Windows 被控端：\n\n```bash\nrustup target add x86_64-pc-windows-msvc\nRUSTFLAGS='-C target-feature=+crt-static' \\\n  cargo xwin build -p rcw-host --target x86_64-pc-windows-msvc --release\n```\n\n产物路径：\n\n```text\ntarget/x86_64-pc-windows-msvc/release/rcw-host.exe\n```\n\n静态 CRT 构建可以避免干净 Windows 环境缺少 VC++ 运行库。\n\n## 开发检查\n\n提交变更前至少运行：\n\n```bash\ncargo fmt --check\ncargo test --workspace\ncargo clippy --workspace -- -D warnings\n```\n\n如果改动涉及 Windows host 侧代码，还应运行：\n\n```bash\nRUSTFLAGS='-C target-feature=+crt-static' \\\n  cargo xwin clippy -p rcw-host --target x86_64-pc-windows-msvc --release -- -D warnings\nRUSTFLAGS='-C target-feature=+crt-static' \\\n  cargo xwin build -p rcw-host --target x86_64-pc-windows-msvc --release\n```\n\n## 文档\n\n根目录 `README.md` 是项目首页，面向第一次进入仓库的人；`docs/README.md` 是文档目录索引，面向需要深入查阅设计、测试、发布和维护资料的人。两者不是重复正文，职责不同。\n\n- [文档索引](docs/README.md)\n- [项目范围](docs/project-scope.md)\n- [技术架构](docs/architecture.md)\n- [协议设计](docs/protocol.md)\n- [CLI 参考](docs/cli.md)\n- [配置说明](docs/configuration.md)\n- [测试与验证](docs/testing.md)\n- [发布流程](docs/release.md)\n- [路线图](docs/roadmap.md)\n- [安全模型](docs/security.md)\n- [Windows 实现说明](docs/windows-apis.md)\n\n## 贡献\n\n见 [CONTRIBUTING.md](CONTRIBUTING.md)。涉及安全边界的改动必须保持客户可见、显式授权、token 脱敏和操作可审计。\n\n## 许可证\n\n本项目使用 MIT 许可证。见 [LICENSE](LICENSE)。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaithleysath%2Fremote-control-for-windows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaithleysath%2Fremote-control-for-windows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaithleysath%2Fremote-control-for-windows/lists"}