tr1v3r/dsh-proxy
Runtime-switchable outbound proxy plugin for the DeepSeek Harness — hot-reload HTTP(S)/SOCKS5 routing via one settings section
Project Overview项目介绍
@tr1v3r/dsh-proxy is a DeepSeek Harness native plugin shipped as a bundle that integrates through the dsh.profile.bundles field in the target profile's package.json. It hijacks undici's well-known global dispatcher slot read by globalThis.fetch, redirecting every in-process outbound request — LLM providers reached via pi-ai, the dedicated dsh-llm-deepseek route, web_search/web_fetch calls, and streamable-http MCP servers — through an HTTP(S) CONNECT or SOCKS5 proxy. Installation requires editing ~/.config/dsh/profiles/<name>/package.json to add the dependency and merge the bundle name, then running dsh plugin --profile <name> install --no-frozen-lockfile, followed by a single DSH restart to register it; from that moment onward no restarts are needed again, since switching happens entirely through settings or hot-reloaded YAML.
The plugin exposes three runtime modes — manual, direct, and system — toggleable from the Web Settings → General → Network proxy control or by editing the dsh-proxy entry in cordis.patch.yml. manual mode routes via the configured proxy URL with an optional noProxy matcher (undici-style bare entries, host:port, * wildcard, and dot-boundary semantics); system mode follows ambient HTTP_PROXY/HTTPS_PROXY/ALL_PROXY/NO_PROXY env vars and falls back to macOS System Settings proxy (scutil --proxy), re-detected on each save rather than continuously polled. With exportEnv: true (default) the same variables are propagated into the dsh process so child processes spawned after a switch — bash-tool curl/git, stdio MCP servers — follow the new route, while user-set boot env vars are preserved and restored on disable. The target audience is developers and operators behind firewalls or VPN fronts who need instant proxy rerouting without restarting the host application, and the demo node scripts/demo.mjs shows the dispatcher switching mid-flight.
Dependencies include DSH ≥ 0.1.7-rc.1, because the boot probe (scripts/boot-probe.mjs) and runtime rely on createRuntimeResolution / PluginPackages exports that older builds lack; with DSH 0.1.5.x the probe fails with TypeError: createRuntimeResolution is not a function, which can be sidestepped by pointing DSH_ROOT at a scratch install such as npm install --prefix /tmp/dsh-probe-root @deepseek-ai/dsh@0.1.7-rc.1. Unit and end-to-end tests run via npm test; npm install is otherwise sufficient. Credentials embedded as user:pass@ in the proxy URL are stored plaintext in cordis.patch.yml and settings persistence, and with exportEnv: true they leak into child process environments visible to ps -E or /proc/<PID>/environ for the same user, so sensitive setups should point at a local unauthenticated proxy. Limits: loopback destinations bypass by default (bypassLoopback: false overrides), the pi-ai Bedrock route is handled by the AWS SDK rather than this plugin, the built-in browser host runs as a separate process and needs its own proxy configuration, undici's SOCKS5 agent remains experimental upstream, retired dispatchers are force-destroyed after a 30-second grace that can interrupt long streams, and system mode does not cover Windows registry, Linux-desktop settings, or PAC. License is MIT.
@tr1v3r/dsh-proxy 是一个 DeepSeek Harness 原生插件,以 bundle 形式随 profile 装载。它劫持 globalThis.fetch 读取的 undici 全局调度器槽位,把进程内发出的所有出站请求——LLM 提供商、web_search/web_fetch、streamable-http MCP——统一重定向到 HTTP(S) CONNECT 或 SOCKS5 代理。安装方式为:在目标 profile 目录的 package.json 中把 @tr1v3r/dsh-proxy 加入 dependencies,并在 dsh.profile.bundles 追加该包名,再执行 dsh plugin --profile <name> install --no-frozen-lockfile,随后重启 DSH 一次挂载插件。
插件提供 manual、direct、system 三种运行模式,可在 Web Settings → General → Network proxy 控件或 cordis.patch.yml 的 dsh-proxy 条目中即时切换,无需重启进程。manual 模式按配置中的 proxy 与 noProxy 路由;system 模式跟随环境变量或 macOS scutil --proxy 检测结果,每次设置保存时重新探测;exportEnv: true(默认)会把 HTTP_PROXY 等变量导出到 DSH 进程,使切换后新建的子进程同样走代理,旧进程保持原环境。典型用户是在受限网络环境下需要随时切换代理、又不愿反复重启 DSH 的开发者与运维人员。
依赖方面,需 DSH ≥ 0.1.7-rc.1(否则 createRuntimeResolution 缺失导致报错),SOCKS5 agent 上游仍标为实验性。凭证以明文存入 cordis.patch.yml,敏感凭据建议指向本地免认证代理。system 模式尚未覆盖 Windows 注册表、Linux 桌面与 PAC;pi-ai Bedrock 路由由 AWS SDK 自管;内置浏览器宿主是独立进程,需另行配置。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-proxy(tr1v3r/dsh-proxy)
仓库:https://github.com/tr1v3r/dsh-proxy
本站详情页:https://www.yhbd.top/plugins/tr1v3r-dsh-proxy/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-09-27 · 主语言 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 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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:tr1v3r/dsh-proxy
把 tr1v3r/dsh-proxy 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-proxy — runtime-switchable outbound proxy for DSH
中文说明见 README.zh.md。

@tr1v3r/dsh-proxy is a DeepSeek Harness plugin that routes every
in-process outbound request — LLM providers, web_search / web_fetch,
streamable-http MCP — through an HTTP(S) CONNECT or SOCKS5 proxy, and lets
you flip the proxy on, off, or to another server at runtime, with zero
restarts, either from the Web Settings → General → Network proxy control or
by editing the dsh-proxy entry in the profile's cordis.patch.yml (hot-reloaded).
The demo above shows the routing engine: node scripts/demo.mjs after install.
How it works
DSH and pi-ai issue requests through globalThis.fetch, which reads undici's
well-known global dispatcher slot (Symbol.for('undici.globalDispatcher.1')).
The plugin owns that slot:
http(s)://proxy →EnvHttpProxyAgent(CONNECT tunneling for https)socks5://proxy → undici's built-inSocks5ProxyAgent(URL credentials supported;socks5h:///socks://normalize to it; DNS resolves remotely)noProxyrules → both paths route through oneRoutingDispatcher, so HTTP and SOCKS share identical matcher semantics (undici-style: bare entries match the host and dot-boundary subdomains;host:portpins a port;*bypasses everything; a leading dot or*.prefix is accepted as a synonym of the bare entry). Inmanualmode, ambientNO_PROXY/HTTP_PROXYenv vars are deliberately ignored by the dispatchers — exported env only steers child processes, so in-process routing is fully determined by the profile entry config.systemmode is the opposite: it follows the ambient proxy —HTTP_PROXY/HTTPS_PROXY/ALL_PROXY/NO_PROXYenv vars, falling back to the macOS System Settings proxy (scutil --proxy) — re-detected each time the section is applied, not continuously polled.
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
jingyunstudio/jingyun-dsh
yjh051108/dsh-super-injector
fangqian616/consensus-pipeline
feibi-mochi/deepseek-harness-control-center
ArvinQi/dsh-mcp
SummerSec/AI-Inner-Os
ciyuan1234/MCM_skills