yangzhe1991/dsh-proxy-router

dsh-proxy-router sends only rule-matched blocked domains through an upstream proxy while everything else connects directly: it repoints DSH's http(s) proxy at a local routing proxy on 127.0.0.1:17890, applies a hot-reloaded local rules file plus remote blocklists, and exposes the upstream address in the Web settings page.

dsh-proxy-router solves a mundane but expensive problem: once dsh is started with https_proxy / http_proxy / all_proxy exported, even api.deepseek.com and domestic sites take a detour through the proxy. The plugin turns 'when should this go through the proxy' into a maintainable rule table and 'who is the upstream' into a live setting. Only rule-matched blocked domains go through the upstream proxy; domestic sites, LAN addresses and unknown hosts connect directly. Because the decision is made in one local router rather than by environment variables inherited everywhere, the routing is auditable in one place, the rules hot-reload without restarting dsh, and the proxy address can be switched mid-session - which matters for anyone routing LLM traffic through a specific egress.

Infrastructure & Deployment ★ 1
View on GitHub ↗

Install

dsh plugin --profile web add @yangzhe1991/dsh-proxy-router

Copied verbatim from the README's install block (the README then says to restart dsh web). npm package @yangzhe1991/dsh-proxy-router at 0.3.1 (registry check 2026-10-16; the registry repository field resolves back to this repo).

Compatibility

The README describes the mechanism precisely: the plugin repoints the host's http(s) proxy at a local routing proxy bound to 127.0.0.1:17890, and everything outbound passes through it - main-process fetch() (LLM API, web_search, MCP, plugin HTTP calls), the web_fetch tool (sharing one policy via the host's proxyRouteFor()), and bash subprocesses such as curl, git and npm/pnpm through http_proxy plus NODE_USE_ENV_PROXY. Three rule layers apply with first-match-wins: a local rules file at ~/.dsh/proxy-router/rules.txt that is hot-reloaded, remote blocklists (default Loyalsoldier), and the default direct connection. The upstream proxy address is a setting in the Web settings page, so it can be changed without restarting.

Details

Alternatives

1m01m0/deepseek-harness-desktop · AIcivilization/dsh-vps-manager · AlliotTech/deepseek-harness-docker

More plugins in Infrastructure & Deployment

Browse more in Infrastructure & Deployment

Guides for Infrastructure & Deployment plugins