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

# Proxies

> Where a browser goes out from, a country on one fixed address, or your own proxy.

A browser goes out to the web in one of three ways:

* **From a country**, through one of Hotkey's proxies, on paid plans, for \$5 a month a browser. The browser gets a fixed residential address of its own in that country, and keeps it.
* **Through your own proxy**, an HTTP proxy you rent elsewhere. Free on every plan.
* **From Hotkey's server**, shared with other browsers there. Free. Free browsers always go out this way.

## From a country

When you add a browser in the console, **Where it goes out from** starts on Automatic and says what it costs: "+\$5 a month for a fixed residential address in France". Pick Hotkey's server or your own proxy to go without. It offers:

* **Automatic** (recommended): the country you are in now, as Cloudflare sees your connection to the console. If no address is free there, the nearest country that has one. If none is free at all, Hotkey's server, and the console says so.
* **A country**, with how many addresses are free in each.
* **Hotkey's server**, free.
* **Your own proxy**, free.

A workspace's first browser, made when the account is let in, goes out from Hotkey's server. Get started offers it an address with the price, and its settings can give it one any time.

Over the API, pass `country` when you make the browser: `"auto"`, a two-letter code such as `"FR"`, or `"server"`.

```bash theme={null}
curl -X POST https://console.hotkey.so/v1/browsers \
  -H "Authorization: Bearer $HOTKEY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Northwind", "country": "FR"}'
```

A country with no free address answers 409 `no_free_proxy`, and a workspace on Free answers 402 `plan_has_no_proxies`. The browser object's `egress` says where it goes out: `mode` (`pool`, `own` or `server`), `country`, `city`, `ip`, `time_zone`, `state`, `automatic`, and `price` on a pool address (`amount_usd`, `per`, `included_gb`, `overage_per_gb_usd`).

To turn an address off, or give one to a browser that has none:

```bash theme={null}
curl -X PATCH https://console.hotkey.so/v1/browsers/brw_... \
  -H "Authorization: Bearer $HOTKEY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"egress": "server"}'
```

`egress` is `"server"` (the address goes back, and its $5 stops from the next period), `"auto"` or a two-letter code (it takes one, $5 a month).

Changing country, or Change IP in the browser's settings, gives it a new address: $5 on the next invoice, as a one-off line, and the current address's $5 for this period is not credited, since we keep paying for it through the 30 days it waits. The console asks first and says so; over the API, a change of country answers 409 `confirm_charge_required` until you send `"confirm_charge": true`. Sites may ask the browser to sign in again from the new address, and its time zone moves with the country. A dead proxy's replacement is free.

How it behaves:

* **One address per browser.** No other browser uses it at the same time, and it never rotates. Sites see the same address every day, so sign-ins stay.
* **It never falls back to Hotkey's server.** If the proxy stops working, the browser's pages don't load until it is back.
* **A dead proxy is never swapped by itself.** Once a proxy has been down 10 minutes, the browser's settings offer a working address, the same country first, and nothing changes until you confirm.
* **Change IP**, in the browser's settings, moves it to another free address, the same country first. The browser's activity names the old and the new address.
* **The time zone is the address's**, as below.
* **It keeps its address while the workspace pays for it**, asleep or not. Nothing takes it back for being idle.
* **The address goes back** when you turn it off (Hotkey's server or your own proxy), delete the browser, or the workspace moves to Free or stops paying (after the 14 days Stripe retries a failed payment). It waits 30 days before another customer may get it; your workspace may take it back sooner.

### What it costs

* \*\*$5 a month for each browser on an address** ($50 a year on a yearly plan), billed with the plan. An address added during a period is charged for the rest of it on the next invoice; one turned off is charged to the end of the period and not after.
* **10 GB of proxy data a month included for each address**, pooled across the workspace: 10 GB times the most browsers it had on an address at once that month.
* **Past it, \$3 a GB**, counted to the MB, reported to Stripe once a day and billed on the next invoice.
* **A monthly cap on that overage**, \$25 until the workspace's owners change it in Settings > Billing (0: nothing past what's included).

At 80 % of the included data the owners get an email and [webhooks](https://docs.hotkey.so/webhooks.md) get `workspace.proxy_data_low`, and at 80 % of the cap `workspace.proxy_cap_low`. At the cap, `workspace.proxy_data_used` comes, the workspace's browsers that go out from a country sleep, and a wake answers 402 `proxy_data_used` until the first of next month or a higher cap. Settings > Billing shows the month so far, and [`GET /v1/usage`](https://docs.hotkey.so/api#get-v1-usage) has `proxy_bytes_sent`, `proxy_bytes_received` and `proxy_bytes_estimated` per browser and day (estimated: the part counted from the browser's own network sizes rather than the server's firewall). Your own proxy doesn't count.

## Your own proxy

Over the [HTTP API](https://docs.hotkey.so/api.md#egress-proxy):

```bash theme={null}
curl -X PUT https://console.hotkey.so/api/identities/<id>/proxy \
  -H "Authorization: Bearer $HOTKEY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "http://user:pass@proxy.example.com:8080"}'
```

You can also pass `proxy` when you make the browser with `POST /api/identities`. `GET` on the same route shows it, and `DELETE` removes it.

A change restarts an awake browser so Chrome starts with the new proxy, and is refused while an ask in it waits on you.

## How it behaves

* **All of the browser's traffic goes through it.** If the proxy is down, the browser has no traffic at all. It never falls back to a direct connection.
* **Names resolve at the proxy**, so the server's own DNS never sees the sites the browser visits.
* **WebRTC goes through it too.** Pages can't learn the server's address through WebRTC. The live view's video to you is not affected.
* **QUIC is off**, so every connection uses the proxy.
* **The proxy must be on a public address.** A proxy that points at a private address, loopback or cloud metadata is refused.
* **SOCKS5 with a password isn't supported**, because Chrome can't sign in to SOCKS5 proxies. Use the provider's HTTP endpoint.

## The time zone follows the proxy

A site sees the proxy's address and the page's time zone side by side, and a browser that goes out in Paris but keeps Tokyo time looks like a proxy. So when you set or change a proxy, Hotkey asks a geo service (ipinfo.io), through the proxy itself, where the proxy goes out, and gives the browser that place's time zone:

* A browser whose time zone came from your device, from an earlier proxy, or that had none takes the proxy's.
* A time zone you chose yourself stays. The browser's activity says the two disagree, and its settings offer **Use the proxy's**. Pass `"timezone": "follow"` with the `PUT` to have it follow anyway.
* Removing the proxy removes the time zone it gave.

The answer to the `PUT` has `exit` (`ip`, `country`, `city`, `timezone`) and `timezone` (`followed`, `now`, `why`). Languages don't change: they choose the language pages come in. Like any time zone change, it applies from the browser's next start, and setting a proxy restarts an awake browser anyway.

## Health

The browser checks the proxy every minute. Its state is `ok`, `down`, `auth-failed` or `checking`.

## The password

The proxy's password is encrypted on the server. The API, the console and logs show only the server, the start of the username, and that a password is set. The password is never on Chrome's command line: the browser answers the proxy's sign-in itself.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.