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

# Intercept Traffic with Transparent Mode

> Turn on Transparent Mode so the Formal Endpoint intercepts, evaluates, and logs traffic without changes to your apps

## Overview

Transparent Mode lets the [Formal Endpoint](https://docs.formal.ai/docs/guides/client-apps/desktop-app.md) intercept traffic as it leaves the host.
The Endpoint logs each intercepted flow and evaluates your [policies](https://docs.formal.ai/docs/glossary/index.md#policy) against it.
It can also route the flow to a [Connector](https://docs.formal.ai/docs/glossary/index.md#connector).

You do not change client applications. Browsers, CLIs, and AI agents keep using the same hostnames.

[Network rules](https://docs.formal.ai/docs/guides/network-rules.md) decide which TCP connections the Endpoint intercepts.
Traffic that no active rule matches leaves the host untouched.

> [!NOTE]
>
> Transparent Mode is supported on **macOS** and **Linux**. On Linux, enable
> it in `~/.formal/config.toml`. See
> [Install Formal Endpoint on Linux](https://docs.formal.ai/docs/guides/client-apps/linux.md).

## Turn on Transparent Mode

These steps are for macOS. On Linux, there is no install step: enable Transparent Mode in `~/.formal/config.toml`, as described in [Install Formal Endpoint on Linux](https://docs.formal.ai/docs/guides/client-apps/linux.md).

> [!TIP]
>
> For a managed fleet, skip these steps. An
> [MDM rollout](https://docs.formal.ai/docs/guides/integrations/mdm.md#endpoint-rollout) installs the
> Endpoint silently, trusts the CA, and signs users in.

**1. Install the network extension**

```bash theme={"languages":{"custom":["/languages/cel.json","/languages/rego.json"]}}
formal transparent-proxy install
```

Approve the system prompts so the Formal Endpoint **network extension** can run.

**2. Enable Transparent Mode**

```bash theme={"languages":{"custom":["/languages/cel.json","/languages/rego.json"]}}
formal transparent-proxy enable
```

**3. Verify**

```bash theme={"languages":{"custom":["/languages/cel.json","/languages/rego.json"]}}
formal transparent-proxy status
```

The command reports that Transparent Mode is running.

To enable Transparent Mode on every start, or to stop users from turning it off, see
[Configuring Transparent Mode on Startup](https://docs.formal.ai/docs/guides/client-apps/configuration.md#configuring-transparent-mode-on-startup).

## Choose what to intercept

Transparent Mode intercepts nothing until an active network rule matches.
Create rules in the Control Plane at [Network Rules](https://app.formal.ai/network-rules).

| Goal | Start here |
| - | - |
| Match traffic by host, process, or technology | [Write Network Rules](https://docs.formal.ai/docs/guides/network-rules.md) |
| Recognize AI agents such as Claude Code or Cursor | [Known agent identities](https://docs.formal.ai/docs/guides/network-rules.md#known-agent-identities) |
| Cover Claude, ChatGPT, Cursor, or Copilot | [AI Governance](https://docs.formal.ai/docs/guides/ai-governance/overview.md#capture-ai-traffic) |
| Send intercepted traffic to a Connector | [Write Network Rules](https://docs.formal.ai/docs/guides/network-rules.md) with `forward_to_connector` |

## Connect to Connector resources

With Transparent Mode on, `formal connect` routes a resource's own hostname through the Connector.

```bash theme={"languages":{"custom":["/languages/cel.json","/languages/rego.json"]}}
formal connect <resource-name>
```

Replace `<resource-name>` with a name from `formal ls`.
Your client then connects to the resource's hostname as usual.

## Runtime TLS trust

Transparent Mode terminates TLS with certificates from the Formal local CA.
`formal ca trust` adds that CA to the OS trust store, which browsers and Go programs use.
Node.js and most Python HTTP clients ignore the OS trust store and ship their own roots instead.

On macOS, you may want to point these clients at `~/.formal/ca/ca-bundle.pem`, a bundle of the OS trust store plus the Formal CA.
Set `transparent_proxy.runtime_ca_env = "all"` in [`config.toml`](https://docs.formal.ai/docs/guides/client-apps/configuration).
While the OS trusts the Formal CA, the Endpoint then sets these variables in your login session:

| Variable | Clients |
| - | - |
| `SSL_CERT_FILE` | Python `ssl` and `httpx` (OpenAI and Anthropic SDKs), `aiohttp` |
| `REQUESTS_CA_BUNDLE` | Python `requests` |
| `NODE_EXTRA_CA_CERTS` | Node.js, npm |
| `AWS_CA_BUNDLE` | AWS CLI, `boto3` |
| `PIP_CERT` | pip |
| `GIT_SSL_CAINFO` | git |
| `CARGO_HTTP_CAINFO` | cargo |
| `GRPC_DEFAULT_SSL_ROOTS_FILE_PATH` | gRPC, including Python `grpcio` |

Unless `runtime_ca_env` is `none`, the Endpoint also sets `NODE_EXTRA_CA_CERTS`, `SSL_CERT_FILE`, and `REQUESTS_CA_BUNDLE` in Claude Code's `~/.claude/settings.json`.
Variables that are already set keep their values.
Apps and terminals opened afterward inherit the variables. Restart apps that were already open.

## Troubleshooting

See [Troubleshoot the Endpoint](https://docs.formal.ai/docs/guides/client-apps/endpoint-troubleshooting.md#transparent-mode-symptoms) for tools that Transparent Mode can break and how to fix them.

## Next Steps

> [card] [Write Network Rules](https://docs.formal.ai/docs/guides/network-rules.md)
>
> Select the traffic Transparent Mode intercepts

> [card] [Configure the Endpoint](https://docs.formal.ai/docs/guides/client-apps/configuration.md)
>
> Enable and enforce Transparent Mode on startup

> [card] [Block Agent Git Pushes](https://docs.formal.ai/docs/guides/example-use-cases/block-agent-git-pushes.md)
>
> Apply a policy to intercepted agent traffic

> [card] [Write Policies](https://docs.formal.ai/docs/guides/policies/introduction.md)
>
> Block, mask, or rewrite intercepted requests


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