Free Tool

cURL / wget / Python Command Generator

Enter your SOCKS5 proxy credentials and a target URL. We generate perfectly escaped commands for four popular clients — no more debugging misplaced quotes or missing socks5h prefixes.

Every input is saved to the URL — copy it to share the exact result.

cURL

curl \
  --proxy 'socks5h://proxy.example.com:1080' \
  -L \
  -X GET \
  'https://api.ipify.org?format=json'

wget

wget \
  -e use_proxy=yes \
  -e "socks_proxy=socks5h://proxy.example.com:1080" \
  'https://api.ipify.org?format=json'

Python (requests)

import requests

proxies = {
    "http": "socks5h://proxy.example.com:1080",
    "https": "socks5h://proxy.example.com:1080",
}

resp = requests.request(
    "GET",
    "https://api.ipify.org?format=json",
    proxies=proxies,
    timeout=30,
)
print(resp.status_code, resp.text[:500])

Node.js (undici)

// npm i undici
import { fetch, ProxyAgent } from "undici";

const dispatcher = new ProxyAgent("socks5h://proxy.example.com:1080");

const res = await fetch("https://api.ipify.org?format=json", {
  method: "GET",
  dispatcher,
});

console.log(res.status, await res.text());

01 · Overview

What is the cURL, wget & Python SOCKS5 Command Generator?

The cURL, wget & Python SOCKS5 Command Generator produces copy-paste ready code for every major HTTP client, correctly wired to route through a SOCKS5 proxy with authentication. Whether you script with bash, Python requests, aiohttp, or Node fetch, the generated snippets match the current best practice for DNS-safe SOCKS5 traffic in 2026.

02 · How it works

How the tool works

  1. 01Enter the target URL and your SOCKS5 host, port, username, password.
  2. 02Pick a client: cURL, wget, Python requests, Python aiohttp, Node.js fetch, or Go net/http.
  3. 03The generator emits a full working command with credentials, DNS-safe scheme (socks5h) and sensible defaults.
  4. 04Every field syncs to the URL — share the config with teammates without pasting credentials in chat (paste real creds locally only).

03 · Use cases

When to use this tool

One-off scraping tasks

Grab a snippet, paste in your terminal, get the page. No boilerplate.

CI/CD pipelines

Wrap the emitted command in a job step. Environment-variable interpolation is preserved.

Teach juniors

Show new engineers the correct --proxy syntax without a 30-minute Stack Overflow trawl.

Cross-language migration

Same request, six different languages. Compare libraries at a glance.

04 · Pro tips

Best practices

  • Use socks5h:// (not socks5://) — otherwise DNS resolves locally and can leak.
  • Store credentials in environment variables (PROXY_USER, PROXY_PASS) and reference them: --proxy socks5h://$PROXY_USER:$PROXY_PASS@host:1080.
  • Add --resolve or --dns-servers 1.1.1.1 to override further DNS behavior when debugging.
  • For Python, pip install requests[socks] once — the extra installs PySocks automatically.

05 · FAQ

Frequently asked questions

Which SOCKS5 clients does the command generator produce code for?+

cURL with --proxy, wget via torsocks, Python requests with the [socks] extra, Python aiohttp with aiohttp-socks, Node.js fetch with socks-proxy-agent, and Go net/http with x/net/proxy. Each tab emits a full working command or script pre-filled with your inputs.

How do I safely pass SOCKS5 credentials on the command line?+

Set credentials as environment variables (export PROXY_USER=...; export PROXY_PASS=...) and reference them in the URL: curl --proxy socks5h://$PROXY_USER:$PROXY_PASS@host:1080 https://target. This keeps plaintext credentials out of your shell history and out of process listings.

Do the generated commands work with rotating residential proxies?+

Yes. Rotating pools expose a single gateway host:port with credentials that carry session semantics (user-session-abc). Every request through the gateway rotates automatically. Paste the gateway credentials into the generator and the emitted command supports rotation with no changes.

Why does the generator default to socks5h:// instead of socks5://?+

socks5h:// forces DNS resolution to happen at the proxy exit, preventing your local ISP from seeing target hostnames. Local DNS leaks are the #1 source of soft blocks on modern anti-bot systems. There is no downside to socks5h for HTTP scraping.

How do I install the requests[socks] extra for Python?+

