Node.js proxy setup
Node 18+ ships fetch, but it ignores HTTP_PROXY by default. Pass an undici ProxyAgent as the dispatcher and every fetch routes through your residential gateway. No axios, no extra HTTP client required.
Connection details
Swap PROXY_USER / PROXY_PASS for the credentials on your dashboard. New here? Create an account to generate a key.
Node.js (fetch) proxy example
Steer the exit IP from the username
Tips & gotchas
- undici ships with Node 18+; if you import it explicitly, run npm i undici.
- Prefer axios? Use the https-proxy-agent package and pass it as httpsAgent.
Node.js (fetch), answered
Why does Node fetch ignore my proxy?
Native fetch does not read HTTP_PROXY env vars. You must pass a dispatcher (undici ProxyAgent) per request, or set a global dispatcher with undici's setGlobalDispatcher.
Does this work with axios or got?
Yes. axios takes an https-proxy-agent as httpsAgent; got accepts an agent option. The same gateway URL works across all of them.
Ready to route Node.js (fetch) through residential IPs?
Create an account, paste the code above, and we'll add your first 1 GB of residential free on your first top-up. Pay by the GB after that — no subscription.