Before you start
Nefo offers residential proxies across 227 countries over HTTP, HTTPS, and SOCKS5 with username/password auth. Generate credentials for free in the dashboard proxy generator; only routed traffic consumes your prepaid bandwidth (from 5 GB for $4.50, non-expiring on flexible plans).
cURL is the fastest way to verify a credential and country before wiring it into an application.
- curl installed (7.21.7+ for socks5h support)
- A Nefo account with prepaid bandwidth
- A username/password from /dashboard/generator
- Your target country token
- A test endpoint such as https://api.ipify.org
cURL proxy command: HTTP and SOCKS5
Rotating HTTP: This returns a fresh US residential IP.
SOCKS5: The socks5h scheme resolves DNS through the proxy. Change the country token in the username to target any of 227 countries.
# Rotating HTTP
curl -x http://USERNAME-country-us:[email protected]:9000 https://api.ipify.org
# SOCKS5
curl --proxy socks5h://USERNAME-country-us:[email protected]:11000 https://api.ipify.orgcURL rotating vs sticky proxy sessions
Rotating sessions rotate the exit IP each request: HTTP port 9000 or SOCKS5 port 11000. Run a request a few times and you should see different IPs.
Sticky sessions hold one IP from 1 minute up to 24 hours: HTTP port 10000 or SOCKS5 port 12000. Use a token like USERNAME-country-us-session-test1-lifetime-10 to confirm the same IP is returned across repeated calls within the lifetime.
Geo-targeting with the cURL proxy username
Targeting lives in the username token: country across 227 countries, US state and city, or ASN/ISP within a country. Only the username changes, so one command template covers every region.
Use the proxy lawfully, respect the target site's terms of service, and stay within applicable law and reasonable request rates.
Frequently asked questions
Pass the -x flag with the gateway URL, for example -x http://USERNAME-country-us:[email protected]:9000, then the target URL. The username and password in the URL are your Nefo credentials from the proxy generator.
Request a service such as https://api.ipify.org through the proxy. The IP it returns is your current residential exit. If you see the wrong country, check that the username carries the right token, such as USERNAME-country-jp.
With socks5h the proxy resolves DNS, so lookups stay on the residential exit. With plain socks5 cURL resolves DNS locally. Use socks5h with port 11000 (rotating) or 12000 (sticky). It needs cURL 7.21.7 or newer.
Use port 10000 or 12000 and a session token, for example USERNAME-country-us-session-test1-lifetime-10, then repeat the request. The same IP should come back for the length of the lifetime. See sticky session proxies.
Yes. Set the country token in the username, such as USERNAME-country-jp. State, city and ASN targeting use further tokens in the same username, so one command template covers every region.
Only the bytes transferred are billed against your prepaid balance, so a small test request uses very little. Generating credentials is free. The docs list the full connection reference.