Pre-launch and runtime HTTP proxy control: writes the proxy into DSH's user-level .env so the launcher and the requests before any plugin loads use it, then keeps that file in sync from a switch in the Plugins page.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Bai-Ziyi/dsh-proxy-control
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
中文 | English
Pre-launch and runtime HTTP proxy control for DeepSeek Harness (dsh).
DeepSeek Harness resolves its outbound proxy once at launch, from the inherited environment or $DSH_HOME/.env, before the first plugin mounts. A runtime-only proxy plugin cannot cover what happens before it loads — model catalog discovery, plugin installs, login and update checks. This plugin writes the same user-level .env the launcher reads, so the next start is proxied from the first request, and it also installs an in-process policy so the switch takes effect immediately in the running Host.
Features
- One switch in Plugins → Installed → Proxy Control → Configure.
- Writes
HTTP_PROXY/HTTPS_PROXY(and optionalNO_PROXY) to$DSH_HOME/.env, preserving unrelated lines. - Applies the same proxy to the running process through
@deepseek-ai/dsh-http-proxy's publicinstallProxyFromEnvironment, so model, web-fetch and MCP HTTP requests use it without a restart. - Turning the switch off removes the proxy lines and installs a direct policy; the next launch starts direct.
- Loopback always bypasses the proxy. Only
http://andhttps://proxy URLs are accepted. - No build step, plain ESM; the three DSH packages it imports are declared as dependencies at the bundled versions.
Install
# Desktop profile (the one the desktop app uses)
dsh plugin --profile desktop add github:Bai-Ziyi/dsh-proxy-control
# Or the web profile
dsh plugin --profile web add github:Bai-Ziyi/dsh-proxy-control
Use the exact GitHub owner Bai-Ziyi (capital B, capital Z, no hyphen). After installation, restart DSH once so the new bundle loads. Then open Plugins → Installed → Proxy Control → Configure, enter an http(s):// URL and turn the switch on. The running Host switches immediately; the .env written at that point covers the next launch's launcher phase.
If your profile is app-managed (Desktop), the Plugins page is the normal way to install and enable bundles; the command above is the CLI equivalent.
Configuration
| Field | Default | Meaning |
|---|---|---|
enabled |
false |
Route outbound requests through the proxy. |
url |
empty | HTTP or HTTPS proxy endpoint, for example http://127.0.0.1:8080. |
noProxy |
empty | Optional comma-separated hosts that connect directly. |
The plugin is inert until a URL is entered: an empty url neither rewrites .env nor touches the dispatcher, so installing it cannot overwrite an existing manual proxy configuration. Once a URL is saved and the switch is on, values persist in the profile's cordis.patch.yml and are mirrored into $DSH_HOME/.env.
How it works
- On activation, the Host half reads the three config fields and returns immediately when
urlis empty. - It rewrites
$DSH_HOME/.envatomically: every existing proxy line is removed, then the currentHTTP_PROXY/HTTPS_PROXY/NO_PROXYlines are appended. Unrelated lines are kept in order. - It installs an overlay policy with
installProxyFromEnvironment, which replaces undici's global dispatcher for the process. - When the plugin unloads or the config changes, the previous dispatcher is restored before the next policy is installed.
Because the file is written before the next launch, the launcher phase is covered too — that is the part a runtime-only plugin cannot reach.
What it does not do
- No SOCKS, PAC, or system-proxy detection. Only explicit
http(s)://URLs. Use the HTTP port your local proxy client exposes. - No per-provider routing.
NO_PROXYcan bypass hosts; the rest of the process shares one policy. - No credential store. The proxy URL is written as-is; avoid embedding secrets you would not put in a local
.env. - Runtime disable does not rewrite an already-spawned child's environment. The Host's own requests switch immediately; a restart gives child processes a clean environment.
- Do not run it alongside another plugin that replaces undici's global dispatcher; they will fight over the policy.
Compatibility
- DSH
0.2.x; tested on0.2.1-rc.5for loading and switch synchronization (the network path was tested on0.2.1-rc.2with a local HTTP proxy). - Uses the public exports of
@deepseek-ai/dsh-http-proxy(installProxyFromEnvironment),@deepseek-ai/dsh-home-paths(resolveDshHome) and@deepseek-ai/schemastery. These are declared as dependencies at the versions bundled with DSH0.2.1-rc.5(see Dependencies); a profile install resolves this package by its real path, so it cannot rely on the Host's package tree. - The client half registers into
plugins.row.config; it requires the Plugins page (@deepseek-ai/dsh-client-ui-plugin-manager) from the same DSH version.
Dependencies
The plugin declares the three @deepseek-ai/* packages it imports at the versions bundled with DSH 0.2.1-rc.5, rather than peer dependencies. A profile install resolves this package by its real path, so it cannot rely on the Host's package tree; with autoInstallPeers: false in the profile, peer declarations would leave the imports unresolved. Keep these versions in step with the DSH release you run.
Development
npm test
The test suite covers the pure .env rewrite (add, replace, disable, CRLF, unrelated lines). It has no external dependencies.
License
MIT
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38796
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37348
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 29024
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 10192
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6129
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4796
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.