-
Check your cURL version
Any recent build supports HTTP and SOCKS5 proxies. In Windows PowerShell 5.1, type
curl.exeinstead ofcurl, becausecurlon its own is an alias forInvoke-WebRequestthere.Shell curl --version -
Send a request through the gateway
Pass the gateway with
-xand your credentials with-U. The response from api.ipify.org is the exit IP the target sees, which should not be your own address.Shell curl -x http://gw.proxonym.com:8000 -U "USERNAME:PASSWORD" https://api.ipify.org -
Target a country, state, city or ASN
Append parameters to the username with dashes: lowercase ISO country codes, underscores for spaces in place names, and either a state or a city, not both. ipinfo.io shows where the exit IP is located.
Shell # Any IP in Germany curl -x http://gw.proxonym.com:8000 -U "USERNAME-country-de:PASSWORD" https://ipinfo.io/json # New York City, United States curl -x http://gw.proxonym.com:8000 -U "USERNAME-country-us-city-new_york:PASSWORD" https://ipinfo.io/json # The state of California curl -x http://gw.proxonym.com:8000 -U "USERNAME-country-us-state-california:PASSWORD" https://ipinfo.io/json # The Comcast network (ASN 7922) curl -x http://gw.proxonym.com:8000 -U "USERNAME-country-us-asn-7922:PASSWORD" https://ipinfo.io/json -
Rotate or keep the same IP
Without a session parameter, every new connection gets a new IP, and each cURL run opens a new connection. Add
-session-with an ID of 1 to 32 letters and digits to keep one IP, and-lifetime-to hold it for 1 to 120 minutes (10 by default).Shell # Rotating: a new IP on every run for i in 1 2 3; do curl -s -x http://gw.proxonym.com:8000 -U "USERNAME-country-us:PASSWORD" https://api.ipify.org; echo done # Sticky: the same IP for up to 30 minutes for i in 1 2 3; do curl -s -x http://gw.proxonym.com:8000 -U "USERNAME-country-us-session-a7k2-lifetime-30:PASSWORD" https://api.ipify.org; echo done -
Switch to SOCKS5
Use port 1080 with the
socks5h://scheme. The trailing h tells cURL to let the proxy resolve hostnames, so DNS lookups do not leave your machine. Username parameters work exactly as they do on HTTP.Shell curl -x socks5h://gw.proxonym.com:1080 -U "USERNAME-country-gb:PASSWORD" https://api.ipify.org -
Read gateway errors and retry
For HTTPS targets the gateway answers the CONNECT request, so print
%{http_connect}to see its status next to the target status. 407 means wrong credentials, 402 an empty balance or expired plan and 403 a blocked target; 429, 502 and 504 are worth a retry (--retry-all-errorsneeds cURL 7.71 or newer).Shell # Show the gateway status and the target status side by side curl -s -o /dev/null -w "gateway=%{http_connect} target=%{http_code}\n" \ -x http://gw.proxonym.com:8000 -U "USERNAME:PASSWORD" https://example.com # Retry transient failures up to 3 times curl --retry 3 --retry-all-errors --max-time 70 \ -x http://gw.proxonym.com:8000 -U "USERNAME:PASSWORD" https://example.com
Frequently asked questions
Why does cURL report a 407 from the gateway?
The gateway did not accept the credentials. Copy the username and password again from the dashboard, check that parameters are joined with dashes (USERNAME-country-us), and wrap the -U value in quotes so the shell leaves special characters alone. Running the same command with -v shows the CONNECT request and the exact status the gateway returned.
Should I use HTTP or SOCKS5 with cURL?
Both reach the same IP pool and accept the same username parameters. HTTP on port 8000 tunnels HTTPS through CONNECT and works with almost every tool. SOCKS5 on port 1080 suits non-HTTP clients and, with the socks5h:// scheme, keeps DNS resolution on the proxy side. For ordinary web requests, HTTP is the simpler default.
How do I get a new IP on every cURL request?
Leave the session parameter out of the username. The gateway assigns a new IP to each new connection, and every cURL run opens one. If a single command fetches several URLs from the same host, cURL can reuse the connection and therefore the IP, so run one command per request when each request needs a fresh address.
How can I confirm the location of my exit IP?
Send a request to a geolocation endpoint such as https://ipinfo.io/json through the proxy. It returns the IP along with the city, region, country and network that sites are likely to see. Geolocation databases sometimes disagree, so check accuracy at the country or state level first and compare a few lookups before reporting a mismatch.
