Requires the phone app, not just this plugin: the phone half is a separate APK and must be installed first — download it from https://github.com/Zoragyx/dsh-phone-pair/releases — otherwise the computer side has nothing to pair with. This package is the computer half: it enables the upstream remote-web-ui pairing plugin with a Cloudflare quick tunnel and a fixed relay subdomain, so one scan keeps the phone connected from anywhere.
Install
# from a prebuilt release tarball
dsh plugin --profile web add -w "https://github.com/Zoragyx/dsh-phone-pair/releases/latest/download/dsh-phone-pair-kit.tgz"
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Zoragyx/dsh-phone-pair#path:/plugin/dsh-phone-pair-kit
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
dsh-phone-pair-kit
![]()
⚠️ 先装手机端 App,否则这个插件没法用
本套件只是电脑那一半。手机那一半是一个单独的 Android App,请先下载安装: Releases → DSH-Phone-Pair-1.0.3.apk (包名
com.dsh.phone.pair)。只装电脑端、没有手机端,是没有任何东西可以配对的。
🧪 请把它当成「公开自测版」
这套东西横跨手机 App、Cloudflare 隧道、固定域名中继、系统代理、各种 Android 版本和浏览器内核, 其中相当一部分 bug 作者在自己的机器上复刻不出来,也就无从定位、无从修复。所以:
- 遇到问题先按下面「排错」表自查一遍,那几条覆盖了目前已知的绝大多数坑;
- 自查无果就是真 bug 了,请在 Issues 里报,并附上: 系统版本、DSH 版本、App 版本、
GET /api/pair/status返回的tunnel.state与relay.state、 以及完整报错文字(截图也行);- 你提供的复现信息往往就是修它的唯一线索 —— 只写「用不了」的话,这边大概率还是修不了。
让这台电脑变成可被手机配对的 DSH 主机 —— 也就是 DSH 手机版 · 配对版 App 的服务端那一半。
灵感来源与致谢:本套件只做「插入一段配置、把开关打开」这一件事;配对思路与配对服务端来自上游开源插件
@linxin666/dsh-remote-web-ui(作者 linxin666,源码仓库 https://github.com/zhu1090093659/dsh-web,许可 Apache-2.0)。感谢原作者; 本项目与该作者没有隶属关系,若有任何不妥会立即调整。完整的第三方清单见仓库根目录的NOTICE.md。
装上它之后,电脑会自己开一条 Cloudflare 隧道,并把这条隧道登记成一个固定域名
https://<id>.dsh-market.com;手机只要配对一次,之后无论在家里还是在外面都能连回来,不用重新扫码。
它到底装了什么
| 组件 | 作用 |
|---|---|
@linxin666/dsh-remote-web-ui(依赖,由本套件自动插入) |
提供配对端点:/pair-accept?pair=<code>(用一次性令牌换设备凭据)、/pair-app(手机版界面壳)、按设备可撤销的会话、设置页里的「远程访问」面板与二维码 |
cordis.patch.yml(本套件) |
把上面那个插件插进来,并打开 autoTunnel: true(开机自动起隧道,不需要 Cloudflare 账号或域名)与 relay: true(登记固定域名,重启后手机不用重配对) |
本套件自己的 lib/index.js 不提供任何端点,只写一行日志,所以它不会和别的插件抢资源。
安装
DSH 的插件以「profile bundle」的形式挂载。任选一种:
A. 从目录装(本地开发)
# 把本目录放进某个 profile 的 node_modules,并登记到 bundles
$profile = "$env:USERPROFILE\.dsh\profiles\desktop"
Copy-Item . "$profile\node_modules\dsh-phone-pair-kit" -Recurse -Force
# 然后编辑 $profile\package.json,把 "dsh-phone-pair-kit" 加进 dsh.profile.bundles 数组
B. 从市场装(推荐)
本套件已于 2026-10-15 收录进 DSH 插件市场(awesome-dsh-plugin 目录),
市场页面:awesome-dsh-plugin.com/p/Zoragyx/dsh-phone-pair--plugin-dsh-phone-pair-kit。
打开 设置 → 插件,搜 dsh-phone-pair 点安装即可,也可以直接复制市场页面给出的安装命令。
投稿材料保留在仓库的 market/ 目录里,供溯源用。别忘了先装上面那个手机端 App,
否则电脑端装好了也没得配。
C. 从 GitHub 装
# 需要本机装了 git —— pnpm 会用 git ls-remote 去问默认分支;
# 没装 git 会报 "'git' 不是内部或外部命令",那就用 A 方式:
# 在仓库页面点 Code → Download ZIP,解压后把路径指向 plugin\dsh-phone-pair-kit
pnpm add github:Zoragyx/dsh-phone-pair#path:plugin/dsh-phone-pair-kit
装完打开远程访问面板(入口:设置按钮旁边的手机图标,或「设置 → Web 插件 → 远程访问」;单独装插件时在设置的插件行):面板会显示固定域名和二维码/配对链接。 如果面板提示「当前服务仅绑定在 127.0.0.1 且未配置公网地址」,说明隧道还没起来,看下面「排错」。
手机侧怎么用
- 手机装
DSH 手机版 · 配对版(Releases 里的DSH-Phone-Pair-1.0.3.apk,包名com.dsh.phone.pair)。 - 电脑上打开「远程访问」→ 复制配对链接(形如
https://<id>.dsh-market.com/pair-accept?pair=xxxx)。 - 把链接发到手机,点开或在 App 的配对页粘贴,然后设置一个进入密码。
- 之后每次打开 App:先输密码 → 界面直接用本机缓存渲染,不用重新下载。
前置条件
- DSH
>= 0.2.0-rc.2 - Node
^22.19.0 || >= 24.0.0 - 电脑能出网。如果电脑走系统代理(Clash / v2ray 等):
cloudflared是 Go 程序,只认HTTPS_PROXY环境变量,不读 Windows 的 IE/WinINET 代理设置。隧道起不来时先设:
然后重启 DSH。不设代理也能用,就把这两个变量清空。[Environment]::SetEnvironmentVariable('HTTPS_PROXY','http://127.0.0.1:7897','User') [Environment]::SetEnvironmentVariable('NO_PROXY','localhost,127.0.0.1,::1','User')
安全边界(务必读一遍)
- 配对成功的手机 = 完全控制凭据:它能收发会话、改设置、看产出物。手机丢了就在「远程访问」 面板里撤销那台设备,或者复位手机 App(设置 → 复位本机)。
- 配对/自更新/插件安装这三个控制面仍然只在回环上开放,公网拿不到。
- 服务只绑 127.0.0.1(
lanAvailable: false),暴露面只有出站隧道,不需要开--host 0.0.0.0。 - 一次性配对令牌默认 10 分钟失效;配对成功后手机拿到的是一年期的 HttpOnly Cookie。
- 想彻底关掉:删掉 profile
cordis.patch.yml里指向remote-web-ui的条目(或卸掉本套件), 固定域名立刻失效。
排错
| 现象 | 原因 / 处理 |
|---|---|
| 面板说没有公网地址 | 隧道没起来:多为代理问题(见上),或云端 CF 边缘抖动,等 1 分钟看 GET /api/pair/status 的 tunnel.state / relay.state |
手机打不开 https://<id>.dsh-market.com/pair-app,返回 530 |
中继正在把固定域名重指到新隧道(隧道重启后常见),等十几秒重试;再不行重启 DSH |
| 隧道地址每次重启都变 | 这是快速隧道的正常行为;固定域名由 relay 负责,手机不用重配对 |
| 手机上白屏很久 | 首次要把约 10 MB 客户端拉下来(配对版已经把 28 MB 资源内置,正常不会遇到) |
面板顶部红字「固定域名同步失败」,二维码变成 *.trycloudflare.com |
插件连不上 dsh-market.com:本机 HTTPS_PROXY 指向一个没在运行的代理(例如 Clash 没启动)时 fetch 直接失败。启动代理软件,或给 NO_PROXY 加 dsh-market.com,.dsh-market.com,或清掉 HTTPS_PROXY;然后点面板「刷新二维码」 |
| 手机上粘贴链接后提示「输入完整的链接」/「链接被截断」 | 复制了面板上被省略号截断的可见文字,或误点『复制令牌』(那是给 Docker/反向代理环境用的裸令牌)。改点『复制链接』整条发送;App ≥ 1.0.2 会把具体原因讲清楚 |
手机上粘的是 http://192.168… 却配不上 |
1.0.2 及更早的 App 只接受 https;1.0.3 起内网地址的 http 可以直接配对(手机与电脑要在同一网络/同一 Tailscale 网络)。公网域名的 http 仍会被拒,改用面板的「公网地址」 |
| 手机浏览器点「继续」提示「暂时无法保存确认状态,请重试」 | 这是 DSH 自己的「预览版说明」要把确认状态写回电脑,而浏览器没带上配对 Cookie。从聊天里点开链接(别手输/别存书签)、用系统 Chrome/Edge(别用微信内置浏览器、别开无痕、别阻止第三方 Cookie),或直接用配对版 App |
卸载
- 从 profile
package.json的dsh.profile.bundles里移除dsh-phone-pair-kit。 - 删掉
node_modules\dsh-phone-pair-kit(可选:一并删掉@linxin666/dsh-remote-web-ui)。 - 删掉 profile
cordis.patch.yml里对应的remote-web-ui条目,避免残留配置。
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-remote-web-ui★ 10680
Remote control of a dsh web workspace from phone or PC: QR-code pairing through a token-gated channel, SSE real-time sync, and separate mobile and full desktop GUI modes.
zhu1090093659/dsh-web#packages/dsh-ssh★ 10680
SSH ops panel for DSH: web terminal, SFTP transfer with progress, local port forwarding, and one-command cluster execution across hosts; agents share the same host config.
liguobao/ds-harness-remote★ 3947
Multi-device remote access for DeepSeek Harness and supported coding workspaces through an end-to-end encrypted channel, with adaptive Relay/WebRTC transport, device authorization, workspace files, read-only previews, terminals, and optional Codex Remote.
saya-ch/dsh-mobile★ 1018
Access DeepSeek Harness from the Android app or a mobile browser with secure LAN and remote connections, persistent device pairing, and a customizable mobile interface.
uumit-ai/dsh-uumit-remote★ 533
Open dsh web from your phone or another computer through a UUMit account, without running your own server or installing another program: a built-in tunnel client connects to UUMit's hosted tunnel, and a panel in the sidebar handles pairing and who can use it (only you, people you invite by link or phone number, or everyone), with revocation. Requires dsh web on DSH >=0.2.1-rc.2.
ZSeven-W/dsh-ios★ 485
A live iOS Simulator or USB-connected iPhone inside the conversation: 22 agent tools for booting, building, driving the UI by accessibility identity or OCR text, list-row actions and SwiftUI preview hot reload, plus a streaming sidebar panel you can tap and drag on.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.