DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Proxy — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@karoc/dsh-proxy

Proxy

Smoothly Proxy (思磨力代理插件):外部 DeepSeek Harness 插件——提供按主机路由和设置页面的模型提供商转发代理。

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

npx -y @deepseek-ai/dsh plugin --profile web add @karoc/dsh-proxy@0.1.3
README兼容性版本

兼容性与来源证明

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

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

版本

0.1.3stable
2026/9/6
0.1.2stable
2026/8/31
0.1.1stable
2026/8/31
查看其余 1 个版本收起版本
0.1.0stable
2026/8/22

相关插件

正在加载相关插件…

最新版
0.1.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
85.9 kB
文件数
9
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 1
周下载
57
最近提交
2026/8/31
查看源码 ↗项目主页 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

README

Smoothly Proxy (思磨力代理插件)

English | 简体中文

Smoothly Proxy (思磨力代理 / Smoothly) is an external DeepSeek Harness plugin: a model-provider forward proxy with per-host routing, plus a Settings page dedicated to model-provider proxying.

It runs a loopback forward proxy inside the dsh host process, points the process's egress traffic at it (HTTP(S)_PROXY + NODE_USE_ENV_PROXY), and routes only the hosts you select through an optional upstream proxy (HTTP / HTTPS / SOCKS5, with optional Basic auth). Everything else stays direct. Model-provider hosts are derived from your dsh settings.yaml, and hosts observed in traffic are collected for you — both appear as checkboxes.

Why an external plugin: the built-in settings pages don't cover outbound proxying, and adding one to a built-in package would be overwritten by the next official release. This package ships as an installable bundle that never touches repository source, so official updates cannot clobber it.

The proxy engine and settings UI are extracted from karoc/dsh-desktop (behavior preserved) so a browser-only dsh web gets the same model-provider proxy controls the desktop shell had.

What it adds

A new Settings section, 「思磨力代理 / Smoothly Proxy」, placed after the built-in Models and Model reasoning pages. It shows:

  • an upstream proxy card: enable toggle, protocol selector (HTTP / HTTPS / SOCKS5), host, port, optional username/password, and a Test connection button that verifies the upstream speaks its protocol;
  • a model providers list — hosts read from your dsh settings.yaml (llm-deepseek.baseURL, llm-pi-ai.providers.<n>.baseURL, any llm-* namespace), labeled with the friendly display name where available;
  • an other observed hosts list — hosts the proxy has seen in traffic (including registry.npmjs.org install/update traffic), persisted into proxy.json so they survive restarts;
  • a search box that filters both lists by host / name as you type.

Check a host to route it through the upstream proxy. Saving writes <DSH_HOME>/proxy.json; the running proxy re-reads the file on every request, so changes take effect immediately — no dsh restart needed.

How the proxy routes traffic

dsh host process
  ├─ undici fetch (model requests, web search) ──┐
  ├─ npm / pnpm / git / child CLIs ──────────────┤  HTTP(S)_PROXY → loopback proxy
  └─ subagents ──────────────────────────────────┘        │
                                                          ▼
                              127.0.0.1:<random>  forward proxy (raw net/http)
                                                          │
                              ┌───────────────────────────┴────────────┐
                              ▼                                        ▼
                     hosts in proxiedHosts                      everything else
                     + upstream enabled                      DIRECT (loopback ALWAYS direct)
                              │
                              ▼
                     upstream proxy (HTTP/HTTPS/SOCKS5, optional Basic auth)

Safety rules (hard-coded, not configurable):

  • loopback targets are always direct — never sent to an upstream proxy;
  • an upstream pointing back at this very proxy is treated as disabled (self-loop guard);
  • the proxy itself uses raw net/http, so it can never route its own outbound connections back through itself.

Config file

<DSH_HOME>/proxy.json     # $DSH_HOME, or ~/.dsh by default
{
  "upstream": { "enabled": false, "protocol": "http", "host": "", "port": 0, "username": "", "password": "" },
  "proxiedHosts": ["api.deepseek.com"],
  "knownHosts": ["api.deepseek.com", "registry.npmjs.org"]
}

knownHosts is written by the plugin (observed traffic); upstream and proxiedHosts are written from the settings page. You can also hand-edit the file while dsh runs — it is re-read live.

Install

Prerequisites: a DeepSeek Harness install with the dsh CLI, plus pnpm (the dsh plugin command runs pnpm under the hood). This is an installable bundle — it is loaded by dsh, not imported as a library.

From npm (recommended)

The package is published to npm as @karoc/dsh-proxy:

dsh plugin --profile web add @karoc/dsh-proxy

This installs the prebuilt bundle and appends it to the web profile. Then restart dsh web and open Settings → 思磨力代理 / Smoothly Proxy.

From git

dsh plugin --profile web add github:karoc/dsh-proxy#<sha>

