> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.lumiweb.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure proxies in the username

> Country, state, city, provider, ZIP, and IP rotation right in the proxy string

For rotating proxies, every setting lives right in the username. The bot builds that username for you, but you can also edit it by hand: add a parameter, and the next connection already uses the new settings.

* You do not need to get new data from the bot.
* The password stays the same.
* Earlier strings keep working with their own settings. One package can hold strings for different countries, and they share its traffic.

<Note>
  This works for Residential and Mobile. ISP and Datacenter have a fixed IP, so their username carries no settings.
</Note>

## How the string is built

```text theme={"system"}
pool.lumiweb.cc:10000:LOGIN_c_US_s_a1b2_ttl_10m:PASSWORD
```

| Part     | Example                     | What it is                                 |
| -------- | --------------------------- | ------------------------------------------ |
| Host     | `pool.lumiweb.cc`           | the gateway address, the same for everyone |
| Port     | `10000`                     | any port from 10000 to 10999               |
| Username | `LOGIN_c_US_s_a1b2_ttl_10m` | your username followed by parameters       |
| Password | `PASSWORD`                  | the same with any parameters               |

The bot gives you the username and password in the proxy panel: **Rotating** → category → **Get data**. Your plain username is everything before the first `_`. In the examples on this page, replace `LOGIN` and `PASSWORD` with your own.

HTTP and SOCKS5 work on the same port, and the gateway detects the protocol by itself.

## Parameters

Each parameter is written as `_key_value` and appended to the username.

| Parameter | Example          | What it sets                                                |
| --------- | ---------------- | ----------------------------------------------------------- |
| `_c_`     | `_c_US`          | country, a two-letter code                                  |
| `_sd_`    | `_sd_2928`       | region or state, numeric code only                          |
| `_city_`  | `_city_New-York` | city in Latin letters, spaces replaced with `-`             |
| `_asn_`   | `_asn_7922`      | provider or mobile carrier by AS number                     |
| `_zip_`   | `_zip_10001`     | postal code, only together with `_c_`                       |
| `_s_`     | `_s_a1b2`        | session, pins one IP                                        |
| `_ttl_`   | `_ttl_10m`       | how long the session keeps its IP, only together with `_s_` |

Skip the parameters you do not need. Write the rest in the same order the bot uses:

```text theme={"system"}
LOGIN_c_COUNTRY_sd_REGION_city_CITY_asn_PROVIDER_zip_POSTCODE_s_SESSION_ttl_TIME
```

Values may contain only Latin letters and digits, plus `-` in a city or postal code. Keep the whole username within 128 characters.

<Note>
  Strings the bot issued earlier may contain `_isp_` with a number. It is also a provider, just by an internal code. Those strings keep working, and the bot now builds new ones with `_asn_`.
</Note>

## How the IP changes

Two parameters control IP changes: `_s_` and `_ttl_`.

| Mode                        | Username example            | What happens                                                      |
| --------------------------- | --------------------------- | ----------------------------------------------------------------- |
| New IP for every connection | `LOGIN_c_US`                | without `_s_`, the gateway picks a new IP each time               |
| Timer                       | `LOGIN_c_US_s_a1b2_ttl_10m` | the IP holds for 10 minutes, then the next request gets a new one |
| Sticky                      | `LOGIN_c_US_s_a1b2`         | the IP holds while the device stays online                        |

**Session.** You make up the `_s_` value yourself: any Latin letters and digits, for example `_s_job1`. The same value gives the same IP, and a new value gives a new IP. So you can change the IP at any moment by changing the `_s_` value.

**Time.** `_ttl_` takes a number and a unit: `s` for seconds, `m` for minutes, `h` for hours. For example, `_ttl_30s`, `_ttl_10m`, `_ttl_1h`. In the bot, rotation goes from 1 minute to 24 hours, which is `_ttl_1m` to `_ttl_24h`.

<Note>
  A session with no traffic for 60 minutes is closed. The next request with the same `_s_` gets a new IP.
</Note>

Sticky does not guarantee one IP for the whole term. A home or mobile device stands behind it, and that device can go offline. The IP then changes or the request returns an error. If the address must never change, choose [ISP or Datacenter](/en/proxies/rotation).

Without `_s_`, every new connection gets a new IP. A connection to an HTTPS site that your software keeps open uses one IP until it closes.

## New geo, new session

<Warning>
  `_s_` pins a specific IP. If you change the country or city but keep the old `_s_` value, the gateway returns the old IP and ignores the new geo. Whenever you change geo, change the `_s_` value too.
</Warning>

| Username                            | Result                                      |
| ----------------------------------- | ------------------------------------------- |
| `LOGIN_c_US_sd_2928_s_job1_ttl_30m` | an IP in Texas                              |
| `LOGIN_c_DE_s_job1_ttl_30m`         | the same Texas IP, the session is unchanged |
| `LOGIN_c_DE_s_job2_ttl_30m`         | an IP in Germany                            |

