Connecting
End-to-end examples of turning API data into a working proxy connection.
Steps
- Read connection data —
GET /subscription/givesproxy_host,proxy_port(HTTP) andproxy_port_socks5(SOCKS5). - Get credentials —
GET /sub-users/(or create one withPOST /sub-users/) givesreal_loginandpassword. - Pick targeting — get geo
suffixvalues from/geo/*and session/filter suffixes from/session-options/. - Build the username — append the suffixes to
real_login(see Username grammar). - Connect — use
username:password@proxy_host:proxy_port.
Build the username
Given:
real_login = u12ab_worker1,password = Str0ngPassproxy_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 fromGET /subscription/rather than hard-coding — they may differ per subscription. - Geo
suffixvalues are provider-defined; fetch them from the geo endpoints. - For IP authentication instead of username/password, add your client IP via the whitelist.