mervyn-teo/dsh-plugin-qr-connect
DeepSeek Harness dynamic plugin: QR-code sidebar button for connecting mobile devices to the web UI
已收录
3
Remote
Bundle 已验证
预览
功能介绍
「设置」按钮上方的一键二维码,让手机通过带鉴权的反向代理连接 Web 界面。
适合
- 希望通过扫描二维码在手机上快速打开现有 DSH Web 界面的用户。
- 需要把 HTTP 与 WebSocket 流量代理到本机 Web UI 的可信网络工作流。
- 需要配置二维码密钥轮换周期和会话时长的用户。
不适合
- 需要强化防护或面向不可信网络的远程访问场景;持有密钥或会话 Cookie 即可访问完整 agent shell。
- 未挂载 subprocess、文件系统和 webServer 服务的主机。
- 代理端口无法从互联网访问的公网连接,或扫码设备无法访问该端口的局域网连接。
README
dsh-plugin-qr-connect
| English | 中文 |
A DeepSeek Harness (DSH) Web plugin that adds a QR-code button above the Settings button in the sidebar footer. It runs a small auth-gated reverse proxy so a phone on the same network (or the internet) can scan a QR code and open the web UI securely. It is a persistent bundle plugin (a host half plus a browser half) that loads on every boot.
Demo
What it does
- Adds a full-width button (
sidebar.footer.action, idqr-connect) stacked above the shipped Plugins button. - Opens a fading panel with two QR codes:
-
Local network —
http://<lan-ip>:<port>/?auth=<secret>. -
Public internet —
http://<public-ip>:<port>/?auth=<secret>(blue).
-
Local network —
- The reverse proxy (a child
nodeprocess on0.0.0.0:<port>) validates the secret, issues a session cookie (default 30 days), and forwards to the loopback web UI — including WebSocket upgrades so live updates reach the phone. - The secret rotates every 30s by default and the QR refreshes to match
(configurable;
0disables auto-refresh). - Click a QR to copy its link; the public QR has an info tooltip.
- A QR connect card under Settings → Plugins configures the proxy port, session length, and refresh interval.
- English and Chinese UI via DSH’s locale service.
Files
| File | Purpose |
|---|---|
lib/index.js |
Host half — runs the reverse proxy and the /__qr/* state routes. |
lib/client.js |
Browser half — the QR button and the settings card. |
lib/proxy.cjs |
The auth-gated reverse proxy child process (HTTP + WebSocket). |
cordis.patch.yml |
Composition patch that inserts the plugin row. |
package.json |
Package metadata (dsh.bundle + dsh.client manifest). |
Install
dsh plugin --profile web add github:mervyn-teo/dsh-plugin-qr-connect
Then restart dsh web — host bundles load at boot.
Defaults live in cordis.patch.yml (port, sessionDays, refreshSeconds).
Change them there (or in the profile’s own cordis.patch.yml) and restart, or
adjust them at runtime from the settings card. The host half serves three
same-origin routes the browser half uses: GET /__qr/info,
POST /__qr/rotate, and GET|POST /__qr/config.
Requirements
- DSH with the
subprocess,fs, andwebServerservices mounted. - Internet access from the DSH host for the public-IP lookup
(
https://api.ipify.org). - The scanning device must be able to reach the proxy port (a host firewall may need an allow rule); the public QR also needs internet reachability (port-forwarding).
Local-IP and public-IP detection run in-process (no ip/curl/shell commands),
and manual secret rotation signals the proxy child over its stdin, so the host
half works on Windows, macOS, and Linux.
Security
The proxy exposes the full agent shell to anyone who can reach the port, gated only by the 30s secret and the session cookie. Use a short session length and treat this as a trusted-network convenience, not a hardened remote-access layer.
License
常见问题常见问题
在启用了 DSH 的终端中执行已验证命令 dsh plugin --profile default add github:mervyn-teo/dsh-plugin-qr-connect。命令会解析公开 package 元数据,并保持插件与本页展示的目录身份一致。
兼容性以页面上展示的 bundle 与 profile 状态为准。如果某个 profile 尚未检测到,请先保持禁用,并在生产启用前阅读仓库文档。
GitHub 链接和 activity 元数据是 release 与维护状态的来源。新版本发布后重新查看本页,确认目录已经观察到最新版本。