Ye-Yu-Mo/dsh-llm-proxy
DeepSeek Harness(dsh)全局HTTP代理插件:undici setGlobalDispatcher + EnvHttpProxyAgent,支持配置化、热切换、可观测
Project Overview项目介绍
dsh-llm-proxy is a native plugin built exclusively for DeepSeek Harness (DSH) that handles global HTTP proxy routing for all LLM requests. DSH uses undici’s built-in fetch API, which does not read the http_proxy or https_proxy environment variables by default, so this plugin fixes connection timeout issues when accessing LLM endpoints that require a proxy. To install, you can run dsh plugin add to get it directly from npm, GitHub, or link it locally for development. After installation, just restart DSH web to activate it, and check the ~/.dsh/dsh.log file to confirm it loaded successfully.
This plugin is designed for DSH users who need to route LLM requests through an HTTP proxy to access LLM endpoints. After installation, you can configure the proxy either through the "LLM Proxy" entry on the DSH settings page or by directly editing the ~/.dsh/settings.yaml configuration file. You will need to set whether the proxy is enabled, the proxy URL, and a list of addresses that should not go through the proxy. The plugin supports hot switching of configurations, so changes take effect immediately without a DSH restart, and it restores the original configuration when the plugin is stopped or disabled.
This plugin requires Node.js version 24 or higher to run, and it is released under the open source MIT license, so it is free to use and modify. There is a known limitation that the configuration namespace whitelist on the DSH settings page is hardcoded, so third-party plugins cannot self-register. You will need to manually add llm-proxy to the whitelist to use the settings form; otherwise, you can only edit the configuration file directly. The plugin also provides two loopback-only HTTP APIs that let you check current proxy status and test proxy connectivity.
dsh-llm-proxy 是专为 DeepSeek Harness 开发的原生全局 HTTP 代理插件,用于接管 DSH 所有 LLM 请求的代理路由。它解决了 DSH 使用的 undici 默认不读取 http_proxy/https_proxy 环境变量,导致需要代理访问的 LLM 端点连接超时的问题。它支持通过 dsh plugin add 命令一键安装,可直接从 npm 或 GitHub 仓库安装,也支持本地开发调试链接,安装后重启 DSH web 即可生效。
该插件适合需要通过代理访问 LLM 端点的 DSH 用户使用。用户可通过 DSH 设置页的「LLM 代理」项配置代理,也可直接编辑 ~/.dsh/settings.yaml 文件,需要配置是否启用代理、代理地址以及不走代理的地址列表。配置变更支持热切换,无需重启 DSH 即可即时生效,插件停止或禁用时会自动恢复原始配置,不会留下进程残留。
本插件依赖 Node.js 版本 >= 24,采用 MIT 开源许可证免费使用。当前已知限制是 DSH 设置页的配置命名空间白名单为硬编码,第三方插件无法自注册,需要手动将 llm-proxy 加入白名单才能使用设置页表单,否则只能编辑配置文件修改。插件还提供两个 HTTP API 接口,可查看当前代理状态和测试代理连通性。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-llm-proxy(Ye-Yu-Mo/dsh-llm-proxy)
仓库:https://github.com/Ye-Yu-Mo/dsh-llm-proxy
本站详情页:https://www.yhbd.top/plugins/ye-yu-mo-dsh-llm-proxy/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 5 · 最近提交 2026-08-17 · 主语言 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 更稳。
- Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
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 dsh-llm-proxy
把 Ye-Yu-Mo/dsh-llm-proxy 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-llm-proxy
DeepSeek Harness (dsh) 的全局 HTTP 代理插件:用 undici
setGlobalDispatcher+EnvHttpProxyAgent接管 dsh 所有 LLM 请求的代理路由。配置化、热切换、可观测。
为什么需要它
dsh(DeepSeek Harness)用 node 内置 fetch(undici)发 LLM 请求,而 undici 默认不读 http_proxy/https_proxy 环境变量。如果你的 LLM 端点(如 llm-proxy 网关)必须走代理才能访问,dsh 会直连超时。
本插件在 dsh 进程内用 setGlobalDispatcher(new EnvHttpProxyAgent(...)) 全局接管 fetch 的代理路由:
- ✅ 让 dsh 所有 LLM 请求走你配置的代理
- ✅ 热切换:设置变更即时生效,无需重启
- ✅ 可逆:插件停止/禁用时恢复基线 dispatcher,不留进程级残留
- ✅ 可观测:
/api/llm-proxy/status查看当前生效模式,/api/llm-proxy/test测试任意代理连通性
安装
本插件是 bundle 包(dsh.bundle.patch 清单):dsh plugin add 会把它装进 profile 依赖并自动加入 dsh.profile.bundles,下次启动自动激活,无需手动加 patch 行。
# 一键安装(发布到 npm 后可直接用包名)
dsh plugin --profile web add dsh-llm-proxy
# 或直接从 GitHub 安装
dsh plugin --profile web add github:Ye-Yu-Mo/dsh-llm-proxy
开发调试(本地 link):
git clone https://github.com/Ye-Yu-Mo/dsh-llm-proxy
dsh plugin --profile web add link:$(pwd)/dsh-llm-proxy
安装后重启 dsh web 使 bundle 补丁生效;~/.dsh/dsh.log 出现 [llm-proxy] 日志(未启用时为「恢复基线」一行)即装载成功。
配置
通过 dsh 设置页的「LLM 代理」项,或直接编辑 ~/.dsh/settings.yaml:
llm-proxy:
enabled: true
url: http://127.0.0.1:7891 # 你的 HTTP(S) 代理地址
noProxy:
- localhost
- 127.0.0.1
- ::1
| 字段 | 类型 | 默认 | 说明 |
|---|---|---|---|
enabled |
boolean | false |
是否启用代理接管 |
url |
string | '' |
HTTP(S) 代理地址,如 http://127.0.0.1:7891 |
noProxy |
string[] | ['localhost','127.0.0.1','::1'] |
不走代理的地址 |
⚠️ dsh 设置页只暴露白名单内的配置命名空间。若设置页显示「表单不可用」,需把
llm-proxy加入dsh-host-apiproxy的WEB_SETTINGS_NAMESPACES(当前为 dsh 已知限制,见下)。
HTTP API
插件注册两个宿主路由(loopback-only,防 LAN 探测):
GET /api/llm-proxy/status
当前生效模式:
{
"effective": { "mode": "setting", "url": "http://127.0.0.1:7891" },
"env": { "httpProxy": "http://127.0.0.1:7891", "httpsProxy": "http://127.0.0.1:7891" }
}
mode 取值:
setting:走设置的urlenv:读环境变量代理(HTTP(S)_PROXY)direct:直连(无代理)
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Q00/ouroboros
crafter-station/petdex
whiteguo233/OpenBiliClaw
anywhere-labs/Agents-Anywhere
agentrq/agentrq
freestylefly/wesight