通过 Tailscale 从手机或平板远程操控本机 DSH:运行中的 Web UI 只对本人 tailnet 开放,网页服务仍绑 127.0.0.1。设置页先逐项自检并验证真实登录链路,通过后才给出登录链接和二维码;前提是 Web UI 在运行、Tailscale 链路打通、个人 PC 保持开机唤醒。
安装
# npm 包(预构建)
dsh plugin --profile web add @game25011/dsh-remote-access
# Release 预构建包
dsh plugin --profile web add "https://github.com/game25011/dsh-remote-access/releases/latest/download/game25011-dsh-remote-access.tgz"
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:game25011/dsh-remote-access
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
Remote-control the local DSH through Tailscale. The plugin exposes the running DeepSeek Harness (DSH) Web UI to your own Tailscale tailnet, so a phone or tablet can drive the same sessions, models and permissions as the PC — with a settings page and /remote command for the authenticated login link.
- The Web UI keeps binding
127.0.0.1; the only external door is Tailscale (WireGuard, tailnet-only). - On activation the plugin reads the local Web UI port, builds the authenticated URL, writes it to
$DSH_HOME/remote-access/url.txt, and runstailscale serve --bg --https=<port> http://127.0.0.1:<web port>. /remoteprints the login link (with the per-process token)./remote on//remote offtoggle the Serve mapping.- A Settings → 远程访问(Tailscale) page shows the same link with a copy button, a QR code for the tablet camera, the live Serve status/toggle and the trusted-host self-check.
- Closing the app turns the Serve mapping off.
- No runtime dependencies, no telemetry; the QR encoder is vendored (MIT).
Prerequisites (must all hold)
- The DSH Web UI is available and running on the PC — the desktop app runs it, or a
dsh webprocess does. The plugin attaches to that running Web UI; it does not start one. - The Tailscale link is up on both ends — Tailscale installed and logged in on the PC and on the phone/tablet, both nodes online in the same tailnet, and the tailnet hostname added to
connection.trustedHosts(see below). - The personal PC can stay powered on and awake — the PC is the server: if it shuts down, sleeps, or the DSH app exits, the remote entry stops working.
Also required: DSH >=0.2.2-rc.0 <0.3.0 (host services webServer, connection, commands), and HTTPS Certificates enabled for the tailnet (Tailscale admin → DNS → HTTPS Certificates) when using --https=443.
If any prerequisite is missing, /remote and the settings page show a readable error instead of failing silently.
Install
From npm:
dsh plugin --profile <profile> add @game25011/dsh-remote-access
From a local checkout:
dsh plugin --profile <profile> add /path/to/dsh-remote-access
Then restart DSH; profile patches apply at startup.
Trusted hosts (required)
DSH's browser trust fence only accepts loopback or authorities listed in connection.trustedHosts.
The bundle patch reads:
DSH_REMOTE_TRUSTED_HOSTS=host.tailnet.ts.net,100.x.y.z
or override the row in your own profile patch (applied after the bundle patch):
- id: connection
config:
trustedHosts:
- host.tailnet.ts.net
/remote prints a warning when the public host is missing from trustedHosts.
Configuration
- id: remote-access-link
config:
serve: true # manage tailscale serve on/off
servePort: 443 # https port served to the tailnet
publicUrl: '' # default: https://<MagicDNS name>/ from tailscale status --json
tailscalePath: '' # default: platform autodetect / PATH
statusTimeoutMs: 5000
Security
- The printed link contains a process-scoped login token; treat it like a password.
- Prefer a low default permission preset (e.g.
workspace-writewith approval) for remotely driven sessions. - Tailscale Funnel is not used and not needed.
- The plugin does not change DSH authentication; the token/cookie flow stays the same.
- See SECURITY.md for the threat model and reporting.
Docs
Roadmap
- Optional auto-revoke on idle.
- Non-Serve transports (explicit bind + own proxy).
Development
node --check index.js
npm test
npm pack --dry-run
Authorship and maintenance
Built by DeepSeek (DS) — the plugin's code, tests and docs were produced by a DeepSeek Harness agent. The human user is responsible for real-device testing (PC + Tailscale + phone/tablet) and for ongoing maintenance and releases. See AI-DISCLOSURE.md.
License
MIT — see LICENSE.
中文说明
通过 Tailscale 远程操控本机 DSH:把本机 DSH Web UI 通过 Tailscale Serve 暴露给 tailnet,手机/平板就能像在 PC 上一样使用同一批会话、模型和权限;插件提供设置页与 /remote 命令管理登录链接。
- 网页服务仍只绑
127.0.0.1,外部入口只有 Tailscale(WireGuard,仅 tailnet 可达)。 - 启动时自动读本机 web 端口,写登录链接到
$DSH_HOME/remote-access/url.txt,并执行tailscale serve --bg --https=<端口> http://127.0.0.1:<web端口>。 /remote显示登录链接;/remote on//remote off开关 Serve 映射;应用退出时关闭映射。- 设置 → 远程操控(Tailscale) 页显示链接+复制、二维码(平板扫码)、Serve 状态/开关与信任自检。
- 无运行时依赖、不联网、不调用模型;二维码编码器为 vendored(MIT)。
使用前提(三条必须同时满足):
- DSH Web UI 可用且在运行(桌面应用自带,或
dsh web进程);插件依附它,不负责启动; - Tailscale 链路打通(PC 与手机/平板都安装并登录 Tailscale、同 tailnet 在线,且 tailnet 主机名已加入
connection.trustedHosts); - 个人 PC 可保持开机与唤醒(PC 是服务端,关机/睡眠/DSH 退出后远程入口即失效)。
安装:dsh plugin --profile <profile> add @game25011/dsh-remote-access,然后重启 DSH。
必需配置:把 tailnet 主机名加进信任栅栏——设 DSH_REMOTE_TRUSTED_HOSTS=host.tailnet.ts.net,或在 profile patch 里覆盖 connection.config.trustedHosts。
安全:链接含进程级登录 token,等同密码;远程会话建议用低权限档;不启用 Funnel;不改动 DSH 认证实现。详见 SECURITY.md。
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-remote-web-ui★ 10458
手机/PC 远程操控 dsh web 工作区:扫码配对、令牌门控通道、SSE 实时同步,提供移动端与完整桌面 GUI 两种远程形态。
zhu1090093659/dsh-web#packages/dsh-ssh★ 10458
SSH 远程运维面板:Web 终端、SFTP 传输、本地端口转发与一条命令并发集群执行,Agent 与面板共用同一份主机配置。
liguobao/ds-harness-remote★ 3072
通过端到端加密通道远程访问 DeepSeek Harness 及兼容的编码工作区,支持自适应 Relay/WebRTC 传输、设备授权、工作区文件、只读预览、终端和可选的 Codex Remote。
saya-ch/dsh-mobile★ 868
通过 Android App 或手机浏览器访问 DeepSeek Harness,支持安全局域网连接、远程访问、持久设备配对和可自定义移动界面。
uumit-ai/dsh-uumit-remote★ 523
用 UUMit 账号在手机或其他电脑上打开这台电脑的 dsh web,不用自建服务器、不装其他程序:插件内置通道客户端连接 UUMit 托管的通道,侧栏里的面板负责配对和选择谁能用(仅自己、通过邀请链接或手机号授权的人、所有人),可随时撤销。需 dsh web 且 DSH >=0.2.1-rc.2。
ZSeven-W/dsh-ios★ 468
在对话里直接操作 iOS 模拟器或 USB 连接的 iPhone:22 个 Agent 工具用于启动、构建、按无障碍标识或 OCR 文本驱动 UI、列表行操作与 SwiftUI 预览热重载,并附带可点击拖拽的流式侧边栏面板。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。