A git install runs the package's prepare script to build the bundle. pnpm ≥ 10 requires allowlisting that build once — copy the exact package key pnpm prints into the profile's pnpm-workspace.yaml under allowBuilds, then re-run add (see docs/user/develop/basic/publish.md in the DSH repo).

Updating

Bump to the newest release with pnpm update (or re-add to pick up a newer git ref):

dsh plugin --profile web update dsh-proxy
# or, if the dependency spec is pinned: dsh plugin --profile web add dsh-proxy

Then restart dsh web so the new client bundle loads.

Removing

dsh plugin --profile web remove dsh-proxy

This removes both the dependency and its bundle layer from the web profile. Restart dsh web for the section to disappear.

Layout

cordis.patch.yml      # bundle layer: mounts the row that the client-modules
                      # service discovers (dsh.client manifest)
package.json          # dsh.bundle (patch) + dsh.client (web) + exports["./client"]
tsdown.config.ts      # self-contained build: node half + module-table client bundle
src/proxy-core.ts     # forward proxy engine (HTTP+CONNECT, SOCKS5/HTTPS upstream,
                      # per-host routing, live config, test probe) — TS port of
                      # dsh-desktop's scripts/proxy.mjs
src/index.ts          # host apply: starts the proxy, sets *PROXY env vars,
                      # registers /proxy/api (GET view / POST save·test·persist)
src/client/index.ts   # client apply: register settings.section (id dsh-proxy)
src/client/ProxySection.tsx  # the settings page (upstream card + host lists)
src/client/styles.ts  # design-token styles (--dsw-alias-*) + injection
src/client/locales.ts # en/zh copy
scripts/proxy-core.spec.mjs  # behavioral tests (13 scenarios, no network)

The /proxy/api route

The host half serves the settings page over a same-origin HTTP route (the built-in /api prefix is reserved for the gateway, so this uses /proxy/api):

  • GET /proxy/api → { upstream, proxiedHosts, knownHosts, hosts, providers, port }
  • POST /proxy/api { op: 'save', upstream, proxiedHosts } → sanitized + persisted config
  • POST /proxy/api { op: 'test', upstream } → { ok, detail }
  • POST /proxy/api { op: 'persist' } → merge observed hosts into knownHosts

Build

pnpm install
pnpm bundle          # emits lib/index.js + lib/client.js
pnpm test            # tsc --noEmit + proxy-core.spec.mjs (13 scenarios)
pnpm release:check   # release gate: docs/changelog/tag/tree/build/registry must all pass
pnpm publish         # runs the gate (prepack/prepublishOnly), then postpublish verifies the live release

The bundle leaves the platform packages (react, @deepseek-ai/cordis, @deepseek-ai/dsh-client-*) external — they resolve at runtime from the loader's module table; everything else is inlined.

Notes / limitations

  • The proxy is an egress point for the process, not a per-request switch the model reads. It works by pointing the process's HTTP(S)_PROXY at itself. Requests that dsh starts after this plugin's host apply() runs (any subprocess, and undici fetches whose global dispatcher is still lazy) ride the proxy. A dsh-internal fetch that already materialized its dispatcher before plugin load may not route through it — a dsh restart is the documented remedy (the desktop shell enforces the same boundary by setting env before spawning dsh).
  • npm/pnpm install/update traffic goes through the proxy like everything else; toggling a host related to install/update takes effect on the next install/update (already-in-flight operations keep their environment).
  • Section nav icon is shell-assigned, not plugin-assigned. The built-in ui-settings-general SettingsRoot.tsx navIcon(id) maps known ids and falls back to a gear for every other id — including this section's dsh-proxy. The settings.section registration has no icon field, so an external plugin cannot set it without patching the shell. When DSH exposes a per-section icon, use IconGlobeOutline14 from dsh-client-ui-primitives for this section.
  • Works with dsh ≥ 0.1.2 when installed the official way. The loader entry name, bundle registration id, and host plugin name are all @karoc/dsh-proxy (matching the npm package name). Hand-written link: dependencies are not recognized as packages by newer loaders — install via dsh plugin --profile web add @karoc/dsh-proxy (npm) or dsh plugin --profile web add link:/path/to/dsh-proxy (source), then restart dsh web.
  • The desktop shell (dsh-desktop) keeps its own proxy and tray settings window — this plugin is a standalone extraction, not a replacement. Both can coexist (e.g. install dsh-proxy into the shell's profile to get the in-dsh settings page too).

License

MIT

Contributing

See CONTRIBUTING.md (development + release checklist) and CHANGELOG.md for version history.

相关插件

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

Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编码计划配额,并提供实时令牌使用记录,同时在侧边栏条目中显示当前会话提供商今日的使用量Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Ui Usage Billing@kenz1117/dsh-ui-usage-billingDeepSeek Harness 的用量计费仪表板:侧边栏成本指标和完整的仪表板模态窗口,依据当前多提供商目录定价,并汇总会话日志中的实际用量。