Why start with cURL
When a proxy doesn't work in your app, you need to know whether the problem is the proxy or the app. cURL answers that in one line. If a Webshare proxy works in cURL, the issue is in your code or tool. Background in cURL proxy.
Basic test
curl -x http://USERNAME:PASSWORD@PROXY_IP:PORT https://httpbin.org/ipYou should see the proxy's IP, not yours. If you use IP authorization, drop the credentials:
curl -x http://PROXY_IP:PORT https://httpbin.org/ipCredentials can also be passed separately, which avoids URL-encoding problems with special characters:
curl -x http://PROXY_IP:PORT -U "USERNAME:PASSWORD" https://httpbin.org/ipSOCKS5
curl -x socks5h://USERNAME:PASSWORD@PROXY_IP:PORT https://httpbin.org/ipsocks5h makes the proxy resolve DNS, so your local resolver doesn't leak the domains you visit. See DNS leaks and proxies.
Backbone gateway: rotation and sessions
# New IP every request
for i in 1 2 3; do curl -s -x http://USERNAME-rotate:PASSWORD@p.webshare.io:80 https://httpbin.org/ip; done
# Same IP for session 42
for i in 1 2 3; do curl -s -x http://USERNAME-42:PASSWORD@p.webshare.io:80 https://httpbin.org/ip; doneThe first loop should show three different IPs; the second, one IP three times. Copy exact username formats from your dashboard. See Webshare sticky sessions.
Geo-targeting check
curl -s -x http://TARGETING_USERNAME:PASSWORD@p.webshare.io:80 https://ipinfo.io/jsonLook at country, region and city. Generate the targeting username in the dashboard. See Webshare geo-targeting.
Timing a proxy
curl -s -o /dev/null -x http://USERNAME:PASSWORD@PROXY_IP:PORT \
-w "connect %{time_connect}s tls %{time_appconnect}s first byte %{time_starttransfer}s total %{time_total}s\n" \
https://example.com/Run it ten times and look at the median, not the best result. See proxy speed test.
Budget tip: Before scaling, run a short pilot with Webshare on your real targets and record success rate, latency and bandwidth per result. Our our complete Webshare guide explains which Webshare product fits which job.
Testing a real target
curl -s -o /dev/null -w "%{http_code}\n" -x http://USERNAME:PASSWORD@PROXY_IP:PORT \
-A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0 Safari/537.36" \
https://target.example/pageA 200 is a pass; 403, 429 or a CAPTCHA page mean the target is resisting. Note that cURL's TLS fingerprint differs from a browser's, so some sites block cURL even through good proxies.
Debugging authentication
curl -v -x http://USERNAME:PASSWORD@PROXY_IP:PORT https://httpbin.org/ip 2>&1 | grep -i "proxy\|< HTTP"407 Proxy Authentication Required: wrong credentials, wrong mode, or an unauthorized IP.Could not resolve proxy: typo in the host.Connection refused: wrong port, or the proxy is down.CONNECT tunnel failed: the proxy refused the destination; check restrictions. See Webshare restricted sites.
Quick health check for a whole list
while IFS=: read ip port user pass; do
code=$(curl -s -o /dev/null -m 15 -w "%{http_code}" -x "http://$user:$pass@$ip:$port" https://httpbin.org/ip)
echo "$ip:$port $code"
done < webshare_proxies.txtAnything other than 200 is worth checking or replacing.
Useful cURL flags for proxy work
| Flag | What it does |
|---|---|
-x | Sets the proxy |
-U user:pass | Sends proxy credentials separately |
-m 20 | Overall timeout in seconds |
--connect-timeout 10 | Timeout for the connection phase |
-s -o /dev/null -w "%{http_code}" | Prints only the status code |
-v | Verbose output, shows proxy handshake |
--compressed | Accepts and decodes gzip and brotli |
-L | Follows redirects |
-H "Accept-Language: de-DE" | Sends a language header for localisation tests |
Comparing two proxies quickly
for p in "http://USER:PASS@IP1:PORT" "http://USER:PASS@IP2:PORT"; do
printf "%s " "$p"
curl -s -o /dev/null -x "$p" -w "%{http_code} %{time_total}s\n" https://target.example/
doneRun it a few times to see whether one proxy is consistently slower or blocked.
Proxy tip: For a second opinion on hard targets, run the same test through Geonode residential proxies, which support sticky sessions up to 24 hours and ASN targeting. We compare the two in testing Geonode with cURL.
Checking headers your requests carry
curl -s -x http://USER:PASS@IP:PORT https://httpbin.org/headersA good proxy shouldn't add headers that reveal your original IP. If you see X-Forwarded-For or Via with your real address, something in your chain is misconfigured. See proxy anonymity levels.
Saving a reproducible test
When you contact support, include a single cURL command (with credentials removed) and the output. It removes all doubt about whether the problem is the proxy or your application.
A real-world example
A developer's scraper suddenly starts failing with connection errors. Instead of debugging the code, they run a one-line cURL test through the same proxy: it returns 407. The password was rotated in the dashboard the day before, and the scraper's environment variable still had the old one. Updating it fixes the problem in two minutes. Since then, the team's runbook starts every proxy issue with a cURL test.
Webshare and Geonode are two options among many. Our best proxies in 2026 guide explains how to match a proxy type to each task, and cheap proxies that work shows where budget providers fit.
Key takeaways
- A one-line cURL test tells you whether a problem is the proxy or your application.
- Use
-Uto pass credentials separately and avoid URL-encoding issues. - Use
socks5h://for SOCKS5 to keep DNS private. - Loop requests through the backbone to confirm rotation and sessions behave as expected.
-wtiming variables give quick latency measurements for comparing proxies.
FAQ
Why does cURL work but my app doesn't?
The proxy is fine; the app's proxy settings, credential handling or HTTPS support is the problem. Compare the exact proxy URL.
How do I URL-encode a password with special characters?
Replace characters like @, : and # with their percent codes, or use -U to pass credentials separately.
Can cURL test Webshare residential rotation?
Yes. Use the backbone with the rotate option in a loop and check that the IP changes.
Can cURL use the Webshare backbone with SOCKS5?
Use the SOCKS5 endpoint and port shown in your dashboard with socks5h://.
How do I hide proxy credentials from my shell history?
Put them in an environment variable or a .netrc-style file and reference that instead of typing them inline.
Why does cURL return HTML from a different country?
That's the proxy working: the site sees the proxy's location. Check ipinfo.io through the proxy to confirm.
Editorial note: Proxy providers change their pools, features and prices often, so treat any figures here as typical ranges at the time of writing and confirm current terms with the provider before you buy.