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.
Endpoints
| Protocol | Host | Port |
|---|---|---|
| HTTP / HTTPS (CONNECT) | proxy.oneforproxy.com | 8080 |
| SOCKS5 | proxy.oneforproxy.com | 1080 |
Both ports accept the same login/password. Use socks5h:// so hostnames resolve through the proxy.
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.orgUsername 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 |
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. |
/balance Programmatic balance check. Create an API key under API keys and send it in the X-API-KEY header — never in the URL.
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.