## Geo step by step

### Country

`_c_` plus a two-letter country code: `_c_US`, `_c_DE`, `_c_FR`. The United Kingdom is `GB`, not `UK`. Without `_c_`, the IP can be from any country.

### Region or state

`_sd_` plus a numeric code: `_sd_2928` is Texas. A name like `_sd_Texas` or an abbreviation like `_sd_TX` is rejected with `407`.

US state codes are listed below. For other countries, pick the region in the bot (**Geolocation** → **Region**), tap **Get data**, and copy the number after `_sd_`.

<Accordion title="US state codes" icon="flag-usa">
  | State                | Code   | State          | Code   |
  | -------------------- | ------ | -------------- | ------ |
  | Alabama              | `79`   | Montana        | `1783` |
  | Alaska               | `82`   | Nebraska       | `1888` |
  | Arizona              | `155`  | Nevada         | `1895` |
  | Arkansas             | `156`  | New Hampshire  | `1898` |
  | California           | `443`  | New Jersey     | `1900` |
  | Colorado             | `596`  | New Mexico     | `1901` |
  | Connecticut          | `603`  | New York       | `1906` |
  | Delaware             | `667`  | North Carolina | `1949` |
  | District of Columbia | `759`  | North Dakota   | `1952` |
  | Florida              | `898`  | Ohio           | `2111` |
  | Georgia              | `941`  | Oklahoma       | `2117` |
  | Hawaii               | `1072` | Oregon         | `2142` |
  | Idaho                | `1130` | Pennsylvania   | `2218` |
  | Illinois             | `1154` | Rhode Island   | `2459` |
  | Indiana              | `1168` | South Carolina | `2745` |
  | Iowa                 | `1175` | South Dakota   | `2746` |
  | Kansas               | `1285` | Tennessee      | `2923` |
  | Kentucky             | `1330` | Texas          | `2928` |
  | Louisiana            | `1561` | Utah           | `3101` |
  | Maine                | `1616` | Vermont        | `3147` |
  | Maryland             | `1675` | Virginia       | `3173` |
  | Massachusetts        | `1684` | Washington     | `3211` |
  | Michigan             | `1728` | West Virginia  | `3234` |
  | Minnesota            | `1742` | Wisconsin      | `3250` |
  | Mississippi          | `1752` | Wyoming        | `3255` |
  | Missouri             | `1753` |                |        |

  The codes are the same for Residential and Mobile, but Mobile covers fewer states. If a state is not listed in the bot, a string with its code returns `503`.
</Accordion>

### City

`_city_` plus the English name, with spaces replaced by `-`: `_city_Dallas`, `_city_New-York`, `_city_Los-Angeles`. Add the country as well, since the same city name exists in different countries.

The easiest way to get the exact spelling is the bot: pick the city in **Geolocation**, tap **Get data**, and look at the username.

### Provider or carrier

`_asn_` plus the provider's autonomous system (AS) number. Digits only, without the `AS` letters: the gateway rejects `_asn_AS7922`.

| Country | Provider | Parameter   |
| ------- | -------- | ----------- |
| USA     | Comcast  | `_asn_7922` |
| USA     | Verizon  | `_asn_701`  |
| Germany | Vodafone | `_asn_3209` |

The bot shows available providers under **Geolocation** → **Provider**. For Mobile, the button is called **Operator**. You can look up any other provider's number by name in public ASN directories. If no IP is available for that number right now, the string returns `503`.

### ZIP

`_zip_` plus a postal code. It works only together with a country: `_c_US_zip_10001`. Without `_c_`, the username fails authentication with `407`.

Write letters in upper case and replace a space with `-`: `_c_US_zip_75201`, `_c_DE_zip_10115`, `_c_CA_zip_M5V`.

The gateway picks the nearest available IP, so the exit's postal code can differ from the one you set. If there is no device nearby at all, the string returns `503`.

### Several filters at once

Every filter narrows the choice of IPs. Country, region, and city together usually work. A city combined with a ZIP or a provider often returns `503`, for example when the postal code belongs to another city. If a string returns `503`, remove filters one at a time, starting with the narrowest.

## Parallel threads

* Each port from 10000 to 10999 works as a separate channel. Simultaneous requests through different ports use different IPs, up to 1000 at once.
* When the username has `_s_`, the session decides the IP, not the port. The same session on different ports gives one IP. To give each thread its own pinned IP, give each one its own session: `_s_job1`, `_s_job2`, and so on.
* When the bot issues several strings, it does this for you: each string gets its own port and its own session.
* All strings draw traffic from the same package. Changing parameters costs nothing.

## Ready-made examples

