INFO
Targeting Methods
Two ways to specify targeting: HTTP headers or username suffix.
Targeting can be specified via HTTP headers or username suffix. Use HTTP headers when your client supports custom headers, or use the username suffix for clients that don't.
HTTP Headers
Use the following headers to specify targeting:
| Header | Description | Example |
|---|---|---|
country | ISO 3166-1 alpha-2 country code | US |
state | ISO 3166-2 subdivision code | CA |
city | City name (underscores for spaces) | san_francisco |
session | Session ID for sticky sessions | my_session_1 |
Username Suffix
For clients that don't support custom HTTP headers, you can specify targeting via username suffix.
Format
<username>-country-<CC>[-state-<ST>[-city-<city>]][-session-<id>]
Components
-country-<CC>: Country code (e.g.,-country-US)-state-<ST>: State code (e.g.,-state-CA)-city-<city>: City name (e.g.,-city-sanfrancisco)-session-<id>: Session ID (e.g.,-session-abc123)
Keywords (country, state, city, session)
are case-insensitive.
Examples
curl -x http://USERNAME:PASSWORD@res.beta.globalbyte.io:10000 \
-H "country: US" \
-H "state: CA" \
-H "city: san_francisco" \
-H "session: my_session" \
https://httpbin.org/ipcurl -x http://USERNAME-country-US-state-CA-city-san_francisco-session-my_session:PASSWORD@res.beta.globalbyte.io:10000 \
https://httpbin.org/ipimport requests
# Using username suffix (works with any HTTP client)
proxy_url = "http://USERNAME-country-US-state-CA:PASSWORD@res.beta.globalbyte.io:10000"
proxies = {
"http": proxy_url,
"https": proxy_url,
}
response = requests.get("https://httpbin.org/ip", proxies=proxies)
print(response.json())const axios = require('axios');
const { HttpsProxyAgent } = require('https-proxy-agent');
// Using username suffix
const proxyUrl = 'http://USERNAME-country-US-state-CA:PASSWORD@res.beta.globalbyte.io:10000';
const agent = new HttpsProxyAgent(proxyUrl);
axios.get('https://httpbin.org/ip', { httpsAgent: agent })
.then(response => console.log(response.data));Responses
Code: 200
Description: Successfully routed through the targeted location.
{
"origin": "172.59.208.148"
}