Webshare Guides

Testing Webshare Proxies with cURL: Commands for Every Check

cURL commands to test Webshare proxies: basic connectivity, HTTPS and SOCKS5, the backbone gateway with rotate and session options, geo-targeting, timing and debugging authentication.

By Team of Monkeys Editorial Updated 3 min read Affiliate disclosure

This guide contains affiliate links to Geonode and Webshare. If you buy through them we may earn a commission, at no extra cost to you.

Webshare with cURL illustration showing cURL connecting through Webshare proxy to Test result, covering http, socks5, timing 3jdej38j4

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

bash
curl -x http://USERNAME:PASSWORD@PROXY_IP:PORT https://httpbin.org/ip

You should see the proxy's IP, not yours. If you use IP authorization, drop the credentials:

bash
curl -x http://PROXY_IP:PORT https://httpbin.org/ip

Credentials can also be passed separately, which avoids URL-encoding problems with special characters:

bash
curl -x http://PROXY_IP:PORT -U "USERNAME:PASSWORD" https://httpbin.org/ip

SOCKS5

bash
curl -x socks5h://USERNAME:PASSWORD@PROXY_IP:PORT https://httpbin.org/ip

socks5h 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

bash
# 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; done

The 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

bash
curl -s -x http://TARGETING_USERNAME:PASSWORD@p.webshare.io:80 https://ipinfo.io/json

Look at country, region and city. Generate the targeting username in the dashboard. See Webshare geo-targeting.

Timing a proxy

bash
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

bash
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/page

A 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

bash
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

bash
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.txt

Anything other than 200 is worth checking or replacing.

Useful cURL flags for proxy work

FlagWhat it does
-xSets the proxy
-U user:passSends proxy credentials separately
-m 20Overall timeout in seconds
--connect-timeout 10Timeout for the connection phase
-s -o /dev/null -w "%{http_code}"Prints only the status code
-vVerbose output, shows proxy handshake
--compressedAccepts and decodes gzip and brotli
-LFollows redirects
-H "Accept-Language: de-DE"Sends a language header for localisation tests

Comparing two proxies quickly

bash
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/
done

Run 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

bash
curl -s -x http://USER:PASS@IP:PORT https://httpbin.org/headers

A 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 -U to 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.
  • -w timing 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.

Affiliate disclosure: Team of Monkeys is an affiliate of Geonode and Webshare. Links and banners marked as sponsored, and links to Geonode and Webshare in the text, use our referral links, and we may earn a commission if you buy through them, at no extra cost to you. Our explanations and comparisons are written to be useful whichever provider you choose.

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.