Run pip install 'requests[socks]' once. This pulls the PySocks package as a transitive dependency and enables the socks5:// scheme in requests. On Python 3.11+ the same command works unchanged inside virtualenvs and Poetry projects.

Can the generator produce a Playwright or Puppeteer SOCKS5 config?+

The generator focuses on HTTP clients where SOCKS5 is a single URL parameter. Browser automation requires launcher flags (--proxy-server=socks5://host:port for Chromium). Copy the host:port from the generator and pass it via launch options — auth flows through Chromium's HTTP_PROXY_AUTH prompt or a proxy-auth extension.

How do I add custom headers to the generated cURL command?+

Append -H 'Header: Value' to the emitted command. Common additions: -H 'User-Agent: ...', -H 'Accept-Language: en-US,en;q=0.9'. Combine with the Headers Inspector tool to match headers to your proxy exit country.

Are the generated commands compatible with older cURL versions?+

The --proxy flag with socks5h:// requires cURL 7.21.7 or newer (2011). Every modern OS ships with a newer version. On very old CentOS 6 or Ubuntu 12.04 systems, upgrade cURL first or fall back to the wget-via-torsocks tab.

How do I use the generated cURL command inside a bash loop for scraping?+

Wrap the emitted command in a for-loop and substitute the URL: `for url in $(cat urls.txt); do curl --proxy socks5h://$PROXY $url; sleep 1; done`. Keep the SOCKS5 credentials in $PROXY as an env variable so the command line stays readable and safe from process listings.

Can I generate a command that rotates User-Agents per request?+

The generator emits a single command with a static UA. For rotation, wrap the emitted curl call in a shell loop that picks a random line from a UA list and passes it via `-A`. For Python, use the random.choice() pattern over a UA pool inside the requests session.

Why does the Node fetch snippet require socks-proxy-agent instead of undici?+

Undici (Node's built-in fetch) supports HTTP/HTTPS proxies via ProxyAgent but does not implement SOCKS5. socks-proxy-agent bridges the SOCKS5 handshake into Node's http/https stack. Install with `npm install socks-proxy-agent` and pass the agent via the fetch dispatcher option.

Does the generator support HTTP CONNECT tunneling for HTTPS through SOCKS5?+

Yes — every emitted command handles HTTPS transparently. cURL, requests, aiohttp and socks-proxy-agent all wrap the target TLS handshake inside the SOCKS5 tunnel. You never need to configure CONNECT semantics manually; that's HTTP-proxy syntax, not SOCKS5.

How do I add timeout and retry logic to the generated commands?+

For cURL: `--connect-timeout 10 --max-time 30 --retry 3 --retry-delay 2`. For Python requests: `requests.get(url, proxies=..., timeout=(10, 30))` inside a try/except with a manual retry counter or the `tenacity` library. Bake these into a wrapper function once and reuse across the codebase.

Can I generate a Docker-friendly command that runs the request in a container?+

Yes — prefix the emitted command with `docker run --rm curlimages/curl` and pass the proxy env var via `-e PROXY_URL=...`. This is useful in CI environments where you don't want to install curl or Python locally but still need to route through a SOCKS5 exit.

06 · Deep dive

cURL, wget & Python SOCKS5 Command Generator — questions we answer

How to run cURL through a SOCKS5 proxy with authentication in 2026

The canonical modern command is: curl --proxy socks5h://user:pass@host:1080 https://target.example. The socks5h scheme forces DNS to resolve remotely, the credentials are inline (or reference $ENV variables), and no external SDK is required. This generator produces the same command with your exact values pre-filled and URL-shareable for teammates.

Python requests SOCKS5 proxy example with credentials

Install the SOCKS extra once: pip install 'requests[socks]'. Then: proxies = {'http': 'socks5h://user:pass@host:1080', 'https': 'socks5h://user:pass@host:1080'}; requests.get(url, proxies=proxies). Pick the Python tab in the generator and every field is filled in from your inputs, including the socks5h scheme that prevents DNS leaks.

Node.js fetch with a SOCKS5 proxy using socks-proxy-agent

Node 18+ ships fetch natively but has no built-in SOCKS support. Install socks-proxy-agent, build the agent from your proxy URL, and pass it as dispatcher. The Node tab in this generator emits a complete, working script that you can drop into an ES module unchanged.

07 · Related tools

Continue your audit

Also known as

curl socks5 commandpython requests socks5wget socks5 proxynode fetch socks5aiohttp socks proxygo http socks5 client