AI agent instructions
AI agent instructions
- Use browser-secret-proxy, Notte’s open-source secret proxy, which you run on your own infrastructure. Start here.
- Build your own proxy that meets Notte’s requirements.
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
\uescapes. 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
502and 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.
Quick start
This runs the proxy with thefile resolver and starts a Notte session that uses it.
1
Build the proxy
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
5
Start a session
Add a The proxy logs
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.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.-upstream-proxy (or SECRET_PROXY_UPSTREAM) to a gateway credential’s proxy_url_tls. See Share the exit IP.
Learn more
- README: every flag, format and limit, and the security model.
- Documentation: concepts, deployment, resolvers and security.
- Cookbook, one recipe per secret, with the exact flags and values:
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:- Be reachable on a public address, as
http://host:portorhttps://host:port. Withhttps://, its TLS certificate must be valid for that hostname, issued by a public CA or by the CA you send inca_certificate. - Speak HTTP proxy protocol:
CONNECT host:443tunnels for HTTPS sites, and absolute-form requests (GET http://host/path) for plain HTTP sites. - Accept Basic auth in the
Proxy-Authorizationheader if you setusernameandpassword, and answer407to wrong credentials. Notte then fails the browser’s request with502. - 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. - 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
\uescapes. If a value cannot be swapped, return an error instead of forwarding the stand-in. - 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.
- Forward requests unchanged apart from the swapped values, over a new TLS connection to the site that verifies the site’s certificate.
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. Useproxy_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.