Introduction¶
When developing DeepSeek Harness (DSH)-based agents or workflows, you sometimes need to manage HTTP proxies in a unified way, while other times you only need to enable a proxy for specific child processes or requests. Setting it directly in system environment variables often lacks flexibility and is difficult to adjust dynamically in the Web UI. The dsh-proxy-env plugin in the DSH ecosystem provides the ability to uniformly manage proxy environments inside DSH, supporting Host-side global dispatching and child process environment injection, as well as a Web-side configuration card.
Installation and Activation¶
Install it using the official plugin command. After installation, restart the Web process for the corresponding Profile for it to take effect.
dsh plugin --profile web add github:localSummer/dsh-proxy-env#main
After installation, use --dump-config to check the configuration layers. A # == dsh-proxy-env layer should appear and include id: proxy-env.
Core Features¶
The plugin mainly addresses proxy environment injection and control. Its core capabilities are as follows:
-
Proxy Mode
- all mode: Proxies all traffic such as API calls, child processes, Git, and npm by setting the
HTTP(S)_PROXY/ALL_PROXY/NO_PROXYenvironment variables. - include mode: Only proxies in-process fetch requests to hosts in the specified list; child process environment variables remain unchanged.
- all mode: Proxies all traffic such as API calls, child processes, Git, and npm by setting the
-
Host-side Control
- Sets the global dispatcher and child process proxy environment on the Host side.
- Provides a “Proxy Environment” configuration card on the Web settings page, supporting on/off switching and configuration editing.
-
Security and Fault Tolerance
- The proxy address supports the
http://orhttps://protocol. - Merges with the existing
no_proxyon the machine and forcibly includeslocalhostand127.0.0.1. - If the proxy is unreachable, it falls back to direct connections and emits a warning; in
onmode, if the proxy is unreachable, the plugin refuses to writeenabled=true.
- The proxy address supports the
Configuration Options¶
The configuration namespace is the proxy-env section in settings.yaml. It can also be edited on the Web settings page. Main fields include:
| Field | Type | Description |
|---|---|---|
enabled |
boolean | Whether to enable proxying |
url |
string | Proxy address; default is http://127.0.0.1:7890 |
mode |
all | include |
Proxy mode (all or include) |
proxyHosts |
string[] | Host list for include mode |
noProxy |
string | Exclusion list for all mode |
Commands and Tools¶
The plugin provides command-line tools and a Web interaction interface.
/proxy Command¶
You can invoke the following commands directly in the DSH Web UI or terminal:
/proxy on [代理地址]
/proxy off
/proxy status
proxy_env Tool¶
Provides a programmatic control interface, supporting on / off / status actions and url, mode, proxyHosts, and noProxy parameters.
Dependencies and Compatibility¶
- Runtime dependencies:
schemastery,undici. - DSH version requirement: compatible with
dsh >= 0.1.2-rc.1. - Uninstall note: When uninstalling the plugin on the Host side, it restores the dispatcher and environment variables via
ctx.effect, ensuring the system state is recovered.
Summary¶
dsh-proxy-env provides a lightweight proxy environment management solution for DSH. It is suitable for workflow development scenarios that require fine-grained control of network traffic. Developers can quickly switch proxy state via the settings page or command line without modifying system environment variables.
- Plugin directory: https://www.skillhub.cn/plugins/localSummer/dsh-proxy-env
- Source code address: https://github.com/localSummer/dsh-proxy-env