DSH Plugins Marketplace

DSH Plugins

Plugins

/

Security & Audit

/

dsh-plugin-notoken

d

dsh-plugin-notoken

Manifest valid

When using a reverse proxy, allow the first access without a token

hasBundlePatch

dsh-plugin-notoken

DSH 本地插件:注册一个登录入口路由(默认 GET /__dsh_login),把进程里的登录 token 换成浏览器会话 cookie,让首次访问不用带 ?token=…。

⚠️ 不安全

装上之后,任何能访问这个端口、并且 Host 通过 DSH 信任围栏的人,都等于拿到了 operator 权限 —— 可以执行工具、读取凭据、以运行 dsh web 的 OS 用户身份操作这台机器。

原理

DSH 只在两处做浏览器认证:frontend-static 渲染 index 前调用 connection.authorizeIndex(),以及 /api 路由自己的准入检查。插件注册的具名路由在两者之前匹配、默认不认证 —— 入口就在这条缝里:

GET /__dsh_login
  ├─ connection.requestRejection()  先过信任围栏:403 拒绝;401(还没有会话)放行
  ├─ connection.authenticatedUrl()  取当前进程 token(每次请求都取,重启后仍有效)
  ├─ connection.authorizeIndex()    进程内完成 token → cookie 交换(303 + Set-Cookie)
  └─ 普通导航:把 303 转发给浏览器
     跨站导航(点链接、主屏幕图标启动):直接返回应用外壳,cookie 一起下发
     (那条链上 SameSite=Strict 的 cookie 会被一直扣住,走 303 会变成"重定向次数过多")

不签 cookie、不接触密钥、不解析启动输出、不改 DSH 源码。

安装

$DSH plugin --profile web add @beyondandsharp/dsh-plugin-notoken         # 从 npm
# 也可以直接装 GitHub 或本地目录:
$DSH plugin --profile web add github:BeyondandSharp/dsh-plugin-notoken
$DSH plugin --profile web add /path/to/dsh-plugin-notoken                # DSH=/path/to/dsh

nginx

示例见 examples/nginx.conf:把裸 / 的 401 在服务端内部改写成入口, 地址栏全程停在 /。两条硬规则:Host 原样透传(cookie 绑定它),且该 authority 在 trustedHosts 里; 只拦 location = /,/api 与 WebSocket 一律原样透传。

验证

node --test && bash verify/e2e.sh

Comments

Loading…

Similar plugins

dsh-skip-browser-auth

by iasiv5

DSH 插件:(Web Profile 专用)自动跳过 BrowserAuth,访问 Web 地址即可直接使用,无需每次复制启动 URL 中的随机 Token 到浏览器。

Security & AuditManifest valid

★ 4

↓ 940/wk

MIT

JavaScript

Nov 13, 2026

dsh plugin --profile web add @iasiv5/dsh-skip-browser-auth

by lvxianchao

Password gate for the DeepSeek Harness Web UI: one login, automatic launch-token exchange, Host/Origin rewrite, and a secure-context polyfill. Zero dependencies.

Security & AuditManifest valid

★ 0

MIT

JavaScript

Nov 5, 2026

dsh plugin --profile web add @lvxianchao/dsh-guard

by ChrisLou-bioinfo

DSH plugin: token usage statistics across all sessions as a settings page (zero-dep, no build)

Terminal & ClientsManifest valid

★ 0

MIT

JavaScript

Oct 8, 2026

dsh plugin --profile web add dsh-usage-lite

by linz919

DSH Web 密码门禁 – Cookie 认证 + 首次强制设密 + 登录失败锁定60s + 内置访问日志查看器。零依赖,原生集成设置页。

Manifest valid

★ 0

MIT

JavaScript

Sep 10, 2026

dsh plugin --profile web add dsh-web-pass

by ravenli059

用于dsh-web加强安全性的插件,可设置用户名密码进行登录

Manifest valid

★ 0

MIT

JavaScript

Aug 31, 2026

dsh plugin --profile web add dsh-login

by runfali

dsh 登录门卫插件:让只监听本机的 dsh Web UI 安全地对外开放——登录墙 + 全量反代,零依赖、零侵入。

Manifest valid

★ 4

MIT

JavaScript

Sep 24, 2026

dsh plugin --profile web add dsh-login-gateway