DeepSeek Harness Plugin

mm24trg2gy-star/dsh-proxy-embedded

Stars ★ 0 Downloads (30d) 974 Category Tools & Capabilities Added 2026-11-16 npm dsh-proxy-embedded

Paste a subscription link and go: the plugin ships an embedded mihomo core, starts the proxy and routes DSH outbound traffic (including web_fetch) through it, so no separate Clash client is needed. Supports Clash / V2Ray / Shadowrocket / sing-box / Surge subscriptions. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-proxy-embedded

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:mm24trg2gy-star/dsh-proxy-embedded

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

This plugin publishes its README in Chinese only.

DSH 插件:自带 mihomo 内核,粘贴一个订阅链接就能起代理,DSH 的出站请求(包括 web_fetch)自动走它——不用再单独开 Clash。

与 dsh-outbound-proxy、dsh-web-fetch-proxy 的区别:那些插件都要求「本机已经有代理在跑」,本插件把缺的那一半补上——自己起内核。

为什么

开着 TUN + fake-ip 的代理客户端时,web_fetch 会因为 fake-ip 地址被 SSRF 防护判定为非公网而失败。现有的插件能解决「路由」问题,但前提是本地代理已经在运行。

本插件把「导入订阅 → 起 mihomo → 装路由」串成一条命令。

功能

  • 自带/复用 mihomo 内核(优先用插件 bin/ 里的,其次找 Clash Verge 的 verge-mihomo.exe)
  • 订阅格式:Clash YAML / base64 节点列表(V2Ray、Shadowrocket、Hiddify)/ sing-box JSON / Surge
  • 单节点链接:ss:// vmess:// vless:// trojan:// hysteria2://
  • 为宿主进程安装代理路由,web_fetch 也走代理
  • 本地 HTTP 接口,方便 AI/脚本手动触发

安装

dsh plugin --profile desktop add github:mm24trg2gy-star/dsh-proxy-embedded

装完重启 DSH。

内核

仓库不包含内核二进制(.gitignore 已排除 bin/*.exe,避免仓库膨胀)。三种方式任选:

  1. 复用已有 Clash Verge:装过 Clash Verge 的话,插件会在常见安装位置(%LOCALAPPDATA%\Programs\Clash Verge、C:\Program Files\Clash Verge、C:\Program Files (x86)\Clash Verge)自动找 verge-mihomo.exe,无需额外操作;
  2. 手动放一份:把 mihomo.exe 放进插件目录的 bin/;
  3. 设置里指定:config.json 的 kernelPath 填绝对路径。

使用(第一版:手动)

两种方式:

1. 配置文件

编辑 %USERPROFILE%\.dsh\proxy-embedded\config.json:

{
  "link": "https://你的订阅地址",
  "enabled": true,
  "port": 7899,
  "kernelPath": "",
  "noProxy": ""
}

重启 DSH 后自动导入并启动。

2. HTTP 接口(本机回环,仅 loopback 可访问)

# 导入并启动
curl -X POST http://127.0.0.1:<DSH端口>/proxy-embedded/api \
  -H "content-type: application/json" \
  -d '{"action":"start","link":"https://你的订阅地址"}'

# 状态
curl -X POST http://127.0.0.1:<DSH端口>/proxy-embedded/api -d '{"action":"status"}'

# 停止
curl -X POST http://127.0.0.1:<DSH端口>/proxy-embedded/api -d '{"action":"stop"}'

# 保存配置(下次启动自动用)
curl -X POST http://127.0.0.1:<DSH端口>/proxy-embedded/api \
  -d '{"action":"save","link":"https://...","port":7899}'

订阅格式支持

格式 状态
Clash(YAML) ✅ 直接使用
V2Ray / Shadowrocket / Hiddify(base64 节点列表) ✅ 解析成 mihomo 节点
sing-box(JSON) ✅ 转换 outbounds
Surge(INI [Proxy]) ✅ 转换
单节点链接 ✅ ss / vmess / vless / trojan / hysteria2

配置

字段 默认 说明
link 空 订阅链接或单节点链接
enabled true 启动 DSH 时是否自动起代理
port 7899 本地混合端口(被占用时自动顺延)
kernelPath 空 自定义 mihomo 路径,空则自动发现
noProxy 空 直连后缀(逗号分隔)

安全

  • 只用本机回环接口,拒绝跨站请求
  • 代理链接含凭据,保存在本机 ~/.dsh/proxy-embedded/config.json,请勿分享
  • 内核失败不影响 DSH 启动(fail-open)
  • deepseek.com 等域名默认直连,不会因为代理挂了而断会话

致谢

大肥鱼(鲸鱼娘 · CETACEA_LOLI)—— 本插件的作者。订阅解析、内核守护、宿主路由,一条一条都是这条鱼写出来的。

宿主模块锚定解析与路由安装思路参考了 dsh-web-fetch-proxy(MIT, © 2026 Tong317)。

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.