dsh-simple-auth
超轻量 DSH 登录网关插件:支持共享密钥或主/客密钥、ACL 过滤会话列表及所有者分享控制,无生产依赖。
AI 分析
核心用途是为 DSH Web 服务添加轻量级的访问控制和登录页面。适合将 DSH 部署在公网或局域网服务器上、需要防止未授权访问的多用户共享场景。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:lt9/dsh-simple-auth說明文件
閱讀完整 README ↗Configuration
All keys are optional. Defaults are applied in code (home-layer patch config replaces the whole object, it does not deep-merge).
| Key | Default | Meaning |
|---|---|---|
keyEnv | DSH_SIMPLE_AUTH_KEY | Environment variable that holds the access key |
keyFile | "" | If set, read the key from this file (trimmed). Takes precedence over keyEnv |
cookieName | dsh_simple_auth | Session cookie name |
sessionTtl | 604800 | Cookie lifetime in seconds (7 days) |
cookieSecure | auto | auto follows X-Forwarded-Proto; true / false force the Secure flag |
rewriteLoopback | true | Present authenticated traffic as `127.0.0.1: |
| ` so dsh’s reverse-proxy Host fence does not 403 privileged APIs | ||
title | DeepSeek Harness | Login heading |
hint | (built-in zh/en copy) | Login subtitle |
remember | true | Show “remember key on this device” (localStorage only; the server still uses the cookie) |
rpcMinTimeoutMs | 120000 | Floor for AbortSignal.timeout injected into the web index. dsh’s unary RPC default is 30s; large session.history pages over a tunnel abort with The user aborted a request. 0 disables the inject |
Never put the key itself in YAML or git.