- Home
- Plugins
- Dev & Plugin Tools
- dsh-vpn-proxy
dsh-vpn-proxy
aeolusjack/dsh-vpn-proxy
Routes DeepSeek Harness network traffic through your VPN's local HTTP proxy when it is running and falls back to a direct connection otherwise, with automatic detection and periodic re-checking on Windows and macOS.
Install
dsh plugin --profile web add github:aeolusjack/dsh-vpn-proxyREADME
dsh-vpn-proxy
A DeepSeek Harness plugin that routes all Harness network traffic through your VPN's local HTTP proxy while it is running, and falls back to a direct connection when it is not.
When you use a proxy-based VPN client (Clash, Mihomo, sing-box, v2rayN, Privoxy, …) you normally have to remember to export HTTP_PROXY before launching the Harness — and restart it whenever you toggle the VPN. This plugin does it automatically, on both Windows and macOS, without a restart.
What it does
- Detects the VPN. Probes a list of well-known local HTTP proxy ports (
7890,7891,7897,10809,8889,2080,8118, …) and reads the OS system proxy (WindowsInternet Settings, macOSscutil --proxy). - Verifies before switching. A candidate is only accepted after a real
CONNECT+ TLS handshake succeeds against a test URL, so a dead proxy or an unrelated service on that port is never installed. - Routes everything through one policy. It installs the detected proxy through
@deepseek-ai/dsh-http-proxy, which swaps undici's global dispatcher and publishes the environment. That single install covers the LLM adapters, web search/fetch, MCP-over-HTTP, telemetry, and every spawned child (git,npm,curl, subagents). - Falls back to direct. When no proxy verifies, traffic connects directly.
- Re-checks on an interval. Toggling the VPN on or off is picked up automatically. Routing only changes when the answer actually changes.
- Keeps the Web UI local. Loopback traffic (
127.0.0.1,localhost,::1) is always bypassed, so the Harness never tunnels its own UI through the proxy.
Install
From GitHub (recommended)
In DeepSeek Harness open Plugins → Add plugin and enter the repository URL:
https://github.com/AeolusJack/dsh-vpn-proxy
From a local directory
git clone https://github.com/AeolusJack/dsh-vpn-proxy
Then in Plugins → Add plugin, choose the cloned directory.
Configuration
The plugin works with sensible defaults. Open the plugin's row in Settings to tune it. Available fields:
| Field | Default | Meaning |
|---|---|---|
enabled | true | Turn automatic routing on or off. |
mode | auto | auto (detect), proxy (always use proxyUrl), direct (always direct), off (do nothing). |
proxyUrl | "" | Explicit proxy URL for proxy mode, also tried first in auto. |
candidates | common ports | Local http:// proxy URLs probed in auto mode. |
testUrl | https://www.gstatic.com/generate_204 | HTTPS URL used to verify a proxy tunnels traffic. |
intervalMs | 30000 | How often to re-check for a VPN. |
timeoutMs | 4000 | Per-probe timeout. |
useSystemProxy | true | Also read the OS system proxy. |
respectEnv | true | Also consider HTTP_PROXY/HTTPS_PROXY/ALL_PROXY inherited at launch. |
noProxy | "" | Comma-separated hosts that always connect directly (loopback is always added). |
Supported VPN clients
Any client that exposes a local HTTP proxy works out of the box:
- Clash / Mihomo / Clash Verge — mixed port
7890(or7891/7897). - v2rayN / V2Ray — HTTP port
10809(or1081). - sing-box — mixed port
2080. - Privoxy —
8118. - Anything else — add its
http://127.0.0.1:<port>tocandidates, or enable system proxy in the client.
Limitations
- HTTP/HTTPS proxies only. SOCKS5-only endpoints (e.g. a bare
ss-localon1080) are not supported, because the underlying Harness transport only acceptshttp://andhttps://proxies. Most modern clients expose a mixed/HTTP port that works. - TUN / system-VPN mode. A VPN that only creates a virtual network interface and does not expose an HTTP proxy port cannot be detected by port probing. If the client also sets the system proxy, it is still detected via
useSystemProxy; otherwise configure its HTTP proxy URL explicitly inproxyUrl. - Switching the proxy mid-request can interrupt a long-lived streaming request that was already in flight, but only when the VPN state actually changes.
Requirements
- DeepSeek Harness
0.2.2-rc.5or a compatible release (the plugin pinsengines.dsh). - Node.js
>= 24.9.0(bundled with the Harness). - Windows, macOS, or Linux.
License
Related plugins
deepseek-harness
deepseek-ai/deepseek-harness
dsh-market
dsh-market/dsh-market
dsh-web (dsh-plugin-manager)
zhu1090093659/dsh-web
dsh-web
zhu1090093659/dsh-web