Skip to main content
Read the Notte skill 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.
You can use a proxy you run yourself as a Notte secret proxy, for example one connected to your own vault. Notte sends it the browser’s traffic to the hosts you list, and nothing else. There are two ways to do it:

Use browser-secret-proxy

browser-secret-proxy is an open-source forward proxy (Apache-2.0, written in Go) that you host. The browser and the agent only handle stand-ins. The proxy replaces them with the real values on requests to the hosts you allowlist, so the real values stay on infrastructure you control and never reach Notte. What it does:
  • Swaps stand-ins wherever the site expects them: request headers, the query string, form bodies and JSON bodies, including JSON strings written with \u escapes. Each real value is escaped for where it lands.
  • Decrypts only the hosts you allowlist with -hosts. Traffic to every other host is tunneled without decryption.
  • Fails closed. If a stand-in cannot be resolved, may not go to the request’s host or has expired, the request is answered 502 and nothing of it is sent.
  • Masks responses by default. Real values that a listed site sends back are replaced by their stand-ins before they reach the browser. See why this matters.
  • Looks up real values in one of three ways, set with -resolver:
    • file: a JSON file of stand-ins and their real values, reloaded when it changes. A secret manager can write it for you.
    • http: a detokenize service you run, called over mutual TLS. Use it when your values already live in a vault or tokenization service with an API, or to compute 2FA codes at request time.
    • sealed: the values travel in the proxy password as a token that your issuer signs and encrypts to the proxy, with no lookup service and no storage.
  • Relays the browser’s connection without changing how it looks to the site.
It handles HTTPS sites only: plain HTTP requests through it are refused.

Quick start

This runs the proxy with the file resolver and starts a Notte session that uses it.
1

Build the proxy

Releases publish binaries and a signed image, ghcr.io/nottelabs/browser-secret-proxy:<version>, on the repository’s GitHub Releases page.
2

Create a CA

The proxy issues a certificate for each listed host from this CA, and the session’s browser trusts it for those hosts only. Anyone holding ca.key can impersonate any host to a client that trusts ca.pem.
3

Map stand-ins to real values

Write swaps.json and restrict it with chmod 600 swaps.json. Pick stand-ins that cannot appear by accident in other traffic, such as a prefix of your own.
4

Run the proxy

The proxy listens in plain HTTP, so its credentials would travel in clear text. Put a TLS terminator in front of it, such as a load balancer with a TLS listener, stunnel or HAProxy in TCP mode, on a public address Notte can reach. See the proxy’s deployment guide for Docker, systemd, Kubernetes and TLS setups.
5

Start a session

Add a secret entry with your terminator’s address, the proxy credentials, ca.pem and the same hosts as -hosts. A host in the entry but not in -hosts is tunneled without swaps.
The proxy logs swapped stand-ins with the host and the number of fields, never the values. Because masking is on, an echo endpoint shows the stand-in again, not the real value.
To give the site one IP address for the whole session, set -upstream-proxy (or SECRET_PROXY_UPSTREAM) to a gateway credential’s proxy_url_tls. See Share the exit IP.

Learn more

Build your own

If you want to write your own proxy, or connect one you already run, it must meet the requirements below.

Requirements

Your proxy must:
  1. Be reachable on a public address, as http://host:port or https://host:port. With https://, its TLS certificate must be valid for that hostname, issued by a public CA or by the CA you send in ca_certificate.
  2. Speak HTTP proxy protocol: CONNECT host:443 tunnels for HTTPS sites, and absolute-form requests (GET http://host/path) for plain HTTP sites.
  3. Accept Basic auth in the Proxy-Authorization header if you set username and password, and answer 407 to wrong credentials. Notte then fails the browser’s request with 502.
  4. Decrypt HTTPS for the listed hosts only, presenting a certificate for the requested host issued by your CA. Send that CA certificate, never its private key, in ca_certificate. The browser trusts it for the listed hosts in that session only.
  5. Replace stand-ins with real values only on requests to the listed hosts, wherever the site expects them: request headers, the query string, form bodies and JSON bodies, including JSON strings written with \u escapes. If a value cannot be swapped, return an error instead of forwarding the stand-in.
  6. Replace real values with stand-ins in responses from the listed hosts, so a site that sends a real value back does not expose it to the browser, the agent, screenshots, recordings or network logs. See why this matters.
  7. Forward requests unchanged apart from the swapped values, over a new TLS connection to the site that verifies the site’s certificate.
To fill 2FA codes, your proxy can also compute a value at request time, for example the current TOTP code for a stored seed. See 2FA codes.

Share the exit IP

To make the site see one IP address for the whole session, send your proxy’s outgoing connections for the listed hosts through Notte’s proxy gateway with a gateway credential. Use proxy_url_tls if your proxy can use TLS to its upstream, or proxy_url_plain if it cannot, and start the session with the same sticky_session, and the same country or city, on its notte entry.
The credential is valid for your plan’s maximum session duration, so mint a new one for each session or before it expires.

Test your proxy

Check that a listed host goes through your proxy and presents a certificate from your CA:
You can also save the proxy in the console with the Custom preset and run Test connection, which checks the address, the connection, the credentials and the CA. See Save the configuration in the console.

Start a session