Proxio Logo
LocationsPricing
Log inSign Up
Back to Blog
proxy testingcurlpythonproxy leaksproxy speed

How to Test a Proxy: Check IP, Location, Speed and Leaks

How to test a proxy step by step: check the exit IP, location and ASN, measure latency and speed with curl, find DNS, WebRTC and header leaks, then your target.

Proxio Team
October 13, 2026
9 min read

On this page

  • The Proxy Test Checklist
  • Step 1: Check That the Proxy Connects
  • Step 2: Confirm the Exit IP and Location
  • Step 3: Measure Latency and Download Speed
  • Step 4: Test a Whole List With Python
  • Step 5: Test in a Browser
  • Interpreting the Results
  • Step 6: Test Against Your Real Target
  • Final Thoughts

To test a proxy, send a request through it to an IP echo endpoint and confirm the returned IP, country and network are what you paid for, then measure latency with curl's timing output, check for DNS, WebRTC and header leaks, and finally run a small batch against your real target. Each step catches a different class of problem, and together they take about ten minutes.

This guide walks through a checklist, the exact commands for HTTP and SOCKS5, a small Python script for testing a whole list at once, browser checks, and a table for reading the results.

The Proxy Test Checklist

Before running anything, know what you are checking. A proxy can "work" in the narrow sense (it returns a page) and still be wrong for the job.

  1. Does it connect? The proxy accepts the connection and your credentials.
  2. Which exit IP? The IP the website sees, which should not be yours.
  3. Which country, city and ASN? The location and network match the order.
  4. Which IP type? Residential, ISP or datacenter, judged from the ASN and organization name.
  5. Latency and throughput. Connection time, time to first byte, download speed.
  6. DNS and WebRTC leaks. Mostly a browser concern, but DNS also matters for SOCKS5 in scripts.
  7. Header leaks. No Via, X-Forwarded-For or Forwarded header carrying your real IP.
  8. Block rate on the real target. The only test that predicts production results.

If the IP type is new to you, residential vs. datacenter vs. ISP proxies explains what each one should look like in an IP lookup.

Step 1: Check That the Proxy Connects

curl is the fastest way to test a single proxy because it prints clear errors. For an HTTP proxy:

curl -x http://user:[email protected]:8080 https://api.ipify.org

For a SOCKS5 proxy, use --socks5-hostname so the proxy resolves the target hostname instead of your local resolver:

curl --socks5-hostname proxy.example.com:1080 --proxy-user user:pass https://api.ipify.org

You can also write the SOCKS5 proxy as a URL: -x socks5h://user:[email protected]:1080. The h in socks5h means the same thing as --socks5-hostname. Plain socks5:// makes curl resolve DNS on your machine, which is a DNS leak.

If your password contains characters like @, : or #, URL-encode them (@ becomes %40) or pass credentials with --proxy-user so curl does not misread them as part of the host. Not sure which protocol to use? See HTTP vs. SOCKS5 proxies.

Step 2: Confirm the Exit IP and Location

A successful request to an IP echo service returns the exit IP as plain text:

curl -x http://user:[email protected]:8080 https://api.ipify.org
curl -x http://user:[email protected]:8080 https://ifconfig.me

Run it twice against two different services. If both return the same address and it is not your own, the proxy is forwarding traffic. For a static ISP or datacenter IP the address should be identical on every run. For a rotating residential proxy it should change according to your rotation settings, or stay fixed for the length of a sticky session.

Next, look up that IP in any IP geolocation or WHOIS service and check three fields:

  • Country and city: matches what you ordered.
  • ASN and organization: a consumer ISP name points to residential or ISP proxies, a hosting or cloud company name points to datacenter.
  • Connection type: some lookup services label the IP as hosting, business or residential.

Keep in mind that geolocation databases disagree, especially at city level. A different city in one database is normal; a different country across several databases is worth raising with your provider.

Step 3: Measure Latency and Download Speed

curl's -w option prints timing variables after the request finishes:

curl -x http://user:[email protected]:8080 -o /dev/null -s \
  -w "connect: %{time_connect}s\ntls: %{time_appconnect}s\nttfb: %{time_starttransfer}s\ntotal: %{time_total}s\nspeed: %{speed_download} B/s\n" \
  https://example.com/

What each value means when a proxy is involved:

