Routes DeepSeek Harness outbound traffic through a local Clash proxy, with automatic fallback to direct when the proxy is off.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Lunatic029/dsh-clash-proxy
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 | 中文
dsh-clash-proxy
Route DeepSeek Harness outbound HTTP through a local forward proxy (Clash, V2Ray, …), with automatic bypass of loopback and private networks.
When your harness needs to reach the public internet through a proxy (for example, Clash running on 127.0.0.1:7897), this plugin makes every outbound request take that route:
- the harness's own
fetch(web search, web fetch, LLM API calls) through an undici dispatcher - child processes the agent's shell runs (
git,curl,npm,pnpm, …) through the standardHTTP_PROXY/HTTPS_PROXY/NO_PROXYenv vars - a transient web toast when the proxy is unreachable
Requirements
- Node.js
>= 22(matches the harness engine range) - a DeepSeek Harness installation with a profile (for example
web) - a local forward proxy exposing an HTTP CONNECT ("mixed") port
Install
dsh plugin --profile web add github:<your-org>/dsh-clash-proxy
# or, once published to npm:
dsh plugin --profile web add dsh-clash-proxy
Then configure the proxy in the profile's cordis.patch.yml:
- id: dsh-clash-proxy
config:
proxy: 'http://127.0.0.1:7897'
Restart the harness. The proxy URL defaults to $HTTPS_PROXY / $HTTP_PROXY / $ALL_PROXY when config.proxy is omitted.
Configuration
| key | type | default | meaning |
|---|---|---|---|
proxy |
string | proxy env vars | forward-proxy URL, e.g. http://127.0.0.1:7897 |
enabled |
boolean | true |
set false to disable the plugin entirely |
noProxy |
string[] | [] |
extra hosts / IPs / CIDRs to bypass |
Bypass (NO_PROXY)
These always bypass the proxy, so loopback and local services keep working:
localhost, 127.0.0.0/8, ::1, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16
plus $NO_PROXY and config.noProxy. IPv4 CIDR matching is supported.
How it works
- installs one process-global undici dispatcher that routes each request to the proxy or direct, based on NO_PROXY (with IPv4 CIDR support)
- sets
HTTP_PROXY/HTTPS_PROXY/ALL_PROXY/NO_PROXYso child processes inherit the same route - exposes
GET /dsh-clash-proxy/status→{ "reachable": boolean }, which the web client polls to show a "proxy unreachable" toast
The plugin restores the previous dispatcher and env vars when unloaded.
Known limitations
git clone git@…(SSH, port 22) is not proxied — only HTTP/HTTPS traffic.- Node scripts the agent runs that call
fetchdirectly do not readHTTP_PROXY; only the harness's own fetch uses the dispatcher. - Download speed depends entirely on the proxy node's bandwidth and stability.
- Only an HTTP CONNECT proxy (Clash "mixed" port) is supported; SOCKS is out of scope.
Development
pnpm install
pnpm build # tsc (host) + tsdown (client)
pnpm test
License
MIT
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-remote-web-ui★ 8670
Remote control of a dsh web workspace from phone or PC: QR-code pairing through a token-gated channel, SSE real-time sync, and separate mobile and full desktop GUI modes.
zhu1090093659/dsh-web#packages/dsh-ssh★ 8670
SSH ops panel for DSH: web terminal, SFTP transfer with progress, local port forwarding, and one-command cluster execution across hosts; agents share the same host config.
saya-ch/dsh-mobile★ 441
Access DeepSeek Harness from the Android app or a mobile browser with secure LAN and remote connections, persistent device pairing, and a customizable mobile interface.
ZSeven-W/dsh-ios★ 320
A live iOS Simulator or USB-connected iPhone inside the conversation: 22 agent tools for booting, building, driving the UI by accessibility identity or OCR text, list-row actions and SwiftUI preview hot reload, plus a streaming sidebar panel you can tap and drag on.
liguobao/ds-harness-remote★ 318
Multi-device remote access for DeepSeek Harness: continue an active session from your phone, tablet, browser, or another computer over an end-to-end encrypted channel (Noise IK + adaptive relay/WebRTC transport), with device authorization, ApiProxy-only remote capabilities, and read-only file preview via dsh-file-viewer — no shell, remote desktop, or write access.
wenbin-wb/dsh-bridge★ 195
Remote and mobile access for DeepSeek Harness: provides LAN QR code connection, Cloudflare/custom tunnels, WeChat, QQ, Feishu, Telegram bot integration, and security authentication.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.