All posts
Tutorials4 min readOct 11, 2026

cURL and wget proxy cheat sheet

Every command you need to use authenticated HTTP and SOCKS5 proxies from the terminal, with cURL, wget, environment variables and PowerShell, plus quick ways to test speed and rotation.

By crawlproxies

The terminal is the fastest way to check that a proxy works, find out which IP and country you're getting, and measure how quick it is. Bookmark this page. Replace USERNAME and PASSWORD with your own from the generator; the examples use the Residential gateway geo.crawlproxies.com.

cURL: HTTP proxy

bash
# credentials in the proxy URL
curl -x http://USERNAME:PASSWORD@geo.crawlproxies.com:8080 https://ipinfo.io/json

# or separately with -U (--proxy-user)
curl -x http://geo.crawlproxies.com:8080 -U "USERNAME:PASSWORD" https://ipinfo.io/json

HTTPS websites work through an HTTP proxy: cURL opens a tunnel with CONNECT, and the TLS connection to the site stays end to end.

cURL: SOCKS5

bash
curl -x socks5h://USERNAME:PASSWORD@geo.crawlproxies.com:1080 https://ipinfo.io/json

Use socks5h:// (with the h) so the proxy resolves the hostname. Plain socks5:// looks up DNS on your own machine.

Targeting and sessions

Location and session options go in the username, so they work in every command on this page:

bash
# a German IP
curl -x http://USERNAME-country-de:PASSWORD@geo.crawlproxies.com:8080 https://ipinfo.io/json

# a sticky Texas IP for 10 minutes
curl -x http://USERNAME-country-us-state-texas-session-t1-time-600:PASSWORD@geo.crawlproxies.com:8080 https://ipinfo.io/ip

See geo-targeting and sticky vs rotating sessions for every option.

Just the IP, please

bash
curl -s -x http://USERNAME:PASSWORD@geo.crawlproxies.com:8080 https://ipinfo.io/ip

Watch rotation happen

Each curl call opens a new connection, so a rotating username gives a new IP every time:

bash
for i in 1 2 3 4 5; do
  curl -s -x http://USERNAME-country-us:PASSWORD@geo.crawlproxies.com:8080 https://ipinfo.io/ip; echo
done

Swap in a sticky username and the five IPs will match.

Measure speed

bash
curl -s -o /dev/null -x http://USERNAME:PASSWORD@geo.crawlproxies.com:8080 \
  -w "connect %{time_connect}s  first byte %{time_starttransfer}s  total %{time_total}s\n" \
  https://example.com/

time_connect is how long it took to reach the proxy; time_starttransfer includes the trip to the website and back. Run it a few times; residential exits vary a little.

Debug a failing connection

bash
curl -v -x http://USERNAME:PASSWORD@geo.crawlproxies.com:8080 https://ipinfo.io/ip

In the verbose output look for:

  • CONNECT ipinfo.io:443 followed by 200 Connection established: the proxy accepted you.
  • 407 Proxy Authentication Required: wrong username or password.
  • Failed to connect to geo.crawlproxies.com port ...: wrong port, or a firewall in the way.

Environment variables

Most command-line tools read these:

bash
export http_proxy="http://USERNAME:PASSWORD@geo.crawlproxies.com:8080"
export https_proxy="http://USERNAME:PASSWORD@geo.crawlproxies.com:8080"
export no_proxy="localhost,127.0.0.1"

cURL only reads the lowercase http_proxy, but accepts https_proxy in either case. Setting both lowercase forms covers everything.

wget

bash
wget -qO- -e use_proxy=yes \
  -e https_proxy=http://USERNAME:PASSWORD@geo.crawlproxies.com:8080 \
  https://ipinfo.io/json

Or keep the credentials out of the URL:

bash
wget -qO- -e use_proxy=yes -e https_proxy=http://geo.crawlproxies.com:8080 \
  --proxy-user=USERNAME --proxy-password=PASSWORD https://ipinfo.io/json

wget doesn't support SOCKS proxies. Use cURL for SOCKS5. To make the proxy permanent, put the same settings in ~/.wgetrc:

text
use_proxy = on
https_proxy = http://geo.crawlproxies.com:8080
http_proxy = http://geo.crawlproxies.com:8080
proxy_user = USERNAME
proxy_password = PASSWORD

Windows

Windows 10 and 11 include real cURL as curl.exe. In PowerShell, type curl.exe explicitly: in Windows PowerShell 5.1, plain curl is an alias for Invoke-WebRequest, which takes different options.

powershell
curl.exe -x http://USERNAME:PASSWORD@geo.crawlproxies.com:8080 https://ipinfo.io/json

With PowerShell's own cmdlet:

powershell
$cred = New-Object System.Management.Automation.PSCredential("USERNAME", (ConvertTo-SecureString "PASSWORD" -AsPlainText -Force))
Invoke-RestMethod -Uri https://ipinfo.io/json -Proxy http://geo.crawlproxies.com:8080 -ProxyCredential $cred

Quick reference

TaskCommand
HTTP proxycurl -x http://USER:PASS@geo.crawlproxies.com:8080 URL
SOCKS5 proxycurl -x socks5h://USER:PASS@geo.crawlproxies.com:1080 URL
Show your proxy IPcurl -s -x ... https://ipinfo.io/ip
Verbose debuggingcurl -v -x ... URL
Timingcurl -s -o /dev/null -w "%{time_total}\n" -x ... URL
wget with proxywget -e use_proxy=yes -e https_proxy=http://USER:PASS@geo.crawlproxies.com:8080 URL

Ready to move from the terminal to code? Start with Python or Node.js.

Written by
crawlproxies
Create account