Testing a proxy before you rely on it takes two minutes and saves hours of debugging. A proxy can fail in more ways than "it does not connect" — it might work but leak your real IP, claim to be in Germany while exiting from Virginia, be too slow to be usable, or get blocked by your actual target. This guide shows you how to test every dimension that matters — connectivity, IP change, anonymity, speed, location, and real-world success rate — with commands you can paste and run right now.
Two reasons. First, verification: before you point a scraper or a browser at a proxy, you want proof it works, hides your IP, and exits where it claims. Second, evaluation: when comparing providers, the only honest benchmark is how their proxies perform on your targets, not the numbers on a sales page. A structured test answers both.
The fastest check is a single curl through the proxy to an IP-echo endpoint. If it returns the proxy's IP, the proxy works and is hiding yours:
# your real IP for comparison
curl https://httpbin.org/ip
# through the proxy — should show a DIFFERENT IP
curl -x http://USERNAME:[email protected]:12321 https://httpbin.org/ip
If the second command shows a different IP than the first, connectivity and IP masking both pass. If it hangs or errors, check the host, port, and credentials (a credentials problem usually shows as a 407 Proxy Authentication Required).
Proxies fall into three anonymity tiers, and only one is safe for serious use:
X-Forwarded-For. The site knows your IP and that you are using a proxy. Useless for privacy or scraping.Via) that reveal a proxy is in use.Check which one you have by inspecting the headers the destination receives:
curl -x http://USERNAME:[email protected]:12321 https://httpbin.org/headers
If the response contains your real IP, or headers like Via, X-Forwarded-For, or Forwarded, the proxy is not elite. A high-anonymity proxy shows none of these.
A working proxy that adds two seconds to every request will wreck a large scrape. Measure the added latency with curl's timing output:
curl -x http://USERNAME:[email protected]:12321 \
-o /dev/null -s -w "connect: %{time_connect}s total: %{time_total}s\n" \
https://httpbin.org/get
Compare the total time with and without the proxy. A good residential proxy adds a fraction of a second; a congested one can add several. Run it a few times — a single slow result can be noise.
If you bought proxies for a specific country or city, confirm the exit actually resolves there:
curl -x http://USERNAME:[email protected]:12321 https://ipinfo.io/json
The response shows city, region, and country for the exit IP. If you targeted Germany and see a US city, your geo-targeting parameters are wrong or the pool lacks the location.
For privacy use, your DNS lookups should travel through the proxy, not your ISP. A DNS leak exposes which sites you visit even when your IP is hidden. Browser-based proxy setups can also leak your real IP via WebRTC. If you are using proxies for anonymity rather than scraping, run a DNS-leak and WebRTC-leak check in the browser you will actually use.
This is the test that actually predicts results. A proxy that passes every check above can still be blocked by your specific target. Fire a batch of requests at the real site and count how many succeed:
import requests
proxy = "http://USERNAME:[email protected]:12321"
proxies = {"http": proxy, "https": proxy}
ok, total = 0, 20
for i in range(total):
try:
r = requests.get("https://your-target.com", proxies=proxies, timeout=15)
if r.status_code == 200:
ok += 1
except Exception:
pass
print("success rate:", ok, "/", total)
A healthy success rate on a non-trivial target is 90% or higher. If it is low, you may need higher-trust IPs (residential or mobile), rotation, or better request headers.
This script checks connectivity, latency, anonymity, and geolocation in one pass — useful for vetting a proxy or a whole list:
import requests, time
def test_proxy(proxy_url):
proxies = {"http": proxy_url, "https": proxy_url}
try:
start = time.time()
ip = requests.get("https://httpbin.org/ip", proxies=proxies, timeout=15).json()
latency = round(time.time() - start, 2)
headers = requests.get("https://httpbin.org/headers", proxies=proxies, timeout=15).json()["headers"]
leaks = [h for h in ("Via", "X-Forwarded-For", "Forwarded") if h in headers]
anon = "elite" if not leaks else "leaks: " + ", ".join(leaks)
geo = requests.get("https://ipinfo.io/json", proxies=proxies, timeout=15).json()
print("OK ip=" + ip.get("origin", "?")
+ " latency=" + str(latency) + "s"
+ " anon=" + anon
+ " geo=" + str(geo.get("city")) + "/" + str(geo.get("country")))
except Exception as e:
print("FAIL " + proxy_url + " -> " + str(e))
test_proxy("http://USERNAME:[email protected]:12321")
If you do not want to write code, browser-based checkers can verify a single proxy's IP, anonymity, and location in seconds. They are convenient for a quick sanity check, but they cannot test success against your real target and you are trusting a third party with your credentials — so for production vetting, the curl and Python tests above are safer and more accurate.
When you are comparing providers, run the same tests across a sample of their IPs and weigh:
SpyderProxy gives you elite residential, ISP, datacenter, and mobile IPs you can test against your own targets — residential from $1.75/GB, static residential ISP at $3.90/day, static datacenter at $1.50/proxy/month, and LTE mobile at $2/IP.
Send a request through it to an IP-echo endpoint like httpbin.org/ip and compare the result to your real IP. If the proxy returns a different IP, it is working and masking yours. With curl: curl -x http://USER:PASS@host:port https://httpbin.org/ip.
Request httpbin.org/headers through the proxy and inspect the headers the destination receives. If your real IP appears, it is transparent. If headers like Via or X-Forwarded-For appear, it is anonymous but detectable. If none of those show up, it is elite (high anonymity), which is what you want.
Use curl's timing output: curl -x PROXY -o /dev/null -s -w "total: %{time_total}s" URL, and compare the total time with and without the proxy. Run it several times since a single slow result can be noise. A good residential proxy adds only a fraction of a second.
Transparent proxies forward your real IP, so the site sees both your IP and that you are proxying. Anonymous proxies hide your IP but reveal that a proxy is in use. Elite (high anonymity) proxies hide your IP and add no proxy-revealing headers, making them indistinguishable from a direct connection.
Generic checkers only confirm the proxy connects and hides your IP. Your target may still block the IP based on reputation, your headers, or your behavior. Always test success rate against your real target, and use higher-trust residential or mobile IPs if datacenter IPs are being blocked.
Run at least 20 to 50 requests against your real target and measure the percentage that return 200. A single request tells you almost nothing; a batch reveals the true success rate and latency spread. Aim for 90% or higher on a non-trivial target.
Do not assume a proxy is good because it connects. Test it across every dimension that matters — connectivity, IP change, anonymity, speed, location, and real-world success rate — before you build on it. The curl one-liners and the Python tester above take minutes and tell you exactly what you are working with. When you are ready to test against IPs that pass every check, spin up a SpyderProxy residential plan from $1.75/GB and run the script above on your own targets.