Dsh Client Masquerade
Description
DeepSeek Harness 插件:让自定义 llm-pi-ai provider 伪装成 Claude Code / Codex 客户端(伪造客户端身份请求头)。A DeepSeek Harness plugin: masquerade a custom llm-pi-ai provider as Claude Code / Codex clients (spoofed client identity headers).
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
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 补丁(必做)**——否则伪装头里的 `user-agent` 会被 pi-ai 适配器的归属机制剥掉并覆盖为 `deepseek-harness/...`,按 User-Agent 识别客户端的网关(agentrouter、claude-code-router 类)会拒绝请求(**401 UNAUTHENTICATED**)。在你的 profile 目录(含 `node_modules` 的那个)执行:
node node_modules/dsh-client-masquerade/patches/apply-pi-ai-useragent-patch.mjs
注意:`node_modules` 是相对路径,请先在 profile 目录(含 `node_modules` 的那个)里执行。不记得目录或不在该目录时,直接用**绝对路径**调用脚本即可,脚本会自动定位本 profile 里安装的 `dsh-llm-pi-ai`:
node "C:\Users\你的用户名\.dsh\profiles\web\node_modules\dsh-client-masquerade\patches\apply-pi-ai-useragent-patch.mjs"
补丁幂等,可重复执行;`pnpm install` 或升级 `dsh-llm-pi-ai` 后需重新应用一次。插件启动时也会自检:未打补丁会在日志打醒目的 `[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 → **User-Agent 补丁 → 应用**)一键写入补丁,之后重启 `dsh web` 生效;动态模式无文件系统权限,仍需手动执行上面的命令。
之后重启:
dsh web
安装后:
- Host 侧:
mask_client模型工具自动注册;设置写入逻辑挂载。 - Web 侧:
dsh.client浏览器清单自动收录,Settings 里出现 Client Masquerade / 客户端伪装 设置页。
卸载:`dsh plugin --profile web remove dsh-client-masquerade`。插件可自由安装/卸载、重复安装无副作用;卸载后有两处残留需手动清理(见下)。
安装 / 卸载 / 清理速查
| 操作 | 命令 / 位置 |
|---|---|
| 安装 | `dsh plugin --profile web add github:ymh0000123/dsh-cl |
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Awesome Llm Apps
100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI