Four curl commands that tell you whether a proxy works, where its IP is, how fast it is and what an error really means.
Before you blame a tool, an anti-detect browser or a script, check the proxy on its own. curl is installed on macOS, Linux and Windows 10 and later, and a few commands answer almost every question.
1. Does it work, and which IP do I get?
curl -x http://user:pass@host:port https://api.ipify.org
You should see an IP address that is not your own. Run it a few times on a rotating line and the IP should change.
2. Where is the IP?
curl -x http://user:pass@host:port https://ipinfo.io/json
This shows the country, region, city and the network (ASN) of the exit IP. Different geolocation databases sometimes disagree at city level, so treat the city as approximate.
3. SOCKS5
curl -x socks5h://user:pass@host:port https://ipinfo.io/json
Use socks5h so DNS is resolved by the proxy, not by your machine.
4. How fast is it?
curl -x http://user:pass@host:port -o /dev/null -s \
-w "connect %{time_connect}s tls %{time_appconnect}s first byte %{time_starttransfer}s total %{time_total}s\n" \
https://example.com
Run it 5 to 10 times and look at the typical value, not the best one. On Windows, replace /dev/null with NUL and the backslashes with one long line.
Reading the errors
- 407 Proxy Authentication Required, or "CONNECT tunnel failed, response 407": wrong username or password, an incomplete username, or your IP is not whitelisted.
- Could not resolve proxy: typo in the host name, or a special character in the password broke the URL. Encode
@as%40and:as%3A. - Failed to connect / connection refused: wrong port, or a firewall on your side blocks outgoing connections to it.
- 502 or 503 from the proxy: the gateway could not reach an exit IP for your targeting. Try a broader target (country instead of city) or retry.
- Timeout: add
--max-time 30, retry, and try a different gateway region. - 403 or a CAPTCHA page from the site: the proxy works; the website is blocking the request. Change IP type, slow down, or fix your headers and fingerprint.
Add -v when in doubt
curl -v prints every step: the connection to the proxy, the CONNECT request, the proxy's answer and the TLS handshake. It shows exactly where things stop. Remove the output before you share it, because it contains your proxy login.
More guides
Also in: Français · العربية · Tiếng Việt · 中文 · Українська