VariableWhat it measuresWhat it tells you
time_connectTCP connection to the proxy is openDistance and load between you and the proxy
time_appconnectTLS handshake with the target finished (HTTPS only)Round trips through the proxy to the target
time_starttransferFirst byte of the response arrived (TTFB)Proxy route plus the target's own response time
time_totalWhole request completedEnd-to-end time for this page size
speed_downloadAverage download rate in bytes per secondThroughput, only meaningful on a large file

All times are cumulative seconds from the start of the request. To judge throughput, download a file of several megabytes rather than a small HTML page, since small responses finish before the connection reaches full speed.

Run each measurement five to ten times and compare the median, not the best result. Datacenter proxies usually show the lowest and most stable numbers, ISP proxies are close behind, and rotating residential proxies vary more because each request may go through a different home connection.

Step 4: Test a Whole List With Python

When you have dozens or hundreds of proxies, test them concurrently. This script needs requests (install requests[socks] for SOCKS5 support) and prints status, exit IP and latency for each proxy:

import time
from concurrent.futures import ThreadPoolExecutor
from urllib.parse import urlsplit

import requests

PROXIES = [
    "http://user:[email protected]:8080",
    "http://user:[email protected]:8080",
    "socks5h://user:[email protected]:1080",
]
TEST_URL = "https://api.ipify.org?format=json"
TIMEOUT = 10  # seconds


def check(proxy):
    parts = urlsplit(proxy)
    label = f"{parts.scheme}://{parts.hostname}:{parts.port}"  # hide credentials
    start = time.perf_counter()
    try:
        resp = requests.get(
            TEST_URL,
            proxies={"http": proxy, "https": proxy},
            timeout=TIMEOUT,
        )
        resp.raise_for_status()
        latency_ms = (time.perf_counter() - start) * 1000
        return label, "OK", resp.json()["ip"], f"{latency_ms:.0f} ms"
    except requests.RequestException as exc:
        return label, f"FAIL {type(exc).__name__}", "-", "-"


with ThreadPoolExecutor(max_workers=20) as pool:
    for label, status, ip, latency in pool.map(check, PROXIES):
        print(f"{label:<40} {status:<28} {ip:<16} {latency}")

pool.map keeps the output in the same order as your list, which makes it easy to match failures to lines in your file. The exception name in the status column (ProxyError, ConnectTimeout, ReadTimeout, SSLError) points straight at the cause in the table further down.

The script expects one proxy URL per line in scheme://user:pass@host:port form. If your list is in a different layout, such as host:port:user:pass, convert it with the proxy format converter first. On Proxio, ISP and datacenter lists can also be copied in five common formats from the dashboard.

Step 5: Test in a Browser

Scripts do not run JavaScript or WebRTC, so browser setups need their own check. This matters most if you use an anti-detect browser or manage accounts; the anti-detect browser proxy setup guide covers the profile settings in detail.

  1. Set the proxy in the browser or profile (HTTP or SOCKS5, host, port, credentials). In Firefox with SOCKS5, enable "Proxy DNS when using SOCKS v5".
  2. Open What Is My IP. It shows the IP, location and request headers a website sees when you open it through the proxy.
  3. Check for header leaks. You should not see Via, X-Forwarded-For, Forwarded or X-Real-IP carrying your real address. Note that on HTTPS pages, an HTTP proxy only tunnels encrypted traffic and cannot add headers; header leaks show up on plain HTTP requests or with misconfigured transparent proxies.
  4. Check WebRTC. WebRTC can reveal your real public IP through STUN requests that do not go through an HTTP proxy. Use a WebRTC leak test page and confirm that only the proxy IP, or no public IP at all, appears. Anti-detect browsers usually have a setting to replace or disable it.
  5. Check timezone and language. If the IP is in Germany but the browser reports a US timezone and English locale, sites that score sessions will notice the mismatch. Match the profile's timezone to the proxy location.

Interpreting the Results

Most failures fall into a few patterns:

