Skip to main content

Connecting

End-to-end examples of turning API data into a working proxy connection.

Steps

  1. Read connection dataGET /subscription/ gives proxy_host, proxy_port (HTTP) and proxy_port_socks5 (SOCKS5).
  2. Get credentialsGET /sub-users/ (or create one with POST /sub-users/) gives real_login and password.
  3. Pick targeting — get geo suffix values from /geo/* and session/filter suffixes from /session-options/.
  4. Build the username — append the suffixes to real_login (see Username grammar).
  5. Connect — use username:password@proxy_host:proxy_port.

Build the username

Given:

  • real_login = u12ab_worker1, password = Str0ngPass
  • proxy_host = gate.cyberyozh.net, proxy_port = 10000
  • country suffix us, 5-minute sticky session, quality filter
username = u12ab_worker1-us-s-Ab3xK9pQ-ttl-5m-filter-iqs
proxy = u12ab_worker1-us-s-Ab3xK9pQ-ttl-5m-filter-iqs:Str0ngPass@gate.cyberyozh.net:10000

cURL through the proxy

HTTP(S):

curl -x 'http://u12ab_worker1-us-s-Ab3xK9pQ-ttl-5m-filter-iqs:Str0ngPass@gate.cyberyozh.net:10000' \
https://api.ipify.org

SOCKS5 (note the SOCKS5 port from proxy_port_socks5):

curl -x 'socks5h://u12ab_worker1-us:Str0ngPass@gate.cyberyozh.net:11000' \
https://api.ipify.org

Fully rotating (a new IP per request — omit the session suffix):

curl -x 'http://u12ab_worker1-us:Str0ngPass@gate.cyberyozh.net:10000' \
https://api.ipify.org

Python (requests)

import secrets
import string
import requests

API = 'https://app.cyberyozh.com/api/v2/rotating-proxies'
HEADERS = {'X-Api-Key': 'your_api_key_here'}

# 1. Connection data
sub = requests.get(f'{API}/subscription/', headers=HEADERS).json()
host, port = sub['proxy_host'], sub['proxy_port']

# 2. Credentials (first access)
access = requests.get(f'{API}/sub-users/', headers=HEADERS).json()['results'][0]
login, password = access['real_login'], access['password']

# 3. Targeting: US, 5-minute sticky session, quality filter
country_suffix = 'us'
session_id = ''.join(secrets.choice(string.ascii_letters + string.digits) for _ in range(8))
username = f'{login}-{country_suffix}-s-{session_id}-ttl-5m-filter-iqs'

# 4. Connect
proxy = f'http://{username}:{password}@{host}:{port}'
resp = requests.get('https://api.ipify.org', proxies={'http': proxy, 'https': proxy})
print('Exit IP:', resp.text)

Keeping a sticky session

Reuse the same session_id across requests to keep the same exit IP until the TTL expires; generate a new session_id to rotate to a new IP:

def sticky_username(login: str, country_suffix: str, session_id: str, ttl: str = '10m') -> str:
return f'{login}-{country_suffix}-s-{session_id}-ttl-{ttl}'

Notes

  • Always read proxy_host/ports from GET /subscription/ rather than hard-coding — they may differ per subscription.
  • Geo suffix values are provider-defined; fetch them from the geo endpoints.
  • For IP authentication instead of username/password, add your client IP via the whitelist.