DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Proxy Router — DeepSeek Harness 插件(DSH Plugin)
← Plugins

@yangzhe1991/dsh-proxy-router

Proxy Router

DSH 插件:本地分流代理 + Web 设置页——只有规则命中的被墙域名走上游代理,其余(国内/内网/未知)直连;上游地址、清单、超时等参数可直接在设置中修改,实时生效、无需重启,并带有运行状态面板

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @yangzhe1991/dsh-proxy-router@0.1.1
README兼容性版本

兼容性与来源证明

Proxy Router 以 @yangzhe1991/dsh-proxy-router 发布,当前版本为 0.1.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/13

版本

0.1.1stable
2026/9/13

相关插件

正在加载相关插件…

最新版
0.1.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
333.8 kB
文件数
11
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
0
最近提交
2026/9/13
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

相关插件

继续浏览 ui-customization 分类下经过校验的插件。

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Experimental Agent Team Web Profile@deepseek-ai/dsh-experimental-agent-team-web-profile用于 Agent Teams Remote 和 UI 插件的实验性 Web 配置层Client Ui Task Board@linxin666/dsh-client-ui-task-board面向 DSH Web GUI 的主机权威任务面板,支持实际会话执行、主机 cron 调度以及可选的跨平台空闲睡眠保护;以挂载方式提供,无需修改 DSH 源代码。Pet@linxin666/dsh-pet适用于 dsh Web GUI 的多宠物伴侣插件:由注册表驱动的浮动宠物,可响应模型活动,支持为每只宠物命名、抚摸/喂食互动以及亲密度评分

README

dsh-proxy-router

English | 中文

A routing-proxy plugin for DSH (DeepSeek Harness): only rule-matched blocked domains go through the upstream proxy — everything else (domestic sites, LAN addresses, unknown hosts) connects directly. Its settings live in the Web settings page.

The motivation is mundane: once you start dsh with export https_proxy=... http_proxy=... all_proxy=..., even api.deepseek.com and www.baidu.com take a detour through the proxy. This plugin turns "when should this go through the proxy" into a maintainable rule table, and "who is the upstream" into a setting you can change any time.


What it covers

Everything outbound first hits the plugin's local routing proxy, which then decides where it goes:

Outbound sourceNotes
Main-process fetch()LLM API (api.deepseek.com), web_search, MCP, plugin HTTP calls
web_fetch toolshares one policy with the main process via the host's proxyRouteFor()
bash subprocessescurl, git, npm/pnpm — inherit the same route through http_proxy + NODE_USE_ENV_PROXY

How it works

DSH main process fetch / web_fetch / bash subprocesses
        │  the plugin repoints the host's http(s) proxy at the local router
        ▼
Local routing proxy (built in, bound to 127.0.0.1:17890)
        ├── matches a proxy rule → upstream proxy (the address from the settings page)
        └── everything else (default) → direct connection

Three rule layers, first match wins:

  1. Local rules file (~/.dsh/proxy-router/rules.txt) — your own additions/removals, hot-reloaded
  2. Remote blocklists (default: Loyalsoldier/clash-rules gfw.txt + greatfire.txt via jsDelivr, cached, refreshed every 24h)
  3. Built-in seed list — ~140 high-frequency blocked domains, for a first offline start
  4. No match at all → defaultRoute (default: direct)

Loopback and LAN addresses always go direct (127.0.0.0/8, 10/8, 172.16/12, 192.168/16, 169.254/16, 100.64/10, IPv6 ULA/link-local, plus single-label hostnames such as nas) — they are never handed to the upstream proxy.

Install

dsh plugin --profile web add @yangzhe1991/dsh-proxy-router

Then restart dsh web.

For local development, install with link:: set "@yangzhe1991/dsh-proxy-router": "link:/path/to/repo" in ~/.dsh/profiles/web, run pnpm install, restart.

Settings page (the recommended way)

After the restart, open Settings → Plugins → Plugin configuration and expand the "代理分流 (proxy-router)" card:

FieldMeaning
Upstream proxye.g. http://192.168.3.47:12801; empty falls back to https_proxy / http_proxy from the launch environment
Route when nothing matchesdirect (recommended) or proxy
Remote blocklistsone URL per line; clear the box to load none
List refresh periodhours; 0 keeps whatever cache exists
Local router bind addresse.g. 127.0.0.1:17890
Connect timeoutmilliseconds; applies to connection setup only, never to streaming responses
Fall back to direct when the upstream failsretry directly when the proxied connection cannot be established
Log every routing decisionverbose per-request lines on the host's stderr

Below the fields sits a live status panel: bind address, upstream and where it came from, whether the host policy was taken over (and whether bash subprocesses are routed), rule counts, hit statistics, the local rules file path, and each remote list's size and refresh time.

