Proxy documentation
Connect to the OneForProxy gateway with any HTTP or SOCKS5 client. Your proxy login and password come from the dashboard; targeting options are appended to the login.
Looking for step-by-step guides? See the Knowledge base.
Endpoints
| Protocol | Host | Port |
|---|---|---|
| HTTP (CONNECT) | proxy.oneforproxy.com | 8080 |
| SOCKS5 | proxy.oneforproxy.com | 1080 |
| HTTPS (TLS) | proxy.oneforproxy.com | 8443 |
Use socks5h:// so hostnames resolve through the proxy. The HTTPS port terminates TLS at the gateway with a trusted certificate — no --proxy-cacert or -k needed, and it works from networks that block plain HTTP CONNECT.
curl -x "https://ofp_0123abcd-country-de:$PASS@proxy.oneforproxy.com:8443" https://api.ipify.org
Authentication
Create a credential under Proxies. The login looks like ofp_0123abcd; the password is generated for you and can be rotated at any time. Wrong credentials return 407 Proxy Authentication Required.
Proxy-Authorization: Basic base64("ofp_0123abcd-country-de:<password>")
# curl does this for you:
curl -x "http://ofp_0123abcd-country-de:$PASS@proxy.oneforproxy.com:8080" https://api.ipify.orgIP whitelist authentication
For servers with a static IP you can skip the username/password entirely: whitelist the IP under Proxies and connect with no Proxy-Authorization header (HTTP) or the no-auth method (SOCKS5). Each IP maps to one credential and one fixed set of targeting options (country/state/city/ASN/session/life) — for varied targeting from the same machine, use a regular credential instead. Up to 10 IPs per account; anyone sharing that IP (same office NAT) can use the proxy too, so only whitelist IPs you control.
# HTTP — no Proxy-Authorization header at all, source IP is looked up instead curl -x "http://proxy.oneforproxy.com:8080" https://api.ipify.org # SOCKS5 — client offers only the no-auth (0x00) method curl --socks5-hostname proxy.oneforproxy.com:1080 https://api.ipify.org
Username options
Targeting is encoded in the username as -key-value pairs, in this order. Values are lowercase; use _ instead of spaces.
<login>[-country-<cc>][-state-<x>][-city-<x>][-asn-<n>][-session-<id>][-life-<minutes>]
| Key | Value | Example |
|---|---|---|
| country | ISO-3166 alpha-2 country code | ofp_0123abcd-country-de |
| state | State / region, letters, digits and _ (max 32) | ofp_0123abcd-country-us-state-california |
| city | City, letters, digits and _ (max 32) | ofp_0123abcd-country-us-city-new_york |
| asn | Carrier ASN number | ofp_0123abcd-country-de-asn-3209 |
| session | Sticky session id, letters and digits (max 32) | ofp_0123abcd-session-abc123 |
| life | Sticky session lifetime in minutes (1–1440) | ofp_0123abcd-session-abc123-life-30 |
Targeting lists
The dashboard offers searchable country, state/region, city and carrier (ASN) dropdowns so you don’t have to guess how a place is spelled. The same lists are available as plain JSON — no authentication, no API key — if you want to build the selection into your own tooling. Codes are lowercase ASCII with no separators (california, losangeles, 3209), exactly as the username options expect them.
| Endpoint | Query | Items |
|---|---|---|
| /api/v1/public/geo/countries | — | { code, name } |
| /api/v1/public/geo/states | country | { code, name } |
| /api/v1/public/geo/cities | country, state? | { code, name, state } |
| /api/v1/public/geo/asns | country | { asn, name } |
curl "https://oneforproxy.com/api/v1/public/geo/cities?country=us&state=california"
# 200
{ "version": "7a01eb7d3395", "country": "us", "state": "california",
"items": [ { "code": "losangeles", "name": "Los Angeles", "state": "california" }, … ] }
# → username: ofp_0123abcd-country-us-state-california-city-losangeles Every response carries a version field for the list snapshot and may be cached for an hour (ETag and If-None-Match are supported). A country with no entry returns an empty items array, and a missing or malformed country parameter returns 422.
The lists are a suggestion layer, not a restriction: a value that is not in them can still be used in the username or on a whitelisted IP. Availability varies by location — if a city has no IPs available right now, the connection fails with 502, so test narrow targets with the Test button on the Proxies page before a large job.
Examples
curl — HTTP proxy, rotating German IP
curl -x "http://ofp_0123abcd-country-de:$PASS@proxy.oneforproxy.com:8080" https://api.ipify.org
curl — SOCKS5 (remote DNS)
curl -x "socks5h://ofp_0123abcd-country-de:$PASS@proxy.oneforproxy.com:1080" https://api.ipify.org
Python — requests
import requests
proxy = "http://ofp_0123abcd-country-us-city-new_york:PASS@proxy.oneforproxy.com:8080"
r = requests.get("https://api.ipify.org?format=json",
proxies={"http": proxy, "https": proxy}, timeout=30)
print(r.json())Node.js — undici ProxyAgent
import { ProxyAgent, fetch } from "undici";
const dispatcher = new ProxyAgent("http://ofp_0123abcd-country-de:PASS@proxy.oneforproxy.com:8080");
const res = await fetch("https://api.ipify.org", { dispatcher });
console.log(await res.text());Sticky sessions
Add -session-<id> to pin an IP: every request with the same id reuses the same exit IP. -life-<minutes> (1–1440) sets how long the pin lasts. Use a different id per thread to get parallel sticky IPs.
# same IP for 10 minutes under session id "job42" curl -x "http://ofp_0123abcd-country-us-session-job42-life-10:$PASS@proxy.oneforproxy.com:8080" https://api.ipify.org curl -x "http://ofp_0123abcd-country-us-session-job42-life-10:$PASS@proxy.oneforproxy.com:8080" https://api.ipify.org # → same IP
Errors
| HTTP | SOCKS5 reply | Meaning |
|---|---|---|
| 407 | 0x01 (auth failed) | Unknown login, wrong password, paused credential or invalid username option. |
| 402 | 0x02 | Allowance exhausted — no quota and no USD balance. Top up or buy a traffic package. |
| 429 | 0x02 | Too many concurrent connections for your account. Close idle connections or lower concurrency. |
| 502 | 0x01 | Upstream network rejected the connection (e.g. unsupported target). Retry or change targeting. |
| 503 | 0x02 (maintenance) / auth status 0x01 (backend unavailable) | Gateway in maintenance or temporarily unavailable — try again shortly. |
| 504 | 0x04 | Upstream timeout while connecting to the target. |
Management API
Everything the dashboard can do — credentials, IP whitelist, usage, wallet and monthly plans — is also available programmatically. Create a key under API keys and send it in the X-API-KEY header (never in the URL or a query string).
| Base URL | https://oneforproxy.com/api/v1 |
| Authentication | X-API-KEY: <your key> — full account access, no scopes |
| Rate limit | 120 requests per minute per account; over that, 429 with Retry-After: 60 |
| CSRF | Not needed with an API key (it applies to browser sessions only) |
| Reference | /api/docs (Swagger UI) · /api/openapi.json |
What is exposed
| Group | Endpoints |
|---|---|
| Proxies | GET/POST /proxies · GET/PATCH/DELETE /proxies/{id} · POST /proxies/{id}/test · GET /proxies/endpoints |
| IP whitelist | GET/POST /proxies/ip-auth · DELETE /proxies/ip-auth/{id} |
| Usage | GET /usage/summary · /usage/records · /usage/stats · /usage/targets · GET/PUT /usage/alerts · /usage/records.csv · /usage/daily.csv |
| Wallet | GET /wallet/balance · GET /wallet/transactions · GET /wallet/transactions.csv |
| Subscriptions | GET /subscriptions/plans · GET /subscriptions/me · POST /subscriptions · POST /subscriptions/cancel · POST /subscriptions/resume |
| Traffic packages | GET /traffic-packages · POST /traffic-packages/{id}/purchase |
| Account | GET /dashboard/summary |
Examples
Create a proxy credential
curl -X POST "https://oneforproxy.com/api/v1/proxies" \
-H "X-API-KEY: $KEY" -H "Content-Type: application/json" \
-d '{"label": "scraper-01"}'
# 201
{ "id": 12, "login": "ofp_0123abcd", "password": "…", "label": "scraper-01", "active": true }Check usage and what is left
curl -H "X-API-KEY: $KEY" "https://oneforproxy.com/api/v1/usage/summary"
# 200 (abridged)
{ "today": { "bytes_total": 1073741824, "bytes_from_plan": 1073741824, "amount_usd": 0.0 },
"quota_bytes_remaining": 5368709120,
"plan_bytes_remaining": 45097156608,
"plan_period_end": "2026-10-16T10:00:00Z",
"price_per_gb": 3.0 }Download settlement records as CSV
curl -H "X-API-KEY: $KEY" -o usage.csv \ "https://oneforproxy.com/api/v1/usage/records.csv?since=2026-09-01T00:00:00Z&until=2026-09-16T00:00:00Z" # CSV, UTF-8 with BOM. Up to 50,000 rows; a truncated export sets X-Truncated: 1.
Errors use standard status codes: 401 invalid or revoked key, 402 no allowance left, 404 unknown id, 409 conflict (e.g. you already have a plan), 422 validation, 429 rate limited. Step-by-step walkthrough and a Python example: Management API.
/balanceDeprecated — kept working for existing integrations; new code should use GET /api/v1/wallet/balance, which returns the same balance plus the remaining plan and package allowance. Both accept the same X-API-KEY header.
curl -H "X-API-KEY: $KEY" "https://oneforproxy.com/balance"
# 200
{ "balance": 42.5, "currency": "USD", "quota_bytes_remaining": 5368709120, "price_per_gb": 3.0 }Dashboard API
Credentials, usage, traffic packages, wallet and billing endpoints live under /api/v1/* and are authenticated with the session cookie plus a CSRF token.
Interactive API reference: /api/docs
Targeting lists are built from open data: place names and regions from GeoNames (licensed under CC BY 4.0), carrier names from the public iptoasn.com dataset.