Documentation
Connect to the gateway, choose a location and a session in the username, and manage keys over the API.
Quick start
You need a proxy username and password from the dashboard. Every connection goes to one gateway:
host: gw.proxy4u.net
port: 8000
username: customer01-country-us
password: PASSWORDSend a request through it. The response is the exit IP that websites see:
curl -x http://gw.proxy4u.net:8000 \
-U "customer01-country-us:PASSWORD" \
https://edge.proxy4u.netUsername parameters
Add parameters to your username, separated by hyphens. Parameter names are not case-sensitive and can come in any order.
customer01-country-us-city-newyork-session-x8k2-ttl-30country-<cc>Country code, ISO 3166-1 alpha-2.
Example:
country-us, country-gbcity-<name>City name in lowercase, without spaces or accents.
Example:
city-newyork, city-londonsession-<id>Session ID, 1–32 characters from a–z and 0–9. Keeps the same IP.
Example:
session-x8k2ttl-<minutes>Session lifetime in minutes, 1–60. Default 10.
Example:
ttl-30
Unknown or invalid parameters are rejected with status 407 and a clear error code.
Rotating and sticky sessions
- Rotating: without
session, each new connection may use a different device and IP. - Sticky: with
session-<id>, connections with the same ID use the same device untilttlminutes have passed or the device goes offline. Then you get a new IP. - Use a new session ID whenever you want a fresh IP right away.
HTTP and HTTPS
HTTPS goes through an HTTP CONNECT tunnel, so the gateway only sees the target host and encrypted bytes. Plain HTTP URLs are forwarded as absolute-URI requests.
curl -x http://gw.proxy4u.net:8000 \
-U "customer01-country-us:PASSWORD" \
https://edge.proxy4u.netcurl -x http://gw.proxy4u.net:8000 \
-U "customer01-country-us-city-newyork-session-x8k2-ttl-30:PASSWORD" \
https://edge.proxy4u.netSOCKS5
SOCKS5 uses the same host, port and username format, with username and password authentication (RFC 1929). Use socks5h so the hostname is resolved by the exit device and DNS answers match the location.
curl -x socks5h://gw.proxy4u.net:8000 \
-U "customer01-country-us-city-losangeles-session-a1b2:PASSWORD" \
https://edge.proxy4u.netIP allowlist and dedicated ports
- IP allowlist: add your server IPs in the dashboard. Requests from those IPs do not need a password.
- Dedicated ports: a key can get its own gateway port between 10000 and 60000, for tools that cannot send a username.
Error codes
HTTP and SOCKS5 use the same codes. HTTP clients receive the status below; SOCKS5 clients receive the closest standard reply, and the original code is logged.
407auth_failedWrong username or password, IP not on the allowlist, or invalid username parameters.
What to do: Check the credentials and parameters.
402quota_exhaustedBalance, GB quota or daily cap is used up.
What to do: Top up, or wait for the next day on a daily key.
402bundle_exhaustedYour GB bundle is used up; it does not fall back to your balance.
What to do: Buy another GB bundle to continue.
429too_many_connectionsToo many simultaneous connections for this user or key.
What to do: Lower the concurrency or ask for a higher limit.
403target_blockedThe destination is blocked by policy, for example a mail port or a private network.
What to do: See the acceptable use policy.
502no_device_availableNo device is online for this location right now.
What to do: Retry, or target the country instead of the city.
504upstream_unreachableThe device could not reach the destination in time.
What to do: Retry. The next attempt may use another device.
Limits and blocked destinations
- Outgoing mail ports 25, 465, 587 are always blocked.
- Private, local and reserved IP ranges are blocked on the device after the DNS lookup.
- Some categories, such as government and banking sites, are blocked by default and can be opened after verification.
- Each user or key has a limit on simultaneous connections. On shared plans at most 4 customers use one exit IP at the same time.
API (key-based)
Draft API
The API is for buyers who prefer keys over per-GB credentials, and for resellers. Authenticate with an API key from the dashboard, sent as a Bearer token. Times are Unix epoch seconds, and error codes are fixed English strings.
Base URL: https://api.proxy4u.net
GET /v1/locationsCountries, cities and providers with devices online, with counts.
POST /v1/keysBuy keys: plan, period, quantity and location. Send an
Idempotency-Keyheader so a retried request is never charged twice.GET /v1/keys?customer=List one customer's keys (for resellers).
GET /v1/proxy/current?key=The proxy a key is using now: exit IP, HTTP and SOCKS5 strings, seconds left, seconds until you may rotate, and key expiry. Issues a new IP automatically when the old one has expired.
GET /v1/proxy/new?key=&city=&isp=Get a new IP, within the plan's rotation interval. Optional city and provider filters.
POST /v1/keys/{key}/renewExtend a key.
GET /v1/usageTraffic and IP rotations per day.
curl -H "Authorization: Bearer $API_KEY" \
"https://api.proxy4u.net/v1/proxy/current?key=KEY"{
"ip": "203.0.113.45",
"http": "gw.proxy4u.net:10001:k7f3a:PASSWORD",
"socks5": "gw.proxy4u.net:10001:k7f3a:PASSWORD",
"expires_in": 1260,
"rotate_in": 45,
"key_expires_at": 1767225600
}Field names are illustrative until the OpenAPI specification is published.