Repository navigation
v0.1.1 — Runtime-switchable outbound proxy
What you get
Route every in-process outbound request — LLM providers, web_search / web_fetch, streamable-http MCP — through an HTTP(S) CONNECT or SOCKS5 proxy, and flip it on / off / to another server at runtime by editing one settings section. Zero restarts.
# ~/.config/dsh/settings.yaml (hot-reloaded)
dsh-proxy:
enabled: true
proxy: socks5://127.0.0.1:1080 # http(s):// also supported
noProxy: [localhost, .internal.example]
exportEnv: true # children (curl/git/MCP) follow tooHighlights
- Real hot switching:
dsh-proxy:settings section drives undici's global dispatcher; every save reroutes instantly (see the demo below) - HTTP(S) CONNECT via
EnvHttpProxyAgent; SOCKS5 (with URL credentials) via undici's native agent;socks5h:///socks://accepted - One noProxy matcher for both protocols (undici semantics: bare entries match host + dot-boundary subdomains,
host:portpins a port,*bypasses all); ambientNO_PROXY/HTTP_PROXYenv is deliberately ignored in-process exportEnvmirrors the switch into child-process env without ever clobbering operator-set values; mid-session operator edits are adopted and restored- Invalid config keeps traffic direct and logs why — the host never crashes on a typo
- Proxy URL credentials are redacted in logs
Install
# in ~/.config/dsh/profiles/<name>/package.json
"dependencies": { "@tr1v3r/dsh-proxy": "^0.1.1" },
"dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@tr1v3r/dsh-proxy"] } }
dsh plugin --profile <name> install --no-frozen-lockfileRestart once to mount; afterwards switching needs no restart.