| Goal                                           | Username                                |
| ---------------------------------------------- | --------------------------------------- |
| USA, new IP for every connection               | `LOGIN_c_US`                            |
| Texas, IP holds for 30 minutes                 | `LOGIN_c_US_sd_2928_s_tx1_ttl_30m`      |
| Dallas, IP holds while the device stays online | `LOGIN_c_US_sd_2928_city_Dallas_s_dal1` |
| Dallas by postal code, new IP every 10 minutes | `LOGIN_c_US_zip_75201_s_dal2_ttl_10m`   |
| Germany, Vodafone network                      | `LOGIN_c_DE_asn_3209`                   |
| United Kingdom, new IP every hour              | `LOGIN_c_GB_s_uk1_ttl_1h`               |

Here is the same string in different formats:

<Tabs>
  <Tab title="URL">
    ```text theme={"system"}
    socks5://LOGIN_c_US_sd_2928_s_tx1_ttl_30m:PASSWORD@pool.lumiweb.cc:10000
    http://LOGIN_c_US_sd_2928_s_tx1_ttl_30m:PASSWORD@pool.lumiweb.cc:10000
    ```
  </Tab>

  <Tab title="host:port:user:pass">
    ```text theme={"system"}
    pool.lumiweb.cc:10000:LOGIN_c_US_sd_2928_s_tx1_ttl_30m:PASSWORD
    ```
  </Tab>

  <Tab title="user:pass:host:port">
    ```text theme={"system"}
    LOGIN_c_US_sd_2928_s_tx1_ttl_30m:PASSWORD:pool.lumiweb.cc:10000
    ```
  </Tab>
</Tabs>

## How to check

```bash theme={"system"}
curl -x 'http://LOGIN_c_US_sd_2928:PASSWORD@pool.lumiweb.cc:10000' https://ipinfo.io/json
```

The response shows the exit IP, country, region, and city. Run the command twice: without `_s_` the IP changes, with `_s_` it stays the same.

<Note>
  IP lookup services use different databases. One service may place the same IP in a neighboring city or region.
</Note>

## Errors

| Response           | What it means                                                                                                                                                                            | What to do                                                                      |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `407`              | the gateway rejected the username: a typo in a parameter name, a region written as a name, `AS` in the provider number, a ZIP without a country, a wrong password, or an expired package | check the username against the parameter table and check the package in the bot |
| `503 No exit node` | no free IPs match these filters right now                                                                                                                                                | remove the narrowest filter, change the `_s_` value, and retry                  |
| IP does not change | the username has `_s_` without `_ttl_`, or the connection stays open                                                                                                                     | remove `_s_`, add `_ttl_`, or change the session value                          |
| Geo did not change | the username still has the old session                                                                                                                                                   | set a new `_s_` value                                                           |

During the first 10 minutes after you buy a package, strings may return `503`. That is normal while the package connects. With `_s_`, the first request may also occasionally get `503` if the device has just gone offline. Retry the request and turn on retries in your software.

## Extra parameters

The bot does not set these, but the gateway understands them. Use them only if you know why you need them.

| Parameter | Example       | What it sets                                                                                             |
| --------- | ------------- | -------------------------------------------------------------------------------------------------------- |
| `_os_`    | `_os_android` | operating system of the exit device: `windows`, `macos`, `linux`, `android`, or `ios`. Goes before `_s_` |
| `_rotm_`  | `_rotm_2`     | what happens when the session's device goes offline. Goes at the very end, only together with `_s_`      |

`_rotm_` values:

* `0` pick another device right away, this is the default;
* `1` wait about 5 seconds until inactive devices drop off the list, requests may get errors meanwhile;
* `2` never switch the device.

<Warning>
  With `_rotm_2`, the string stops working as soon as the device goes offline. To get a new IP, change the `_s_` value. Use this mode when an IP change is worse than an error, for example when working with accounts.
</Warning>

The OS filter narrows the choice of IPs a lot. For some systems there may be no matching devices, and the string returns `503`.

## How this maps to the bot

The bot builds the same username from the panel settings. You can set the proxy up in the bot, get the string, and then edit it by hand.

| In the bot                      | In the username                                                 |
| ------------------------------- | --------------------------------------------------------------- |
| Country                         | `_c_`                                                           |
| Region                          | `_sd_`                                                          |
| City                            | `_city_`                                                        |
| Provider or Operator            | `_asn_`                                                         |
| ZIP                             | `_zip_`                                                         |
| Rotation "Every request"        | no `_s_`                                                        |
| Rotation from 1 minute to 1 day | `_s_` and `_ttl_` from `1m` to `24h`                            |
| Session Sticky                  | `_s_` without `_ttl_`                                           |
| Protocol and format             | not part of the username, they only change how the string looks |

The password changes only after a reset in the bot: **Reset settings** → **Password**. After that, every issued string stops working, and you need to get new data.

<CardGroup cols={2}>
  <Card title="Connection and formats" icon="code" href="/en/proxies/usage">
    String formats, HTTP and SOCKS5.
  </Card>

  <Card title="If it does not work" icon="triangle-exclamation" href="/en/proxies/troubleshooting">
    Diagnostics by symptom.
  </Card>
</CardGroup>