Worth knowing:

  • Saving takes effect immediately — no dsh restart. Upstream, default route, timeout, fallback and debug are read per request; changing the bind address re-binds the listener and repoints the host policy at it.
  • Settings are written to the proxy-router: section of $DSH_HOME/settings.yaml (default ~/.dsh/settings.yaml). Each field has a "reset" action that removes the user-layer entry, falling back to the composition default.
  • A field counts as overridden purely by its presence in the user layer; concurrent writes are fenced by revision instead of silently overwriting each other.

⚠️ Once the upstream is configured here, stop exporting http_proxy / https_proxy / all_proxy in your launch command. The host freezes those values into a snapshot at boot and hands it to bash subprocesses, which take priority — so curl/git/npm would bypass the router and talk to your exported upstream directly. The plugin detects this, warns loudly in the log, and marks bash subprocesses as "direct to upstream (bypassing the router)" in the status panel.

Composition config (deployment defaults)

The settings page writes the user layer, which resolves above the profile's composition config (the deployment default). Put machine-wide defaults there:

# ~/.dsh/profiles/web/cordis.patch.yml
- id: proxy-router
  config:
    upstream: http://192.168.3.47:12801
    debug: false

Two path-shaped fields stay composition-only (they are deployment facts, not preferences):

FieldDefaultMeaning
stateDir~/.dsh/proxy-routercache and default rules file location
rulesFile<stateDir>/rules.txtlocal rules file path

Every settings field may also be written here as a default; in composition config lists accepts plain URL strings or { name, url, route } objects (the settings page flattens them to a URL list).

Local rules

The file lives at ~/.dsh/proxy-router/rules.txt; a commented template is created on first run. Edits take effect immediately — no dsh restart. The settings page shows the path and the current rule count, but editing happens in your editor.

# one rule per line, '#' starts a comment; first match wins
proxy: some-blocked-site.com     # this domain and all subdomains → upstream proxy
direct: cdn.example.cn           # this domain and all subdomains → force direct
example.com                      # a bare domain means proxy:
  • Local rules win over remote lists: if a remote list wrongly proxies a domestic site, one direct: line fixes it.
  • Accepted spellings: *.example.com, .example.com, +.example.com, DOMAIN-SUFFIX,example.com, DOMAIN,example.com (exact), DOMAIN-KEYWORD,ads — and dnsmasq's server=/example.com/114.114.114.114 for good measure.
  • Non-ASCII domains are converted to punycode before matching.

Debugging

The local router ships a loopback-only debug endpoint:

# overview: bind address, upstream, rule counts, hit stats, policy self-check
curl -s http://127.0.0.1:17890/__proxy-router/status

# ask how a host would be routed
curl -s "http://127.0.0.1:17890/__proxy-router/why?host=www.google.com"
# → {"host":"www.google.com","route":"proxy","reason":"list:gfw:google.com"}

# reload rules (local + remote)
curl -s http://127.0.0.1:17890/__proxy-router/reload

The settings card reads the same status snapshot through the host web server's same-origin read-only route GET /dsh-proxy-router/status.

You can also verify routing with curl directly:

curl -x http://127.0.0.1:17890 -sI https://www.google.com   # via upstream
curl -x http://127.0.0.1:17890 -sI https://www.baidu.com    # direct

The startup log prints the upstream and its source, the bind address, rule counts, the policy self-check result, the settings-page entry point, and whether bash subprocesses are routed too.

Robustness

  • No self-recursion: a request whose target is this proxy's own listen address is never forwarded (plain HTTP gets 421, /favicon.ico gets 204, / gets a human-readable hint). Without that guard, something as harmless as opening http://127.0.0.1:17890/... in a browser snowballs into a self-loop — 0.1.0 produced over a hundred million requests that way, so 0.1.1 rejects them outright.
  • An upstream pointing at itself is ignored: when the upstream equals this plugin's own listen address it is treated as "no upstream", with an explicit warning in the log and in the status panel, instead of CONNECTing back into itself.
  • Rate-limited warnings: one line per distinct failure every 5 seconds, with a suppressed-count summary, so no failure mode can flood your terminal.

Compatibility

  • Verified against dsh 0.1.5-rc.2 since 0.1.0 (the 0.1.1 self-loop fix is verified on that same version).
  • The host half depends only on the public exports of @deepseek-ai/dsh-http-proxy, @deepseek-ai/schemastery and undici, plus cordis' ctx.get / ctx.effect / ctx.inject; the browser half requires only react and no UI package.
  • The settings card uses the official settings system (ctx.settings.installSection + the settings.plugin.item slot). On a deployment without a settings provider the plugin falls back to its composition config and everything else keeps working.

Known limits

  • HTTP proxies only (http:// / https://). all_proxy=socks5://… is ignored with a warning; if your proxy also exposes a mixed port (mihomo/clash mixed-port), point the upstream at http://host:port.
  • No TLS interception: https is routed by the CONNECT hostname only, so URL-path rules are impossible by design.
  • Rules support domain suffixes, exact domains, keywords and IP literals — no regular expressions.
  • The local router binds 127.0.0.1 only; it is not exposed to the LAN, and the local rules file is not editable from the settings page (its path is shown there).

License

MIT