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

# Proxies

> Route your automation traffic with precision & control

> [!TIP]
>
> Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.

## Overview

Notte offers a flexible proxy system, enabling you to control how your automation traffic is routed across the internet. Whether you need anonymity, geolocation control, or improved reliability, Notte makes it easy to integrate proxies into your workflows.

## Configuration Options

With Notte, you can:

* Use built-in proxies: Effortlessly route traffic through our managed residential proxies
* Bring your own proxies: Use custom HTTP, HTTPS, or SOCKS5 proxies for greater control over network routing
* Reach private services: Route the session through your Tailscale tailnet
* Keep secrets out of the browser: Send selected hosts through your tokenization proxy with a [secret proxy](https://docs.notte.cc/features/sessions/secret-proxies/overview.md)
* Use Notte's residential proxies outside a session: Send your own HTTP client, scraper or proxy through the [proxy gateway](https://docs.notte.cc/features/sessions/proxy-gateway.md)

Each session uses a single proxy as its exit. A secret proxy is added next to it and only carries the hosts you list.

Proxies are configured when creating a session through the API or SDK.

## Built-in Proxies

Use Notte's built-in proxies to route traffic through managed, residential proxies. This is the simplest option and requires very little setup.

Built-in proxies are on by default (`proxies=True`) and exit in the US unless you pick a country. Set `proxies=False` to disable them.

```python default_proxy.py theme={null}
from notte_sdk import NotteClient

client = NotteClient()

# Start a session with built-in proxies
with client.Session(proxies=True) as session:
    result = session.execute(type="goto", url="https://www.notte.cc/")
    observation = session.observe()
```

```typescript default_proxy.ts theme={null}
import { NotteClient } from 'notte-sdk';

const client = new NotteClient();

const session = client.Session({
  proxies: true,
});
await session.use(async () => {
  await session.execute({ type: 'goto', url: 'https://www.notte.cc/' });
  await session.observe();
});
```

> [!WARNING]
>
> `ERR_TUNNEL_CONNECTION_FAILED` indicates either a temporary proxy hiccup or a site unsupported by our built-in proxies. Please try again or email [support@notte.cc](mailto:support@notte.cc).

To exit from a specific country, pass its two-letter code, or an explicit `NotteProxy`:

```python country_proxy.py theme={null}
from notte_sdk import NotteClient
from notte_sdk.types import NotteProxy, ProxySettings

client = NotteClient()

# Shorthand: pass a country code
session = client.Session(proxies="fr")

# Equivalent explicit form
proxies: list[ProxySettings] = [NotteProxy.from_country("fr")]
session = client.Session(proxies=proxies)
```

```typescript country_proxy.ts theme={null}
import { NotteClient, type NotteProxy } from 'notte-sdk';

const client = new NotteClient();

// Route the session through a French residential proxy
const proxies: NotteProxy[] = [{ type: 'notte', country: 'fr' }];
const session = client.Session({ proxies });
```

## Custom Proxies

Notte supports custom proxy configurations, allowing you to route traffic through your own HTTP, HTTPS, or SOCKS5 proxies (`http://`, `https://`, or `socks5://` in `server`; with `browser_type="chrome-nitro"`, HTTP or HTTPS only). This is useful if you need to enforce specific network routing rules, comply with security policies, or optimize performance with a preferred proxy provider.

```python custom_proxy.py theme={null}
from notte_sdk import NotteClient
from notte_sdk.types import ExternalProxy, ProxySettings

client = NotteClient()

# Configure custom proxy settings
proxy_settings = ExternalProxy(
    server="http://your-proxy-server:port",
    username="your-username",
    password="your-password",
)

# Start a session with custom proxy
proxies: list[ProxySettings] = [proxy_settings]
with client.Session(proxies=proxies) as session:
    # use your session
    pass
```

> [!WARNING]
>
> Ensure that your proxy server is reachable from the internet and the provided credentials are correct before creating a session. We do not support all proxy providers.

## Tailscale (tsnet) Proxies

Notte can join your [Tailscale](https://tailscale.com) tailnet directly from within a cloud session, letting the browser reach any private service exposed on your tailnet (internal dashboards, staging environments, MagicDNS hosts) without exposing them to the public internet.

Authentication uses [Tailscale OAuth client credentials](https://tailscale.com/kb/1215/oauth-clients). In your Tailscale admin console:

1. In your tailnet policy file, add `tag:notte` to `tagOwners`.
2. Under **Settings → Trust credentials**, create an OAuth client with write access to the `auth_keys` scope and tag it with `tag:notte` only. Tailscale requires every auth key the client creates to carry exactly the client's tags, so any other tag on the client makes Notte's sessions fail to join.
3. In the **Access controls** tab, grant `tag:notte` access to the resources you want to reach from the session.

You can then give Notte the client in one of two ways.

### Option 1: Connect Tailscale in the console

Open **[Settings → Integrations](https://console.notte.cc/settings/integrations)** in the Notte console and add the OAuth client ID and secret. Notte checks them with Tailscale before saving and stores the secret encrypted. Each workspace has one Tailscale connection, and only workspace admins can add or remove it.

Sessions in that workspace then use it without any credentials in your code:

```python tailnet_proxy_console.py theme={null}
from notte_sdk import NotteClient
from notte_sdk.types import ProxySettings, TailnetProxy

client = NotteClient()

# No credentials: uses the Tailscale OAuth client connected to your workspace
tailnet_proxy = TailnetProxy()

# Start a session routed through your tailnet
proxies: list[ProxySettings] = [tailnet_proxy]
with client.Session(proxies=proxies) as session:
    result = session.execute(type="goto", url="https://grafana.your-tailnet.ts.net/")
    screenshot = session.observe().screenshot.bytes()
```

### Option 2: Pass the OAuth credentials in code

Pass the client ID and secret when creating the session. This works without a console connection, and credentials passed here take precedence over it:

```python tailnet_proxy.py theme={null}
from notte_sdk import NotteClient
from notte_sdk.types import ProxySettings, TailnetProxy

client = NotteClient()

# Configure a Tailscale tsnet proxy using OAuth client credentials
tailnet_proxy = TailnetProxy(
    oauth_client_id="your-tailscale-oauth-client-id",
    oauth_client_secret="your-tailscale-oauth-client-secret",
)

# Start a session routed through your tailnet
proxies: list[ProxySettings] = [tailnet_proxy]
with client.Session(proxies=proxies) as session:
    result = session.execute(type="goto", url="https://grafana.your-tailnet.ts.net/")
    screenshot = session.observe().screenshot.bytes()
```

With either option, you can navigate to any hostname reachable on your tailnet once the session is created, for example a MagicDNS name like `https://grafana.your-tailnet.ts.net/`.

### Exit nodes

By default only tailnet addresses go through your tailnet, and public sites are reached from Notte's network. Set `exit_node` to send the session's public traffic out through one of your own devices instead, such as your laptop, so sites see your connection's IP address. It works with both options, for example `TailnetProxy(exit_node="my-laptop")`.

Name the device by hostname, MagicDNS name, or Tailscale IP. It must be [advertised and approved as an exit node](https://tailscale.com/kb/1103/exit-nodes), and your policy must let `tag:notte` reach `autogroup:internet`. If the device is offline or not usable as an exit node, the session fails to start rather than falling back to Notte's network.

### Fixed egress IP

If a site needs to see the same IP address on every session, for example because it allowlists your IP, run an exit node on a machine with a fixed public IP and point `exit_node` at it. All of the session's public traffic then leaves from that address.

## Usage Measurement

Proxy usage is measured by the total amount of data transferred through the proxy, for both built-in and custom proxies. This includes:

* Webpage content, downloads, and media files
* HTTP headers, authentication data, and encryption overhead
* Any requests and responses routed through the proxy

Since all traffic must pass through the proxy server before reaching its final destination, every interaction contributes to your total bandwidth usage.

## Billing

Proxy bandwidth is billed on every session that uses a proxy, whether it is a built-in Notte proxy or your own custom proxy (`type: "external"`). Sessions without a proxy are not billed for bandwidth.

| Proxy | Rate |
| - | - |
| Built-in proxies | \$10 per GB |
| Custom proxies (Startup plan) | \$0.20 per GB, on top of what your proxy provider charges |

Bandwidth is counted as request plus response bytes, rounded up to the next MB per session.

For a custom proxy, the full bandwidth is first recorded as a **Proxy** charge at $10 per GB. When the session closes, a **BYO Proxy Credit** refunds all but $0.20 per GB of it on the Startup plan. The credit is final, and both lines appear in your usage and billing view.

Enterprise plans can have custom terms. See [pricing](https://www.notte.cc/pricing) or [contact us](https://cal.com/team/notte/demo) for custom terms.


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