SymptomLikely causeFix
407 Proxy Authentication RequiredWrong username or password, unencoded special characters, or your IP is not whitelistedRecheck credentials, URL-encode the password, add your current IP to the whitelist
Connection refusedWrong port, wrong protocol (HTTP client against a SOCKS5 port or the reverse), or the proxy is downConfirm port and protocol in your dashboard, then retest
TimeoutFirewall blocking outbound ports, an overloaded or dead IP, or a timeout set too lowTest from another network, raise the timeout to 10-15 seconds, replace the IP if it persists
Wrong countryGeolocation database lag, or the wrong location or session parameterCompare several lookup services, check targeting parameters, contact support if the country is consistently wrong
403 or captcha on target, clean IP checkTarget blocks the IP type or ASN, or your headers, fingerprint or rate look automatedMove to ISP or residential IPs, fix headers, slow down
Slow TTFB, fast time_connectThe target or the route behind the proxy is slow, not the proxy entryPick a proxy location closer to the target's servers
Slow time_connectYou are far from the proxy entry pointRun your client closer to the proxy, or choose a nearer location

Step 6: Test Against Your Real Target

An IP echo service accepts every request. Your target does not. Before buying in bulk or launching a full job:

  • Send a small sample, for example 50 to 200 requests at the rate you plan to use in production.
  • Log every status code, not only failures: count 200s, 403s, 429s, captcha pages and redirects to login or consent pages.
  • Check the content, because some sites return a 200 status with a block page or empty product data.
  • Compare proxy types on the same sample if the block rate is high. A target that blocks datacenter ranges may accept ISP or residential IPs without code changes.

If the sample passes, scale gradually and keep logging. Block rates often rise with volume, so the rate at 100 requests is a floor, not a guarantee.

Final Thoughts

Testing a proxy is quick once you have the commands: confirm it connects, verify the exit IP and network, measure timing with curl, check for leaks in the browser, and prove it on a small slice of real traffic. Most problems show up in the first two steps, and the rest show up only on your real target, so do both before you scale.

Check your setup and pick the right proxy: What Is My IP tool · residential proxies · unlimited ISP proxies · unlimited datacenter proxies

Frequently Asked Questions

How do I check if a proxy is working?

Send a request through it to an IP echo endpoint, for example curl -x http://user:pass@host:port https://api.ipify.org. If the command returns an IP address that is not your own, the proxy connects, authenticates and forwards traffic. If it returns an error such as 407 or connection refused, the error code tells you which part failed.

How do I test proxy speed?

Use curl's -w timing variables: time_connect shows how long the connection to the proxy took, time_starttransfer shows time to first byte from the target, and speed_download shows throughput in bytes per second. Run each test several times and compare medians, because a single request is easily skewed by one slow route or a cold DNS cache.

What is a proxy leak test?

A leak test checks whether anything other than the proxy IP reaches the website. The usual leaks are DNS lookups made by your own resolver, WebRTC exposing your real IP in a browser, and headers like Via or X-Forwarded-For that reveal a proxy or the original client address. A clean setup shows only the proxy IP and no proxy headers.

Why does my proxy return 407 Proxy Authentication Required?

The proxy received your request but did not accept the credentials. Common causes are a typo in the username or password, special characters that were not URL-encoded, or an IP whitelist that does not include your current address. Check the exact credential format your provider gives you and encode characters like @ or : in the password.

Can a proxy pass an IP check but still get blocked?

Yes. An IP echo service only proves the proxy works, not that a specific website trusts it. Strict targets judge the IP type, its ASN and history, plus your headers, TLS fingerprint and request rate. Always run a small test batch against the real target before scaling up.

Related Articles

Technical

HTTP vs SOCKS5 Proxies: Differences and When to Use Each

HTTP vs SOCKS5 proxies explained: how each protocol works, socks5 vs socks5h DNS, real speed differences, curl and Python examples, and when to use each one.

Technical

Proxy for Scraping Amazon: Build a Scalable Product Scraper in 2026

Which proxy works for scraping Amazon without 503 errors? A complete guide to choosing the right proxy type and building a reliable Amazon product scraper with Python.

Technical

Advanced Anti-Bot Evasion: Engineering Reliability into Web Scrapers

Beyond basic User-Agent rotation. A deep dive into TLS fingerprinting, header consistency, exponential backoff, and granular country, state and city targeting for enterprise scraping.

Proxio Logo

Products

Residential ProxiesISP UnlimitedDatacenter UnlimitedPricing

Use Cases

Web ScrapingSocial MediaSEOE-commerce

Resources

DocumentationBlogFree Proxy ToolsContact UsDashboard

Company

Terms of ServiceAffiliate ProgramHome

© 2025 Proxio. All rights reserved.