dsh-plugin-mobile
Verifieddsh-plugin-mobile · v1.9.6 · MIT · Web UI
把 DeepSeek Harness 变成手机可遥控:扫码在手机浏览器查看工作区/会话与实时对话、发消息、停止当前输出;左侧导航「手机遥控」整页带二维码配对、运行时开关、刷新认证码,支持局域网与内置 cloudflared 的公网 HTTPS 隧道。
Install
dsh plugin add dsh-plugin-mobile Confirm the layer applied with dsh --profile default --dump-config — see the install guide.
Source
Published to npm without a public repository. Inspect the package contents before installing.
Tags
Readme
dsh-plugin-mobile
把 DeepSeek Harness(DSH) 变成可以用手机遥控的插件:给 DSH 主机加一个独立 HTTP 端口,手机浏览器扫码即连,查看工作区 / 会话、实时对话,并直接在会话详情里发消息、停止当前输出。默认只服务局域网;配置一行 tunnel: true 即可用包内自带的 cloudflared 开公网 HTTPS 入口(同样生成二维码)。
本包是 DSH 的 bundle 插件(
dsh.bundle.patch+dsh.client),需要 DSH 桌面/Web profile 才能运行,不是独立 App。
功能
- 扫码配对:桌面左侧导航「手机遥控」页面显示局域网 / 公网每一条配对链接的二维码 + 复制按钮,Cookie + 32 字节令牌鉴权。
- 实时会话列表:工作区、会话、运行中状态,SSE 实时更新。
- 点进会话看对话:手机端详情页按 normalized surface 展示 user / assistant / tool 消息与工具调用摘要,自动跟随新消息(SSE + 轮询兜底)。
- 底部输入框发消息:与桌面输入框同一条
sessionController.prompt路径;运行中发送会排到本轮之后(不打断)。 - 停止当前输出:只在会话详情底部一个「停止」按钮,与桌面「停止」同一条
cancel路径;主列表不放停止入口,避免误触。 - 运行时开关:桌面页可「打开遥控 / 关闭遥控 / 重启 / 刷新二维码(强制轮换令牌)」,关闭会连带结束公网隧道进程。刷新令牌后旧链接、旧二维码、已扫码手机立即失效。
- 公网访问:包内 vendored cloudflared(Windows 版),
config.tunnel: true零安装开快速隧道;也支持自装 cloudflared / ngrok(自定义command+urlPattern)或现成的 HTTPSpublicUrl。隧道后台启动,不阻塞 DSH 启动。 - 安全加固:认证失败限流(同 IP 8 次/分钟 → 429 10 分钟)、公网自动 HSTS / Secure Cookie、安全响应头、
trustProxy下取真实客户端 IP。

安装
用 DSH 自带的插件命令(link: 方式安装本地目录):
dsh plugin --profile desktop add link:D:\path\to\mobile-plugin
然后把包名加进 profile 的 dsh.profile.bundles(如果 dsh plugin add 没自动加):
{
"dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-plugin-mobile"] } }
}
必须完全退出并重启 DSH(Host 半和左侧导航页面在主机启动时加载),再刷新页面 → 左侧「手机遥控」。
配置
在 profile 的 cordis.patch.yml(或插件包自带的 cordis.patch.yml)里按 id 覆盖:
- id: dsh-plugin-mobile
name: "dsh-plugin-mobile"
config:
enabled: true # false = 启动时遥控关闭,可在页面打开
port: 63027 # 默认 63027,占用时顺延到 63032
tunnel: true # 用包内 cloudflared 开公网 HTTPS(可选)
trustProxy: true # 走隧道/反代时建议打开
# publicUrl: 'https://dsh.example.com'
# publicOnly: true # 只走公网,不监听局域网
公网入口默认排在第一张二维码;不用时点「关闭遥控」会同时停掉隧道。

安全提示
配对链接 = 控制权:拿到链接的人可以查看对话、发消息、停止任务。链接不要发群、不要截图外传;临时不用请「关闭遥控」。公网请务必走 HTTPS(隧道/反代),不要用路由器把明文 HTTP 端口直接映射到公网。
开发 / 源码结构
index.js:Host 半(HTTP/SSE、鉴权、限流、二维码、隧道生命周期、transcript/prompt/cancel 接口)。client.js:DSH Client 半(左侧导航 + 整页 UI)。mobile/app.html:手机端单文件页面(零外链)。mobile-plugin/vendor/qrcode.cjs:qrcode-generator 1.4.4(MIT)。vendor/cloudflared/cloudflared.exe:cloudflared 2026.10.5(Apache-2.0,用于零安装公网隧道)。
接口契约见仓库中的 CONTRACT.md。
License
MIT。第三方组件许可见 THIRD-PARTY-NOTICES.md。