dsh-jiuling-remote-android
Identified★ 1DSH 远程目录(安卓端):6 位配对码接入电脑端 dsh-jiuling-remote-desktop,凭据只留在引擎进程,提供 RPC / SSE 桥接与设置页。
dsh-jiuling-remote-android
DSH 远程目录的安卓端插件。配合电脑端的 dsh-jiuling-remote-desktop 使用:手机输一个 6 位配对码,就能经 Cloudflare 隧道连到那台电脑的 DSH —— 公网只传文本,不映射桌面。
这一版做了什么
| 能力 | 状态 |
|---|---|
| 6 位配对码换凭据(claim → 落盘) | ✅ |
| 凭据只存在引擎进程,页面永不回显令牌 | ✅ |
本地 RPC 桥 /api/dsh-remote/android/rpc | ✅ |
本地 SSE 桥 /api/dsh-remote/android/stream(含 fromSeq 增量重连) | ✅ |
| 设置页「手机远程」:配对 / 测试 / 解绑 / 状态 | ✅ |
| 在「选择文件夹」弹窗里加「电脑」页签 | ❌ 未实现(见下) |
| 把电脑的对话事件镜像进手机本地会话 | ❌ 未实现(见下) |
| 模型 / 预设按工作区隔离、流式逐字动画 | ❌ 未实现(见下) |
后三项依赖官方 directoryFlow slot 契约与 sessionController.prompt 拦截,必须在真机上反复调试才敢交付。本版刻意只做可离线验证的那一层:配对、凭据、桥接。
安装
# 在手机的 DSH profile 里
pnpm add -w dsh-jiuling-remote-android
插件是 bundle 型(cordis.patch.yml 会 insert 一行到 loader 树),装完重启 DSH 生效。
使用
- 电脑上:设置 → 手机远程 → 填激活码绑定 → 生成配对码(屏幕显示 6 位码)。
- 手机上:设置 → 手机远程 → 输入那 6 位码 → 连接。
- 点「测试连接」应显示已连上电脑的
platform。
配对码是一次性的,10 分钟过期;换电脑重新配对即可。
桥接接口
全部挂在 DSH 自己的 Web 端口上(同源),且只接受 loopback Host:
| 方法 | 路径 | 用途 |
|---|---|---|
| GET | /api/dsh-remote/android/status | 配对状态(不含令牌) |
| POST | /api/dsh-remote/android/pair | {pairCode} → claim 并落盘 |
| POST | /api/dsh-remote/android/unpair | 只清本机凭据 |
| POST | /api/dsh-remote/android/ping | 打一次电脑的 ping |
| POST | /api/dsh-remote/android/rpc | {method, params} → 转发电脑的 /api/dsh-remote/rpc |
| GET | /api/dsh-remote/android/stream?session=…&fromSeq=… | SSE 原样透传 |
RPC 可用的方法以电脑端实现为准(ping / listSessions / createSession / prompt / cancel / listDirectory / fileList / fileRead / modelCatalog / presetList / answerAsk …)。
安全设计
- 令牌不入页面:落盘在
$DSH_HOME/dsh-remote-android/config.json(0600),响应体里只有paired/endpoint。 - 令牌不走 URL query:只在
x-dsh-remote-token头里,避免进隧道日志与 access log。 - 不跟随重定向:
302跨源会把令牌带到攻击者主机上,所以 3xx 一律当错误。 - 域名白名单:只往
*.jiulingssh.xyz发凭据(config.json的zones可改,自建部署不用改源码)。 - 拒绝 IP 字面量 / localhost / 明文 http:防 DNS rebinding 与裸奔。
- 桥只服务本机页面:Host 不是 loopback 直接 403(引擎的 webserver 在路由命中前不做鉴权)。
- 旧版公开令牌识别:见到已泄露的历史常量当「未配对」,不会拿它去连。
配置
$DSH_HOME/dsh-remote-android/config.json:
{
"endpoint": "https://<你的隧道>.jiulingssh.xyz",
"token": "<配对后由服务器下发>",
"zones": ["jiulingssh.xyz"],
"pairEndpoint": "https://pair.jiulingssh.xyz"
}
也可用环境变量 DSH_REMOTE_ENDPOINT / DSH_REMOTE_PAIR_ENDPOINT 覆盖默认值。
已知限制
- 未在真机验证:本版只跑过离线自测(
node selftest.mjs),域名白名单 / 配置读写 / 令牌识别这些纯逻辑。真机上「配对 → 桥接」链路的端到端验证需要电脑端同时在线。 - 手机端不跑 LLM,也不镜像电脑的对话;本版只把管道铺好,聊天镜像留给后续版本。
- 电脑端若在设置里「解绑」过,手机会一直显示已配对而实际 401 —— 请在手机上点「解绑」再重新配对。
开发
node --check lib/index.js # 语法
node selftest.mjs # 离线自测(8 项)
许可
MIT
Comments
Loading…
From the same category
by awesome-dsh-plugin
A curated list of plugins for DeepSeek Harness (dsh) · DeepSeek Harness 插件精选列表
★ 20.9k
CC0-1.0
Python
Oct 26, 2026
by 0xsline
DeepSeek Harness (DSH) ecosystem: curated plugins, tools, and infrastructure from dsh-external/hub and the public dsh-plugin topic.
★ 1.3k
CC0-1.0
Python
Oct 16, 2026
by pax-beehive
Open-source CLI, schemas, resolver, and DSH agent tools for DSH Plugin Hub
★ 277
MIT
TypeScript
Oct 20, 2026
by Yuuyuko-uu
DSH 鱼的记忆:给会话一份会淡忘的长期记忆,每条都带时间
★ 263
MIT
JavaScript
Oct 26, 2026
dsh plugin --profile web add dsh-fish-memoryby xiajiajun516
DeepSeek Harness (DSH) backup & restore plugin — export, import, migrate and sync your complete DSH configuration, plugins, MCP servers, skills and workspace. One-click migration to another machine.
★ 251
MIT
TypeScript
Oct 25, 2026
dsh plugin --profile web add dsh-config-managerby yjh051108
推荐组件(非必须):DeepSeek Harness 运行时注入器;已随 dsh-routing-suite 单仓库化保留,本仓库继续维护/发布。
★ 167
TypeScript
Oct 16, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injector