proxiesseller
Integration

Node.js + Axios Proxy Setup (HTTP + SOCKS)

Use Proxiesseller proxies in Node.js Axios with agents and safe defaults.

PT
Technical Team
Author
January 03, 2026
Published
5 min read
Reading time
#node#axios#http-agent

Overview

Axios needs proper agent configuration for proxies. This guide shows stable patterns for HTTP proxies.

Installation & Setup

Install Axios:

npm i axios

Examples

Axios with HTTP proxy

import axios from "axios";

const client = axios.create({
  proxy: {
    protocol: "http",
    host: "HOST",
    port: Number("PORT"),
    auth: { username: "USER", password: "PASS" },
  },
  timeout: 15000,
});

const r = await client.get("https://api.ipify.org");
console.log(r.data);

Troubleshooting

  • If proxy is ignored: ensure you didn't set HTTP(S)_PROXY env vars conflicting
  • If TLS errors: use https endpoint and correct proxy protocol
  • If blocked: rotate IPs and reduce request bursts
Pro Tip

For large-scale scraping, prefer a queue + concurrency limit instead of firing thousands of requests instantly.