Proxies and networking
How do I test a proxy before using it?
Run four quick checks: it accepts your credentials, it exits from the IP and country you paid for, it responds fast enough, and your real target loads through it without a block page.
Four checks that catch most problems
A proxy can be "up" and still be useless for your job. Test it the way you will use it. First, confirm that it connects with your credentials. Second, look at the exit IP and its location. Third, time a few requests. Fourth, and most important, fetch a page from the site you actually care about and see whether you get content, a challenge or a block. Each check takes seconds, and together they explain nearly every later failure.
Connectivity and exit IP
curl is the fastest tool for the first two checks. Point it at an IP echo endpoint, one you run yourself or any service that returns the caller's address:
# -x sets the proxy; -w prints timing after the body
curl -sS -x "http://probe_user:Qm9zK1@203.0.113.55:9000" \
-w "\nconnect %{time_connect}s total %{time_total}s http %{http_code}\n" \
https://ip-echo.example.net/json
A 407 means the credentials or allowlist are wrong; see fixing 407. A timeout or "connection refused" points to the wrong host or port, or a dead proxy. If the echo shows your own server's IP, the proxy is not being used at all.
Location and network type
Look up the exit IP in a geolocation database and check the country, and for geotargeted work the region too. Check the ASN: a "residential" proxy whose IP belongs to a well known cloud provider is not what you paid for. Databases disagree at the edges, so compare two sources for anything important.
Speed and stability
Send ten to twenty requests and record connect time and total time for each. Look at the spread, not only the average: a proxy that is usually fast but sometimes takes eight seconds will stall a scraper and can push a proxy CAPTCHA task toward its two minute limit. For rotating gateways, also check how often the exit IP changes, and for sticky sessions, that it stays the same for the promised time.
import statistics, time, requests
def probe(proxy_url, target, rounds=15):
timings, codes = [], []
for _ in range(rounds):
t0 = time.perf_counter()
resp = requests.get(target, proxies={"https": proxy_url}, timeout=20)
timings.append(time.perf_counter() - t0)
codes.append(resp.status_code)
return {"median_s": round(statistics.median(timings), 2),
"worst_s": round(max(timings), 2), "codes": sorted(set(codes))}
The target check
An IP can be clean in general and already flagged by the site you need. Fetch a few real pages through the proxy with your normal headers. Look at the status code and the page title. A Cloudflare interstitial, a DataDome block, a reCAPTCHA wall or a 403 on the first request tells you this IP starts with poor trust on that site. Run the same check on several IPs from the pool to see whether the problem is one address or the whole range. The page on why proxies attract CAPTCHAs explains what you are seeing.
Leak checks for browsers
When the proxy is used in a browser, open a page that reports the IPs it can see through WebRTC and DNS. If your real address shows up, a WebRTC leak or local DNS resolution is exposing it, and the site will see both addresses.
Testing proxies for CAPTCHA tasks
For task types that run through your proxy, the solver must be able to reach it from the internet with a username and password. Run your curl check from a machine outside your own network, not from the server where the proxy is allowlisted. Then send one Cloudflare Challenge task and use the returned cookie through the same proxy. If the cookie works, the proxy is ready for volume. A failed task is not charged, so this test costs nothing when the proxy is wrong.
Keep testing after go-live
Proxies degrade. Rerun the target check on a schedule, track per-IP success and challenge rates, and drop addresses that fall behind. A five minute test each morning is cheaper than a day of empty results.
Common questions
Which curl flag sends traffic through a proxy?
Use -x or --proxy with the full URL, including the scheme and credentials, such as http://user:pass@host:port.
Why does my proxy show my own IP?
The client is not using it, often because the proxy was set only for http and the request was https.
How fast should a good proxy be?
It depends on type and distance; what matters is a steady median and few slow outliers for your target.
Can a proxy pass a test and still fail on my site?
Yes. The IP may be fine in general but already flagged by that site, which is why the target check matters.
How do I test a proxy for a solving task?
Check it from outside your network with credentials, then send one proxy task and use the cookie through the same proxy.
Keep reading
- How does proxy authentication work?Proxies check either a username and password sent with each request, or an allowlist of the client IP addresses.
- How do I fix HTTP 407 Proxy Authentication Required?A 407 comes from the proxy, not the site: credentials are missing, wrong or badly encoded, or your IP is not allowlisted.
- WebRTC leakHow a browser's real-time connection setup can reveal the true IP behind a proxy, and why that breaks session consistency.
- What proxy format does a solving task accept?Tasks take one proxy string in URL form, http://user:pass@host:port, in the proxy field of the task object.