Run DSH Behind an HTTP/HTTPS Proxy
Use this only when your network requires a proxy. First prove the problem is network-related, then enable Node's environment-proxy support without accidentally proxying DSH's own localhost traffic.
On this page
This guide is for company networks, VMs, restricted environments or local setups where outbound API access must pass through an HTTP/HTTPS proxy. A normal home connection should usually use DSH without these variables.
First prove the failure is a network/proxy problem
If DSH reports fetch failed, ECONNREFUSED, ETIMEDOUT, ECONNRESET or a certificate error while curl/npm work only through a proxy, the model configuration may be fine and the Node process may simply not be using the proxy.
npm view @deepseek-ai/dsh versionIf even this basic registry request fails in the same shell, fix general network access first. If npm works but the LLM request fails, continue with the Node proxy checks below.
Check the Node.js version
node --versionDSH itself currently accepts ^22.19.0 || >=24.0.0. However, the Node environment-proxy switch used in this workaround arrived later: real DSH reports confirm NODE_USE_ENV_PROXY=1 needs Node 22.21+ or a supporting 24.x release.
Node 22.19 or 22.20 can meet the DSH engine range while NODE_USE_ENV_PROXY still does nothing. Upgrade Node before assuming the proxy variables are wrong.
Set HTTP_PROXY and HTTPS_PROXY
Use the proxy address supplied by your network administrator or local proxy application.
export HTTP_PROXY=http://proxy.example:8080
export HTTPS_PROXY=http://proxy.example:8080For PowerShell, set the variables in the same terminal that will launch DSH:
$env:HTTP_PROXY="http://proxy.example:8080"
$env:HTTPS_PROXY="http://proxy.example:8080"Do not publish proxy credentials or embed a real username/password in screenshots.
Keep DSH's local loopback traffic out of the proxy
DSH Web uses local loopback services. Add 127.0.0.1, localhost and ::1 to NO_PROXY so requests to the local DSH server do not get sent to the company proxy.
NO_PROXY=127.0.0.1,localhost,::1A recent upstream report found semicolon-separated Windows NO_PROXY values were not parsed as intended by undici, causing localhost traffic to go through the proxy and return 403. Prefer commas or whitespace.
Enable Node's environment proxy and launch DSH
macOS/Linux:
export NODE_USE_ENV_PROXY=1
export NO_PROXY=127.0.0.1,localhost,::1
npx @deepseek-ai/dsh webPowerShell:
$env:NODE_USE_ENV_PROXY="1"
$env:NO_PROXY="127.0.0.1,localhost,::1"
npx @deepseek-ai/dsh webTest a simple model request. If it now reaches the provider, you have isolated the failure to Node's outbound proxy handling rather than the DSH API key or model selection.
Corporate TLS inspection may require a CA certificate
Some company networks terminate and re-sign HTTPS traffic. If the proxy route is correct but Node reports certificate-chain errors, your organization may require its trusted CA certificate through Node's NODE_EXTRA_CA_CERTS.
NODE_EXTRA_CA_CERTS=/path/to/company-ca.crtDo not download random certificates to suppress TLS errors. A custom CA changes which HTTPS certificates the Node process will trust.
Windows-specific notes
- Use
$env:NAME="value"for the current PowerShell session while testing. - Persistent
setxchanges apply to new terminals, not the already-open shell. - Use comma-separated
NO_PROXYvalues; do not rely on a semicolon list. - A local DSH port error such as
EADDRINUSEor Windows reserved-portEACCESis a different problem from an outbound proxy failure.
Common proxy and network failures
curl/npm use the proxy but DSH still connects directly
Confirm a supporting Node version and set NODE_USE_ENV_PROXY=1 in the same shell before starting DSH.
DSH Web opens, but localhost API calls return 403 through the proxy
Check NO_PROXY. Include 127.0.0.1,localhost,::1 and use comma-separated entries.
NODE_USE_ENV_PROXY=1 appears to do nothing
Check Node. DSH may run on Node 22.19/22.20, but the environment-proxy switch requires a newer Node release.
Certificate chain / self-signed certificate error
Ask your administrator whether the network uses TLS inspection and whether Node should trust a company CA via NODE_EXTRA_CA_CERTS.
SOCKS proxy does not work
The environment-proxy path discussed here is for HTTP/HTTPS proxies. Do not assume a SOCKS URL is handled by the same mechanism.