远程软件
Go to file
郑博文 4379b01d41 refactor(android-ffi): 抽 pack_frame_header 并加写端字面量对拍单测
步骤 4 的跨端契约闭环:把 30 字节头构造从 nativeNextFrame 内联提取成纯函数,
写端只有一条路径(消除内联/函数两处并存 = R-5 同源漂移)。

新增 host 可跑的 3 条单测(#[cfg(test)],进 --workspace --exclude linux-agent 口径):
- header_bytes_match_the_declared_layout:逐字节手抄常数,与 Kotlin 侧
  RustBridgeTest.goldenHeader 是同一组——两侧各握一份手抄,改任一偏移另一侧必红
  (只锁读端有盲区:Kotlin 字面量若本身抄错 Rust 布局会跟着一起错还全绿)
- none_cursor_writes_zero_flag_and_zero_coords:None 分支 has=0 且坐标字节不残留脏值
- negative_coords_keep_bit_pattern:i16 负坐标位模式忠实
android-ffi 在 host(gnu) cargo test 可编译可跑,实测 3 passed。
2026-11-02 11:04:51 +08:00
.cargo init: MVP remote desktop (agent/viewer/common) with H.264 pipeline 2026-10-23 09:17:55 +08:00
agent feat(agent): v5 光标采样接入帧头(GetCursorInfo + 折叠规则 + dump 观测列) 2026-11-02 10:32:09 +08:00
agent-core feat(agent-core): ScreenCapturer 新增 pointer_state 默认实现并接入帧头 2026-11-02 10:36:47 +08:00
android-ffi refactor(android-ffi): 抽 pack_frame_header 并加写端字面量对拍单测 2026-11-02 11:04:51 +08:00
apps/android-viewer feat(android): 横屏远控(自动方向 + 控制条自动隐藏 + 黑边唤出) 2026-11-01 21:57:49 +08:00
common feat(common): 协议 v5 帧头新增光标字段 cursor 2026-11-02 10:11:23 +08:00
linux-agent feat(common): 协议 v2——版本号 + 帧头 seq/keyframe + 长度下界校验 2026-10-28 16:05:41 +08:00
scripts fix(linux-agent): 修正坐标换算单测期望值 + 冒烟脚本纳入单测 2026-10-23 15:04:56 +08:00
tools test(tools): 4a 横屏验收脚本 + 既有 proof 适配自动隐藏与同源缺陷修复 2026-11-01 21:58:19 +08:00
vendor/nvenc fix(agent): vendor nvenc 并补 FORCEIDR 标志——修复运行期关键帧请求被静默忽略 2026-10-28 16:05:41 +08:00
viewer fix(viewer): 跳帧后进入「等待 IDR」状态,不再把必然失败的 P 帧喂给解码器 2026-10-28 16:10:40 +08:00
viewer-core feat(viewer-core,android-ffi): v5 光标字段透传到 FFI(帧头 25→30 字节) 2026-11-02 10:39:19 +08:00
.gitattributes feat(agent): 新增 agent-core 与 Linux 被控端(X11 + XTest,纯新增不动 agent/) 2026-10-23 13:31:08 +08:00
.gitignore init: MVP remote desktop (agent/viewer/common) with H.264 pipeline 2026-10-23 09:17:55 +08:00
B侧设计文档.md docs: B侧设计文档(联调基线/码率自适应/打洞中继/多屏文件) 2026-10-23 09:34:21 +08:00
Cargo.lock feat(agent): 相对鼠标注入(读光标+增量+clamp 绝对注入)+ 显式 DPI 感知 2026-10-31 17:34:54 +08:00
Cargo.toml feat(android-ffi): viewer-core 的 JNI 薄层,arm64 交叉编译通过(QUIC 栈上手机的第一道关) 2026-10-29 18:27:34 +08:00
Git协作规范.md docs: 两人分工方案定稿 2026-10-23 09:31:52 +08:00
README.md docs: 打洞设计/多平台架构/借鉴映射/验证记录 2026-10-23 17:32:17 +08:00
借鉴映射与落地规范.md docs: 打洞设计/多平台架构/借鉴映射/验证记录 2026-10-23 17:32:17 +08:00
多平台架构设计.md docs: 记录「不做中继」的最终裁决(2026-10-28) 2026-10-28 16:35:32 +08:00
打洞与信令设计.md docs: 记录「不做中继」的最终裁决(2026-10-28) 2026-10-28 16:35:32 +08:00
打洞验证记录.md fix(tools): 探针区分信令回复与打洞包,修掉打洞假阳性 2026-10-23 18:02:14 +08:00
构建运行手册.md fix(linux-agent): 修正坐标换算单测期望值 + 冒烟脚本纳入单测 2026-10-23 15:04:56 +08:00

mvp-remote

自研远程桌面控制软件(办公场景),技术路线参考网易 UU 远程逆向分析结论。

架构

Crate 角色 说明
common 协议库 控制消息 / 视频帧线格式,三端共享契约
agent 被控端 DXGI 屏幕采集 + openh264(H.264) 编码 + QUIC 服务 + SendInput 键鼠注入
viewer 主控端 QUIC 客户端 + openh264 解码 + minifb 渲染 + 键鼠采集 + 延迟 HUD

构建

cargo build --release

产物:target/release/agent.exe(被控端)、viewer.exe(主控端),需附带 3 个 mingw 运行库 DLL(libstdc++-6 / libgcc_s_seh-1 / libwinpthread-1)。

运行

# 被控机
agent.exe --port 47800 --code 123456
# 主控机
viewer.exe --addr <被控机IP> --port 47800 --code 123456

详见《构建运行手册.md》、《Git协作规范.md》与《打洞与信令设计.md》。