Proxy setup and measurement tools

Proxy Username Builder: Sessions and Rotation

Build an account proxy username and see what each routing option changes. Choose from current country and network options, then copy a URL or use the connection examples.

Open the tool ↓By Proxies.sx Team. Reviewed .
Proxy Username Builder: Sessions and Rotation. Proxies.sx logo and proxies.sx address on a dark background.
In this tool

Build your proxy connection

The default preview uses a fictional account. An active account, its proxy password and available traffic are required when you run a request. The customer dashboard remains the place to manage billing and reservations.

Local proxy tool

This builds account proxy usernames. Use the base username and separate proxy password from your dashboard. The example account is fictional. Country and pool are sent to the public options API; credentials stay in this tab.

Country routes checked 2026-10-15T14:32:42.950Z. Counts represent eligible routes, not unique IPs or reserved ports.

IP class, state preference and session lifetime

The URL percent-encodes credentials. Copy the separate username/password fields into applications that ask for them separately. Generating a string does not reserve an endpoint.

curl and Python examples

Set these environment variables in your local shell. Enter the proxy password at the hidden prompt and press Enter. The examples make a paid-traffic request when you run them with an active account.

export PROXY_USERNAME='psx_example-mbl-any-sid-job1'
export PROXY_SERVER='http://gw.proxies.sx:7000'
# Read your proxy password without echoing it (bash/zsh).
read -rs PROXY_PASSWORD
export PROXY_PASSWORD

curl

curl --proxy "$PROXY_SERVER" \
  --proxy-user "$PROXY_USERNAME:$PROXY_PASSWORD" \
  --noproxy '' --connect-timeout 5 --max-time 15 \
  'https://api.ipify.org?format=json'

Python Requests

# Install requests[socks] when using SOCKS5.
import os
from urllib.parse import quote, urlsplit
import requests

server = urlsplit(os.environ['PROXY_SERVER'])
user = quote(os.environ['PROXY_USERNAME'], safe='')
password = quote(os.environ['PROXY_PASSWORD'], safe='')
proxy = f'{server.scheme}://{user}:{password}@{server.netloc}'
with requests.Session() as session:
    session.trust_env = False
    response = session.get(
        'https://api.ipify.org?format=json',
        proxies={'http': proxy, 'https': proxy}, timeout=15
    )
    response.raise_for_status()
    print(response.json())

For SOCKS, socks5h asks the proxy to resolve the destination hostname. These snippets read credentials from your environment; do not commit them or share a live proxy URL.

Playwright example

Use the HTTP gateway for authenticated Playwright. Set PROXY_USERNAME and PROXY_PASSWORD with the shell setup above. This example deliberately uses port 7000 even if your URL preview uses SOCKS5.

import { chromium } from 'playwright';

const browser = await chromium.launch({
  proxy: {
    server: 'http://gw.proxies.sx:7000',
    username: process.env.PROXY_USERNAME,
    password: process.env.PROXY_PASSWORD,
  },
});
try {
  const page = await browser.newPage();
  await page.goto('https://api.ipify.org?format=json', { timeout: 15000 });
  console.log(await page.locator('body').innerText());
} finally {
  await browser.close();
}

Measure Playwright traffic before blocking browser resources.

For batch generation, reserved IPs, allocations and account-specific limits, use the customer dashboard. The public tool does not create or rotate a reservation.

What the routing tokens actually do

TokenBehavior
mbl, peer, anyChoose carrier modems, peer devices, or either network. The legacy best token also permits either network; it is not a separate trust guarantee.
sidNames a session. The same account, pool, country and session ID can reuse a binding. Changing the ID starts a separate session; separate sessions can still select the same endpoint.
rot-auto5/10/20/60Schedules endpoint reselection at the supported interval. The gateway checks the timer when resolving a session. A browser can send several requests through the same tunnel; the timer does not reconnect that tunnel for each request.
rot-sticky, rot-hardUse the sticky routing path. Neither token requests a physical modem reset. Public IP continuity depends on the endpoint, carrier and failover.
rot-ondemandThe new-connection preset omits sid. An explicit reused session can retain its endpoint, so adding this token alone is not a guarantee of reselection.
ttlIdle session lifetime in seconds: 60 to 2,592,000, default 3,600. Activity refreshes the idle window. This is not a reserved-IP lease duration.
city, statePreferences for peer routing, with fallback within the country. This builder offers states for US peers. The modem-only pool ignores city and state preferences.
asn, carrier, iptypeExplicit network or classification filters. The builder uses exact ASN for a named peer network and a normalized carrier name for modems. A narrow filter can have no eligible match.

Keep session reuse deliberate

For a task that spans several connections, keep its session ID stable and choose sticky or an appropriate timed mode. Give a separate task its own ID. Do not count the number of generated usernames as the number of available devices or IP addresses.

For a reconnect test, choose the advanced new-connection preset and open a new connection for each observation. The same exit IP can return. Keep the country and other filters unchanged while comparing results in the rotation checker.

failover-samecountry is the default. Same-carrier and same-node policies narrow replacement further; strict declines replacement. Explicit network filters still apply. A failover policy is not an uptime promise.

Use the right format for your application

The generated URL encodes special characters in credentials. Applications with separate username and password fields need the original field values, not a second layer of URL encoding. Use the proxy format converter when importing an existing list.

HTTP uses gw.proxies.sx:7000; SOCKS5 uses port 7001. The curl and Requests examples use socks5h for proxy-side hostname resolution. The authenticated Playwright example uses the HTTP gateway.

Expand the examples in the builder to set credentials through environment variables. Test the echo response first, then test the actual permitted destination and expected output. Follow the Playwright traffic guide if browser assets dominate usage.

Common questions

Does hard rotation give a fresh IP per request?

No. The checked gateway code uses hard and sticky for endpoint reuse. A real carrier IP change is separate from selecting a route and may still return the same public address.

Why can a sticky session change IP?

The endpoint can lose eligibility, failover can select a replacement, or the carrier can change its public address. Sticky routing does not reserve ownership of an IP.

Why do I see fewer locations than before?

The selector now uses current public route counts instead of static country and city presets. A missing option is not proof that a country will never be supported.

Does this replace the dashboard generator?

No. This public tool explains account routing and produces a preview. Use the dashboard for account-specific limits, batch generation, reserved IPs and billing.

Sources and review scope

Routing behavior was checked against the local customer dashboard, username parser and HTTP/SOCKS gateway implementation on 13 October 2026. Public stock is fetched separately and can change. This is a source review, not a paid routing or performance test.

Agent service index and Pool Gateway documentation provide the API entry points. The tool index as JSON lists these tools and their limits.