yan3536/dsh-cookie-janitor ↗★ 1

dsh-cookie-janitor

DeepSeek Harness 会话 cookie 清理插件:每次启动都会新签一条 dsh-auth-* cookie,端口不同名字就不同,浏览器不区分端口地把历史全部发出去,累积约 70 条后请求头超过 16 KiB,服务端返回 431,表现为白屏或启动失败。本插件在请求进入应用之前裁掉属于已消失端口的旧 cookie。Stops stale browser-session cookies from overflowing the request header.

Package
dsh-cookie-janitor
Compatibility
Unverified
Version
0.1.0
License
MIT
Last updated
Nov 4, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:yan3536/dsh-cookie-janitor

配置

全部可选,默认值就是推荐值。想改就写进 profile 的 cordis.patch.yml:

- id: cookie-janitor
  name: dsh-cookie-janitor
  config:
    keepForeign: 0        # 允许保留几条非当前端口的 cookie;0 = 全清
    pruneRequests: true   # 关掉就只剩溢出兜底
    rescueOverflow: true  # 关掉则 431 原样返回
    maxHeaderBytes: 0     # >0 时把 Node 的头上限抬到这个字节数
    attachTimeoutMs: 15000

maxHeaderBytes 只是把症状往后推——真正止血的是 keepForeign: 0。除非你有特殊理由(同一浏览器要同时连多个 DSH 实例),否则别动它。

想同时连多个实例的话,把 keepForeign 设成你实际并用的实例数,插件会按浏览器发送顺序保留最新的那几条。