Quick setup summary
- What you need
- A delivered ProxyGrove order, Node.js with Axios installed, and (for SOCKS5) socks-proxy-agent.
- Protocol to select
- HTTP
- Where to enter details
- Use axios.create({ proxy }) on Node.js, or an agent for SOCKS5. Browser Axios needs another path.
- How to verify
- GET an IP echo URL and confirm the egress IP matches My Proxies.
Overview
Axios is a promise-based HTTP client for Node.js and browsers. In Node.js you can pass a `proxy` object (protocol, host, port, auth) per the Axios request config. Browser builds do not use that Node proxy path the same way. SOCKS5 typically requires a custom agent rather than a native Axios SOCKS flag. This guide is a compatible setup with ProxyGrove credentials—not an official partnership.
Never share live credentials publicly. Use YOUR_PROXY_* placeholders until you copy values from My Proxies.
Why connect ProxyGrove with Axios?
- Route Node.js Axios requests through ProxyGrove with an explicit `proxy` object.
- Handle SOCKS5 via an agent when your order requires it—do not assume a native Axios SOCKS flag.
- Keep browser Axios traffic on a backend or OS proxy path when the Node config does not apply.
- Validate egress with a single IP echo request before deploying workers.
Integration compatibility
Compatibility below reflects what this application commonly supports—not every protocol ProxyGrove can deliver. Always match your delivered order.
HTTP
Supported
HTTPS destinations
Supported
TLS to the destination is independent of proxy protocol.
SOCKS4
Not Supported
SOCKS5
Limited / Conditional
Only when your order lists SOCKS5 and the app/runtime supports it.
Username / password auth
Supported
IP allowlisting
Limited / Conditional
Depends on your ProxyGrove order options and the app’s network path.
Sticky / static session
Supported
Rotating session
Supported
Supported ProxyGrove products
ProxyGrove products used with this guide: Static IP, Residential, Mobile, and Corporate. ProxyGrove does not market datacenter, standalone ISP, or scraping-API SKUs on this site.
- Residential Use when Axios workflows benefit from residential-network egress. View Residential →
- Mobile Use when Axios sessions should appear on mobile-carrier routes. View Mobile →
- Static IP Use when Axios needs a consistent egress IP across sessions. View Static IP →
- Corporate Use when Axios connects through business-oriented proxy credentials. View Corporate →
Requirements before setup
- A ProxyGrove account with a delivered order in My Proxies
- Proxy host and port from your order credentials
- Username and password from your order credentials
- Matching protocol (HTTP and/or SOCKS5) as listed on the order
- Node.js project with Axios installed (browser Axios needs a different networking path)
- Optional: socks-proxy-agent when your order lists SOCKS5
Step-by-step: ProxyGrove with Axios
-
1
Step 1
Install Axios in your Node.js project and keep ProxyGrove secrets in environment variables.
-
2
Step 2
Create an Axios instance and set the `proxy` object: protocol http, host, port, and auth username/password from My Proxies.
-
3
Step 3
Remember: the Node.js `proxy` option is not identical in browser Axios—use a backend or system proxy for browser traffic.
-
4
Step 4
Send a test GET to an IP echo URL and confirm the egress IP matches your ProxyGrove product.
-
5
Step 5
For SOCKS5 orders, attach a SocksProxyAgent and set `proxy: false` so Axios does not double-apply an HTTP proxy.
-
6
Step 6
Log 407/timeouts separately and never commit live passwords to git.
Proxy configuration examples
Replace placeholders with values from My Proxies. Do not paste live credentials into public chats or tickets.
Node.js — Axios proxy object (HTTP)
The Axios `proxy` option applies to Node.js adapters. Browser Axios does not route through this object the same way—use a backend, extension, or OS proxy for browsers.
import axios from "axios";
const client = axios.create({
proxy: {
protocol: "http",
host: "YOUR_PROXY_HOST",
port: Number("YOUR_PROXY_PORT"),
auth: {
username: "YOUR_PROXY_USERNAME",
password: "YOUR_PROXY_PASSWORD",
},
},
timeout: 30000,
});
const { data } = await client.get("https://httpbin.org/ip");
console.log(data);Environment variables (HTTP(S)_PROXY)
Some Node tooling honors HTTP_PROXY / HTTPS_PROXY. Prefer explicit Axios config when you need per-request control.
export HTTP_PROXY="http://YOUR_PROXY_USERNAME:YOUR_PROXY_PASSWORD@YOUR_PROXY_HOST:YOUR_PROXY_PORT"
export HTTPS_PROXY="http://YOUR_PROXY_USERNAME:YOUR_PROXY_PASSWORD@YOUR_PROXY_HOST:YOUR_PROXY_PORT"
# Optional bypass for local services
export NO_PROXY="localhost,127.0.0.1" SOCKS5 — agent-based (not a native Axios proxy flag)
Axios does not provide a built-in SOCKS5 `proxy.protocol` that works everywhere. In Node.js, use an agent such as `socks-proxy-agent` when your ProxyGrove order lists SOCKS5.
import axios from "axios";
import { SocksProxyAgent } from "socks-proxy-agent";
const agent = new SocksProxyAgent(
"socks5://YOUR_PROXY_USERNAME:YOUR_PROXY_PASSWORD@YOUR_PROXY_HOST:YOUR_PROXY_PORT"
);
const { data } = await axios.get("https://httpbin.org/ip", {
httpAgent: agent,
httpsAgent: agent,
proxy: false, // disable Axios HTTP proxy when using a custom agent
});
console.log(data);Protocol and session choices
HTTP proxy path
This Axios guide focuses on HTTP proxy configuration. Prefer matching HTTP credentials from My Proxies.
Sticky vs rotating sessions
Sticky/static sessions keep a consistent egress when Axios must resume the same IP. Rotating sessions change egress according to your ProxyGrove product settings. Pick based on workflow needs—not marketing labels.
Test your proxy connection
- Run a single Node.js request to an IP echo endpoint (for example httpbin.org/ip).
- Confirm the returned IP matches the ProxyGrove product you expect from My Proxies.
- Force an auth failure once (wrong password) and confirm you see 407 / tunnel errors—then restore placeholders with real values only in a private env.
- If you use SOCKS5, verify the agent path separately; do not assume the HTTP `proxy` object covers SOCKS.
Common mistakes
Using the Node `proxy` object in browser Axios
Browser Axios does not apply the Node.js `proxy` config the same way. Use a backend, extension, or OS proxy for browser traffic.
Expecting native SOCKS5 via `proxy.protocol`
For SOCKS5 orders, attach an agent such as socks-proxy-agent and set `proxy: false` so Axios does not double-apply an HTTP proxy.
Leaving HTTP_PROXY env vars fighting instance config
Environment proxies can override or conflict with axios.create({ proxy }). Prefer one explicit approach per process.
Troubleshooting
Works in curl but fails in Axios
Confirm you are on the Node.js adapter. Browser Axios ignores the Node `proxy` object. Also verify env HTTP_PROXY is not fighting your instance config.
407 Proxy Authentication Required
Re-copy username/password from My Proxies. Avoid URL-encoding twice when using both auth fields and a proxy URL.
SOCKS5 ignored
Axios has no universal native SOCKS5 proxy flag. Use socks-proxy-agent (or similar) and disable Axios HTTP proxy when the agent is attached.
Timeouts only through proxy
Check host/port, local firewall, and that the order is Delivered. Try HTTP first if SOCKS is misconfigured.
Wrong IP after deploy
CI secrets may still point at an old order. Update environment variables and redeploy the Axios worker.
Best practices
- Keep live ProxyGrove credentials in environment variables or a secret store—never in public repos.
- Match HTTP vs SOCKS5 to the protocol printed on your delivered order.
- Validate with one request before scaling concurrency in Axios.
- Separate connectivity failures from application errors by logging status codes explicitly.
- Document whether your job runs in Node.js or the browser—proxy configuration differs.
Frequently asked questions
Does ProxyGrove officially partner with Axios?
No. This is a compatible manual setup guide only.
Does the Axios proxy object work in browsers?
Not the same way as Node.js. Browser Axios typically needs a backend proxy path, extension, or OS-level proxy.
Which ProxyGrove products work with Axios?
Static IP, Residential, Mobile, and Corporate credentials from My Proxies.
Does Axios support SOCKS5 natively?
Not as a universal built-in flag. Use an agent such as socks-proxy-agent in Node.js when your order lists SOCKS5.
Where do I find host, port, and credentials?
Open My Proxies after a delivered ProxyGrove order and copy the values into env vars or your Axios config.
Should I put passwords in source control?
No. Use environment variables or a secret manager and keep YOUR_PROXY_* placeholders in docs.