ymh0000123/dsh-client-masquerade
DeepSeek Harness插件:让自定义llm-pi-ai provider伪装成Claude Code / Codex客户端(伪造客户端身份请求头)。
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH). It allows custom models configured through the llm-pi-ai provider to masquerade as official Claude Code or Codex clients, so that requests can pass through gateways that restrict access based on client identity parsed from request headers or body. The plugin ships with a bilingual settings interface for one-click enabling, disabling, and switching between masquerade identities, and also registers a mask_client model tool for command-style control.
The recommended installation method is using DSH's official plugin command, which automatically adds the plugin to your DSH profile without any manual configuration edits. After installation, you must apply three patches to existing DSH dependencies, otherwise the User-Agent header will be overwritten by DSH's default adapter, leading to 401 authentication errors from identity-aware gateways. You can apply all patches with one click directly from the plugin's settings page, or run individual patch scripts via the command line in your DSH profile directory.
The plugin only works with custom llm-pi-ai providers, and does not support DSH's built-in official DeepSeek adapter. Patches and masquerade headers added to your configuration will not be automatically reverted when you uninstall the plugin, so you need to manually unpatch and clear headers before completing uninstallation. The plugin is released under the open-source MIT license, with no fees or restrictions on personal or commercial use.
dsh-client-masquerade 是一款原生 DeepSeek Harness 插件,核心功能是让通过 llm-pi-ai 配置的自定义大模型,伪装成 Claude Code 或 Codex 客户端,绕过各类按请求头、请求体识别客户端身份并做路由限制的网关。插件提供一键开关、切换伪装身份的功能,自带中英双语设置面板和 mask_client 模型工具。
推荐通过 DSH 官方命令一键安装,支持持久化安装和动态进程加载两种模式,安装后需要给三个依赖包应用补丁才能完整生效。补丁支持在设置页一键应用或全部还原,也支持通过命令行逐个操作,补丁本身是幂等的,重复执行没有问题,升级被补丁的依赖包后需要重新应用一次。
本插件仅对 llm-pi-ai 类型的自定义 provider 生效,内置官方适配器不支持。卸载插件后补丁和已写入的伪装头不会自动还原,需要手动操作。请求体伪装仅支持 Anthropic 协议,当前 Claude Code 指纹可能过期,可使用配套工具诊断。插件采用 MIT 许可证开源,无使用成本。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-client-masquerade(ymh0000123/dsh-client-masquerade)
仓库:https://github.com/ymh0000123/dsh-client-masquerade
本站详情页:https://www.yhbd.top/plugins/ymh0000123-dsh-client-masquerade/
本站登记:类型 client · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 12 · 最近提交 2026-08-29 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 12 stars - an early-stage project星标 12,属于早期项目
- Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:ymh0000123/dsh-client-masquerade
把 ymh0000123/dsh-client-masquerade 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-client-masquerade
DeepSeek Harness 插件:让自定义模型伪装成 Claude Code / Codex 客户端 A DeepSeek Harness plugin: make a custom model masquerade as a Claude Code / Codex client.
一些网关(如 agentrouter、claude-code-router 类代理)按请求头识别客户端并据此路由或放行。本插件把伪造的客户端身份头写入你的 llm-pi-ai provider 配置,随每次请求真实发到上游网关——一键开启/关闭/切换,带中英文设置页。
安装 / Install
方式一:官方命令安装(推荐)
dsh plugin --profile web add github:ymh0000123/dsh-client-masquerade
这条命令会在 profile 目录里执行 pnpm add github:ymh0000123/dsh-client-masquerade,然后自动把包(其 dsh.bundle.patch 声明)并入该 profile 的插件层栈——不需要手动改任何配置文件。
然后应用补丁(必做)——否则伪装头里的 user-agent 会被 pi-ai 适配器的归属机制剥掉并覆盖为 deepseek-harness/...,按 User-Agent 识别客户端的网关(agentrouter、claude-code-router 类)会拒绝请求(401 UNAUTHENTICATED)。最省事的方式是在设置页点 User-Agent 补丁 → 应用(一次写入全部三个补丁),或用模型工具:
mask_client action=patch
也可以在你的 profile 目录(含 node_modules 的那个)逐个执行:
node node_modules/dsh-client-masquerade/patches/apply-pi-ai-useragent-patch.mjs # user-agent
node node_modules/dsh-client-masquerade/patches/apply-pi-ai-body-patch.mjs # 请求体(按请求体识别的网关需要)
node node_modules/dsh-client-masquerade/patches/apply-variant-retry-patch.mjs # vision-toolkit 变体
注意:
node_modules是相对路径,请先在 profile 目录(含node_modules的那个)里执行。不记得目录或不在该目录时,直接用绝对路径调用脚本即可,脚本会自动定位本 profile 里安装的目标包:node "C:\Users\你的用户名\.dsh\profiles\web\node_modules\dsh-client-masquerade\patches\apply-pi-ai-useragent-patch.mjs"
补丁幂等,可重复执行;pnpm install 或升级被打补丁的包后需重新应用一次。插件启动时也会自检:未打 UA 补丁会在日志打醒目的 [client-masquerade] dsh-llm-pi-ai is NOT user-agent patched 警告;若某条线路开了请求体伪装而请求体补丁没生效,也会单独警告——这个组合的失败表现和"网关繁忙"一模一样,不警告很难发现。
兼容旧版:若
dsh-llm-pi-ai的补丁是旧版插件(<1.2.0)写入的(requestHeaders 块是另一种等价写法),还原也能正确识别并还原为原始版本;应用会把它升级为当前版本的补丁形态。不再出现 "neither the stock nor the patched requestHeaders block found"。
安装模式下也可以直接在网页设置页(Settings → Client Masquerade → 运行时补丁 → 全部应用)一键写入全部三个补丁,之后重启
dsh web生效;动态模式无文件系统权限,设置页只显示补丁状态,仍需手动执行上面的命令。
之后重启:
dsh web
安装后:
- Host 侧:
mask_client模型工具自动注册;设置写入逻辑挂载。 - Web 侧:
dsh.client浏览器清单自动收录,Settings 里出现 Client Masquerade / 客户端伪装 设置页。
卸载:dsh plugin --profile web remove dsh-client-masquerade。插件可自由安装/卸载、重复安装无副作用;卸载后有两处残留需手动清理(见下)。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
agentrq/agentrq
freestylefly/wesight
corrinehu/dsh-workbuddy-connect
KelaoHu/dsh-lowtide
liebaojun/MakoCode
Ayuilos/Miffan
starsstreaming/beautiCode