Xinglei-dev/dsh-plugin--plugins-dsh-fixed-pairing-token ↗★ 0

dsh-fixed-pairing-token

Pin the DSH Web launch token to a configured value so the browser URL stops changing on every restart 适合不希望每次重启服务都重新复制浏览器登录链接的用户。

패키지
dsh-fixed-pairing-token
호환성
미검증
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 10. 19.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Xinglei-dev/dsh-plugin#bdee70ab245ebf0b713bf9810e90ba521d91b5e1&path:plugins/dsh-fixed-pairing-token

配置

token 取 config.token,没有时读环境变量 DSH_PAIRING_TOKEN。两者都没有则插件加载失败,不使用随机 token 兜底。

在 profile 的 cordis.patch.yml 里写:

- id: fixed-pairing-token
  config:
    token: ''

或者启动 dsh web 的进程带环境变量:

DSH_PAIRING_TOKEN='' dsh --profile web

token 的要求:

  • 至少 16 个字符;
  • 只能包含 A-Z、a-z、0-9、-、_,这样打印出的地址与配置值逐字节一致;
  • 推荐 32 字节随机数的 base64url 形式:
node -e "console.log(require('node:crypto').randomBytes(32).toString('base64url'))"

修改 token 后重启 DSH 生效。已经换过 cookie 的浏览器不受影响,仍然用原 cookie 登录;token 只在换浏览器、清除 cookie 或用 GET /connect 换取 API cookie 时使用。