Once you have copied an IP:port and protocol from the live list, the most repeatable way to use it is in curl or in a short Python script. This guide focuses on those two clients, using the same protocol meanings as the rest of the site. For browser and OS dialogs, see how to use a proxy. For a first manual check, see how to test a proxy with curl.
Replace IP and PORT with a single address. Do not loop over the HTML page — ProxyChk does not provide a bulk download or API, and hammering public exits is a good way to get blocked and a bad way to treat other people’s machines. Read the risks before you send anything that is not a throwaway request.
curl: HTTP and HTTPS rows
HTTP and HTTPS rows on this site are both HTTP-style proxies. The proxy URL scheme is http://, even when the column says HTTPS.
# HTTP destination through an HTTP proxy
curl -sS -m 20 -x http://IP:PORT http://example.com/
# HTTPS destination (CONNECT) through the same kind of proxy
curl -sS -m 20 -x http://IP:PORT https://example.com/
Equivalent long option: --proxy http://IP:PORT.
Useful extras:
-m 20or--max-time 20— public exits hang; always set a timeout.-v— show the CONNECT exchange.-I— fetch headers only, when the destination allows it.--connect-timeout 10— cap the TCP connect separately from the whole transfer.
Environment variables, if you want a whole shell session to go through one HTTP proxy:
export http_proxy=http://IP:PORT
export https_proxy=http://IP:PORT
export no_proxy=localhost,127.0.0.1
curl -sS -m 20 https://ifconfig.me
https_proxy still points at http://IP:PORT. That is intentional: curl will use CONNECT for HTTPS sites. Unset the variables when you are done (unset http_proxy https_proxy).
curl: SOCKS rows
# SOCKS5, remote DNS (preferred)
curl -sS -m 20 -x socks5h://IP:PORT https://ifconfig.me
# SOCKS5, local DNS
curl -sS -m 20 -x socks5://IP:PORT https://ifconfig.me
# SOCKS4 (IPv4, local DNS)
curl -sS -m 20 -x socks4://IP:PORT https://ifconfig.me
# SOCKS4a (hostname sent to the proxy)
curl -sS -m 20 -x socks4a://IP:PORT https://ifconfig.me
Flags --socks5-hostname, --socks5, --socks4 and --socks4a do the same thing. Match the variant to the column on the list. For a session-wide default, export ALL_PROXY=socks5h://IP:PORT is the usual pattern.
Python: requests with HTTP or CONNECT
The standard pattern is a proxies dict. The keys are destination schemes; the values are the proxy URL:
import requests
proxies = {
"http": "http://IP:PORT",
"https": "http://IP:PORT",
}
r = requests.get(
"https://ifconfig.me",
proxies=proxies,
timeout=20,
)
print(r.text)
Again, both values use http:// as the proxy scheme. requests will issue CONNECT for the https:// destination.
You can also set HTTP_PROXY and HTTPS_PROXY in the environment; requests honours them unless you pass proxies={} to disable. That is a frequent source of confusion in CI machines.
Always pass timeout. Without it, a dead exit can stall a worker forever.
Python: SOCKS with requests
SOCKS support is not in the core requests wheel. Install a SOCKS extra, typically:
pip install "requests[socks]"
That pulls in PySocks. Then:
import requests
proxies = {
"http": "socks5h://IP:PORT",
"https": "socks5h://IP:PORT",
}
r = requests.get("https://ifconfig.me", proxies=proxies, timeout=20)
print(r.text)
Use socks5h:// for remote DNS, socks5:// for local DNS, socks4:// for a SOCKS4 row, and socks4a:// when you want SOCKS4a. If you see Missing dependencies for SOCKS support, the extra is not installed in that interpreter.
Alternatively, httpx with a SOCKS transport, or using curl from a subprocess, can be simpler in some deployments. The protocol label on the list still has to match.
Timeouts, retries and identity
Public-list exits are unstable. A reasonable script:
- uses a 10–20 second timeout;
- does not retry the same dead address indefinitely;
- does not disable TLS verification;
- sends a clear User-Agent if you control the client (our checker uses a ProxyChk UA; your script should identify your project, not impersonate a random browser unless you are specifically testing one);
- copies a fresh address from the website when yesterday’s row is gone.
If you need many countries, open the country index and pick live rows by hand for the countries you actually need. Do not scrape the pages for automation. The anonymity column is worth consulting if your destination seeing your real IP would be a problem, remembering that HTTPS and SOCKS elite labels are often a consequence of the tunnel.
Common errors
- `ProxyError` / `Unable to connect to proxy`. The IP:port is dead from your network. Choose another row.
- `CONNECT tunnel failed, response 403` (or 405, 502). Not a CONNECT-capable HTTP proxy. Use an HTTPS or SOCKS row.
- `SSLError`. Path or interception problem. Do not flip
verify=Falseto “fix” it for a real site. - `socks` import errors. Install
requests[socks]. - Still seeing your home IP. The request bypassed the proxy (wrong dict key, environment override, or a destination in
no_proxy). Printr’s request environment or test with curl-vfirst.
Example that fails closed if the exit is not the one you expect is hard to write correctly, because some proxies present a pool IP different from the listed address. Checking that the response is not your known home IP is often the practical test.