Proxy Connection String Builder
Enter your proxy's protocol, host, port and credentials, and get the exact connection string plus ready-to-run snippets for curl, Python, Node.js and Scrapy. Nothing you type leaves this page.
Connection string
http://user1:pass1@proxy.example.com:8080curl
curl -x 'http://user1:pass1@proxy.example.com:8080' 'https://httpbin.org/ip'
Python (requests)
import requests
proxies = {
"http": "http://user1:pass1@proxy.example.com:8080",
"https": "http://user1:pass1@proxy.example.com:8080",
}
r = requests.get("https://httpbin.org/ip", proxies=proxies, timeout=30)
print(r.status_code, r.text[:200])Node.js
// npm install undici
// Node's global fetch IS undici internally, but that copy is not
// importable, and a dispatcher from the installed undici throws when
// handed to the global fetch. Import both from the same install.
import { fetch, ProxyAgent } from "undici";
const dispatcher = new ProxyAgent("http://user1:pass1@proxy.example.com:8080");
const res = await fetch("https://httpbin.org/ip", { dispatcher });
console.log(res.status, await res.text());Environment variables
export HTTP_PROXY='http://user1:pass1@proxy.example.com:8080' export HTTPS_PROXY='http://user1:pass1@proxy.example.com:8080' export ALL_PROXY='http://user1:pass1@proxy.example.com:8080'
Most CLI tools (curl, pip, apt, git) read these automatically.
Python (Scrapy)
# settings.py: via HttpProxyMiddleware (enabled by default)
# or set per-request:
yield scrapy.Request(
"https://httpbin.org/ip",
meta={"proxy": "http://user1:pass1@proxy.example.com:8080"},
)The anatomy of a proxy URL
Almost every tool accepts a proxy as a single URL: scheme://username:password@host:port. The scheme states how your client talks to the proxy (HTTP CONNECT or SOCKS5), not what kind of traffic goes through it: an http:// proxy URL carries HTTPS traffic. The most common failure is credentials containing @, : or /: those must be percent-encoded or the URL parses wrong. This builder percent-encodes them.
SOCKS5 vs SOCKS5h: where DNS happens
With plain socks5://, your machine resolves hostnames and sends the proxy an IP, so your local DNS server sees every domain you visit. With socks5h://, the hostname is passed through and resolved by the proxy, keeping DNS on the proxy's side and matching what the target site expects of that network. For scraping and privacy work, socks5h is usually the right choice. curl understands the scheme directly; Python's requests needs the requests[socks] extra, which the snippet notes.
Checking that traffic goes through the proxy
After wiring up a snippet, point it at an IP-echo endpoint and confirm the address that comes back is the proxy's exit, not your own. A misconfigured client can fall back to a direct connection without an error, so this check is worth running once. The example target above does it, and our What Is My IP tool gives you the same check in a browser. If you need to reason about the proxy's address itself, the CIDR calculator tells you which network it belongs to.
More free tools
Request one URL from a datacenter IP and residential IPs at once, and see which of them gets blocked.
What your HTTP client gives away: header order, missing client hints, and contradictions with your user-agent.
Five questions and a straight answer, including when the answer is that you do not need proxies at all.
Your public IP address, the country it resolves to, reverse DNS and the headers your browser sends.
Derive how many proxies a job needs from volume, deadline, per-IP rate limit, concurrency and retries.
Check a path against a pasted robots.txt and see the exact rule that allowed or disallowed it.
Paste a curl command and read it back as Python, Node.js, Go or PHP, with the flags translated properly.
Network address, broadcast, usable range and host counts for any CIDR prefix length.
Decode any user-agent string into browser, engine, OS and device, including bots and HTTP libraries.
Need proxies behind your code?
Node4 sells datacenter, rotating and residential proxies over HTTP(S), with SOCKS5 on paid plans. Datacenter and rotating exits are in the US, Italy and Spain; residential exits cover 170+ countries. Start with free proxies, no card required.