Preface¶
When developing agents in DeepSeek Harness (DSH), model requests, MCP, web scraping, and command tools often share the same outbound network. The official @deepseek-ai/dsh-http-proxy only reads environment variables like HTTPS_PROXY at startup and does not read operating system proxy settings. The result is: simply turning on “System Proxy” in a proxy application may still leave the Harness connecting directly; switching proxies requires changing environment variables and restarting; and proxy policies are inconsistent across subsystems.
dsh-network-proxy, published by community maintainer baizhizzl, is a client-side DSH plugin. It adds an HTTP Proxy row to Settings → General Settings, supporting three modes: Direct, Follow System, and Custom. Changes take effect immediately after saving, without needing to restart the Harness.
What is this¶
Package Name: @local/dsh-network-proxy. License: MIT. Supported Platforms: Windows (reads system proxy via WinINET registry), macOS (scutil --proxy).
The plugin detects the system proxy (including PAC) at runtime, attaches the policy to the dispatcher of the process-level fetch, and supports in-place hot-swapping. Simultaneously, it syncs the policy to common environment variables for child processes such as HTTP_PROXY, HTTPS_PROXY, and NO_PROXY.
Core Features¶
System Proxy Detection¶
- Windows: Reads
ProxyEnable,ProxyServer,ProxyOverride, andAutoConfigURLfromHKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings; supportshttp=…;https=…per-protocol proxies and PAC (includes a built-in streamlined PAC evaluator that evaluates by target domain). - macOS: Obtains the system proxy via
scutil --proxy. - When the system proxy switch is off, the interface still displays the detected proxy address to facilitate turning on the proxy in system settings.
Hot-Swapping and Coverage¶
When settings are saved, the global dispatcher is replaced directly, taking effect on the very next request. This covers outbound traffic within the Harness process that uses Node’s built-in fetch(), including models, MCP HTTP, web search/scraping, and fetch() calls within command tools.
Does not cover: The desktop window’s Chromium network stack itself (which follows the system proxy natively), telemetry (node:http, direct connection by design), and model-generated PTC/workflow child processes (managed by the Harness’s own proxy policy).
Bypass and Child Processes¶
localhost, 127.0.0.0/8, ::1, and 0.0.0.0 are always connected directly; the system bypass list (e.g., <local>, *.example.com, 10.0.0.0/8) is also applied.
For child processes, NODE_USE_ENV_PROXY is set so that tools like curl, git, and pnpm follow the same policy.
Persistence and Recovery¶
The selected configuration is written to $DSH_HOME/network-proxy.json and applied semi-automatically by the Host on the next startup. Uninstalling or disabling the plugin restores the dispatcher and environment variables to their startup state.
Installation and Activation¶
Method 1: Install via Agent within a Session¶
Say the following in a Harness session:
Install plugin https://github.com/baizhizzl/dsh-network-proxy
The Agent will call the plugin manager’s install_bundle with the argument:
git+https://github.com/baizhizzl/dsh-network-proxy.git
Method 2: Local Directory¶
plugin_manager install_bundle target: /path/to/dsh-network-proxy
After installation, open Settings → General Settings; the HTTP Proxy row will be visible below “Session Display”.
Three Modes¶
| Mode | Behavior |
|---|---|
| Direct | Discards proxy; both in-process fetch() and child processes connect directly |
| Follow System | Reads the current OS proxy; connects directly if the system proxy is off, but the interface displays the detected proxy address |
| Custom | Uses the entered http://host:port (optionally with user:pass@), effective immediately upon save |
The default mode is Follow System.
Typical Usage¶
- System Proxy Active: If you are already using a tool like Clash or Surge with “System Proxy” enabled: After installing the plugin, keep it on Follow System and save. This allows models and MCP to use the same outbound connection without setting
HTTPS_PROXYor restarting the Harness. - Temporary Fixed Proxy: If you only need to specify a temporary fixed proxy: Select Custom, fill in e.g.,
http://127.0.0.1:7890, and it takes effect immediately after saving. - System Proxy Changed: If you have just toggled the system proxy or changed the PAC: Click “Re-detect” in the settings or reopen the settings page to refresh (the plugin does not monitor system proxy changes in real-time).
Use Cases and Notes¶
Suitable for developers on Windows / macOS who rely on system proxies daily but wish to unify outbound traffic within the Harness without frequent restarts.
Before installing, it is recommended to review the source code and MIT License on the GitHub Repository. The plugin runs with the current DSH process permissions, and custom proxy URLs are stored in local configuration; please do not enter sensitive credentials in untrusted environments.
Known Limitations (excerpted from the project README):
- Supports only
http:///https://proxies; SOCKS will prompt that it is currently unsupported. - The PAC evaluator covers common helper functions;
dnsResolvereturns an empty string during synchronous evaluation, and complex PACs may degrade. - System proxy credentials (rare) are not parsed; the Custom mode supports
user:pass@. - After modifying the system proxy, manual “Re-detect” or reopening the settings page is required.
Conclusion¶
dsh-network-proxy fills the gap in Harness’s ability to read system proxies at runtime, unify fetch and child process environments, and hot-swap HTTP proxies. The directory and details can be viewed on the SkillHub plugin page; installation and behavior are subject to the README.
- Directory Page: https://www.skillhub.cn/plugins/baizhizzl/dsh-network-proxy
- GitHub: https://github.com/baizhizzl/dsh-network-proxy