Skip to main content

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:

HeaderDescriptionExample
countryISO 3166-1 alpha-2 country codeUS
stateISO 3166-2 subdivision codeCA
cityCity name (underscores for spaces)san_francisco
sessionSession ID for sticky sessionsmy_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/ip

Responses

Code: 200

Description: Successfully routed through the targeted location.

{
  "origin": "172.59.208.148"
}