ymh0000123

Dsh Client Masquerade — AI skill for Claude Code

AI community

DeepSeek Harness 插件:让自定义 llm-pi-ai provider 伪装成 Claude Code / Codex 客户端(伪造客户端身份请求头).

How to install Dsh Client Masquerade

This entry records only its repository, not the path inside it, so there is no exact command to give. Open ymh0000123/dsh-client-masquerade and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Dsh Client Masquerade does

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).

Alternatives in AI

  • Opencodex — Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k ★
  • Desktop Cc Gui — Multi-engine AI coding desktop client (Tauri) 4.4k ★
  • EchoBird — One-click install + model switch:Claude Code,Codex CLI (OpenAI), Grok Build (xAI), DeepSeek Harness, Kimi Code 3.1k ★

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