xbzbing/dsh-auth-gateway ↗★ 10
dsh-auth-gateway
Password login gateway plugin for dsh web: auto-generated initial password with forced onboarding, login, password change with real request interception, and OTP two-factor authentication.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xbzbing/dsh-auth-gateway说明文档
阅读完整 README ↗配置
以下字段为 bundle patch / profile patch 中 dsh-auth-gateway 行的 config(Standard Schema 校验):
| 字段 | 默认 | 含义 |
|---|---|---|
listenHost / listenPort | 0.0.0.0 / 3080 | 网关对外监听地址与端口 |
upstreamHost / upstreamPort | 127.0.0.1 / 3081 | 内部 webserver 地址与端口 |
basePath | / | 反向代理子路径前缀(如 /dsh);默认 /(根路径)。字符集限 A-Za-z0-9._~/-,拒绝 ..、//、引号、空白、尖括号(该值会内嵌进页面脚本与链接,故按白名单校验;不合规配置会在加载时被拒绝)。子路径部署时在部署方 profile patch 中配置,不随插件分发 |
minPasswordLength | 8 | 密码最小长度(4–128) |
requireMixedCase / requireSpecial | true / true | 密码复杂度:大小写混合或特殊字符二选一满足 |
maxLoginFailures / lockMinutes | 5 / 5 | 密码失败锁定阈值与时长 |
maxGlobalAuthAttemptsPerMinute | 60 | 全局登录尝试速率上限 |
maxOtpAttemptsPerMinute | 10 | 单来源 OTP/备份码验证速率上限 |
otpEnabled(已废弃) | false | 不再作为启用开关——2FA 由用户登录后在「认证设置」中绑定激活;字段保留仅为兼容旧配置 |
otpRequired | false | 2FA 激活后强制每次登录验证(无需任何配置) |
otpIssuer / otpPeriod / otpDigits / otpWindow | dsh-auth-gateway / 30 / 6 / 1 | TOTP 参数(显示名、周期、位数、窗口) |
backupCodeCount / backupCodeLength | 10 / 8 | 备份代码数量与长度 |