Quick answer
How do I test a US city proxy with curl?
Pass the proxy with -x: curl -x http://USERNAME-country-us-state-oh-city-cleveland:[email protected]:7777 https://ipinfo.io/json prints the exit IP and the city a lookup service sees. MetroProxies includes city, state, ZIP and ASN targeting on every plan from $0.50/GB (October 2026), and the same username works on the SOCKS5 port. No KYC; crypto.
# city
curl -s --max-time 30 -x http://USERNAME-country-us-state-oh-city-cleveland:[email protected]:7777 https://ipinfo.io/json
# ZIP inside the city (downtown Cleveland)
curl -s --max-time 30 -x http://USERNAME-country-us-state-oh-city-cleveland-zip-44114:[email protected]:7777 https://ipinfo.io/json
# one provider's network (AS20115, Spectrum)
curl -s --max-time 30 -x http://USERNAME-country-us-state-oh-city-cleveland-asn-20115:[email protected]:7777 https://ipinfo.io/json
# sticky: run twice, same IP for up to 10 minutes
curl -s --max-time 30 -x http://USERNAME-country-us-state-oh-city-cleveland-session-cle01-ttl-10:[email protected]:7777 https://api.ipify.org
# SOCKS5 (hostname resolved by the proxy)
curl -s --max-time 30 --socks5-hostname gw.metroproxies.com:7778 -U USERNAME-country-us-state-oh-city-cleveland:PASSWORD https://ipinfo.io/jsonHow do I measure how much traffic a page uses?
Before you buy volume, measure one real target page through the proxy and multiply by the number of pages and cities. curl prints the size of what it downloaded; add --compressed so you measure what a browser would transfer, and remember that a browser also loads images and scripts the HTML points to.
curl -s -o /dev/null --compressed --max-time 60 \
-x http://USERNAME-country-us-state-oh-city-cleveland:[email protected]:7777 \
-w 'downloaded %{size_download} bytes, headers %{size_header} bytes, time %{time_total}s\n' \
https://YOUR-SITE.example/What do the common curl errors mean?
407 Proxy Authentication Required: wrong username or password, or a special character in the password that needs URL-encoding (@→%40).- Timeout (exit code 28): no answer within
--max-time; retry, or widen from ZIP to city or from city to state. Could not resolve proxy: check the gateway host spelling:gw.metroproxies.com.- Works in curl, not in your app: your app may keep connections open (same IP) or ignore the proxy for some hosts; compare with the Python or Node.js examples.
Usage counts all data sent and received through the proxy (upload and download, headers included). 1 GB = 1,000,000,000 bytes. Connection attempts that fail before reaching the target are not counted.
What else do people ask about curl?
Why --socks5-hostname instead of --socks5?
With --socks5-hostname the proxy resolves the target's hostname, not your machine. Both work with the same username on port 7778.
How do I get a new IP each time?
Each curl run opens a new connection, so in rotating mode each run usually gets a different IP. Add a session ID only when you want to keep one.
Is downtown Cleveland really ZIP 44114?
44114 covers much of downtown Cleveland and the lakefront. Use the ZIP areas listed on the Cleveland page for other parts of the city.