@deepseek-ai/dsh-auth-tunnel
Password-gated public access for the Web GUI via Cloudflare Tunnel: a loopback password gate (login page + HMAC cookie) in front of the webserver, published by spawning cloudflared in quick or named-tunnel mode - tells the shell and the model the public URL
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ai-eks/dsh-auth-tunnel说明文档
阅读完整 README ↗@deepseek-ai/dsh-auth-tunnel
English | 中文
无需修改 deepseek-harness,即可通过带共享密码保护的 Cloudflare Tunnel 公网访问 DeepSeek Harness Web GUI。
使用
前置条件
dshCLI 和 pnpm 已加入PATH;Web profile 不存在时,插件命令会自动创建。cloudflared已加入PATH,或在插件中配置其绝对executable路径。- 一个以 DSH 凭据保存的长随机共享密码。
安装
从 Git 安装 bundle:
dsh plugin --profile web add github:ai-eks/dsh-auth-tunnel
Git 安装通过 prepare 构建检出的源码。pnpm 10 及以上版本可能先要求允许该构建;按照 dsh 打印的 profile pnpm-workspace.yaml 路径和准确包名配置后,重新执行命令。
使用本地 checkout 时,先构建再添加路径:
cd /path/to/dsh-auth-tunnel
pnpm install
dsh plugin --profile web add .
该 bundle 会以 quick 模式插入并启用 auth-tunnel 行,同时把 Host 原生目录选择器替换为应用内浏览器选择器。不需要修改 deepseek-harness 源码,也不需要额外添加 profile 行。
Quick 模式
Quick 是默认模式。把共享密码写入 $DSH_HOME/.credentials.yaml($DSH_HOME 默认为 ~/.dsh):
DSH_WEB_PASSWORD: 'replace-with-a-long-random-password'
启动 Web profile:
dsh web
隧道就绪后,终端会打印:
cloudflare tunnel: https://.trycloudflare.com
打开这个 URL,在登录页输入 DSH_WEB_PASSWORD 对应的密码。只分享 URL,不要分享密码。启用的行也会显示在 Web Settings → Plugins 中。
命名隧道模式
公网域名需要保持稳定时使用 token 模式。在 Cloudflare 创建命名隧道,绑定 gui.example.com 之类的域名,并让 dashboard ingress 指向固定 loopback 密码门,例如 http://127.0.0.1:7677。
把两个凭据写入 $DSH_HOME/.credentials.yaml:
DSH_WEB_PASSWORD: 'replace-with-a-long-random-password'
DSH_TUNNEL_TOKEN: 'eyJhIjo...'
在 $DSH_HOME/profiles/web/cordis.patch.yml 中覆盖 bundle 行:
- id: auth-tunnel
disabled: false
config:
mode: token
tokenRef: DSH_TUNNEL_TOKEN
publicHostname: gui.example.com
gatePort: 7677