Docs

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

ProtocolHostPort
HTTP (CONNECT)proxy.oneforproxy.com8080
SOCKS5proxy.oneforproxy.com1080
HTTPS (TLS)proxy.oneforproxy.com8443

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.org

IP 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>]
KeyValueExample
countryISO-3166 alpha-2 country codeofp_0123abcd-country-de
stateState / region, letters, digits and _ (max 32)ofp_0123abcd-country-us-state-california
cityCity, letters, digits and _ (max 32)ofp_0123abcd-country-us-city-new_york
asnCarrier ASN numberofp_0123abcd-country-de-asn-3209
sessionSticky session id, letters and digits (max 32)ofp_0123abcd-session-abc123
lifeSticky 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.

EndpointQueryItems
/api/v1/public/geo/countries—{ code, name }
/api/v1/public/geo/statescountry{ code, name }
/api/v1/public/geo/citiescountry, state?{ code, name, state }
/api/v1/public/geo/asnscountry{ 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

HTTPSOCKS5 replyMeaning
4070x01 (auth failed)Unknown login, wrong password, paused credential or invalid username option.
4020x02Allowance exhausted — no quota and no USD balance. Top up or buy a traffic package.
4290x02Too many concurrent connections for your account. Close idle connections or lower concurrency.
5020x01Upstream network rejected the connection (e.g. unsupported target). Retry or change targeting.
5030x02 (maintenance) / auth status 0x01 (backend unavailable)Gateway in maintenance or temporarily unavailable — try again shortly.
5040x04Upstream 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 URLhttps://oneforproxy.com/api/v1
AuthenticationX-API-KEY: <your key> — full account access, no scopes
Rate limit120 requests per minute per account; over that, 429 with Retry-After: 60
CSRFNot needed with an API key (it applies to browser sessions only)
Reference/api/docs (Swagger UI) · /api/openapi.json

What is exposed

GroupEndpoints
ProxiesGET/POST /proxies · GET/PATCH/DELETE /proxies/{id} · POST /proxies/{id}/test · GET /proxies/endpoints
IP whitelistGET/POST /proxies/ip-auth · DELETE /proxies/ip-auth/{id}
UsageGET /usage/summary · /usage/records · /usage/stats · /usage/targets · GET/PUT /usage/alerts · /usage/records.csv · /usage/daily.csv
WalletGET /wallet/balance · GET /wallet/transactions · GET /wallet/transactions.csv
SubscriptionsGET /subscriptions/plans · GET /subscriptions/me · POST /subscriptions · POST /subscriptions/cancel · POST /subscriptions/resume
Traffic packagesGET /traffic-packages · POST /traffic-packages/{id}/purchase
AccountGET /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.

GET/balance

Deprecated — 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.