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

# Browse mode

> Open a URL in your browser with the proxy pre-configured

Browse mode lets you start intercepting traffic with a single command — no manual proxy configuration required.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
httpmon --browse https://httpbin.org/get
```

This does four things automatically:

1. Sets the macOS system HTTP/HTTPS proxy to httpmon
2. Installs the CA certificate if not already trusted (may prompt for sudo)
3. Opens the URL in your default browser
4. Pre-populates the TUI filter with the URL's hostname

<Note>
  Browse mode is currently supported on macOS only. It uses `networksetup` to configure the system proxy on the active network interface.
</Note>

## How it works

When you pass `--browse`, httpmon detects your active network interface (e.g. Wi-Fi), snapshots the current proxy settings, and configures the system HTTP and HTTPS proxy to point at `127.0.0.1:<port>`. Your default browser then opens the given URL, and all its traffic flows through httpmon.

The TUI filter is automatically set to the hostname from the URL, so you only see relevant traffic — no noise from other applications.

## Cleanup

When httpmon exits normally (via `q` or Ctrl+C), the original proxy settings are restored automatically.

httpmon also registers signal handlers for SIGTERM and SIGHUP to ensure cleanup happens even if the process is killed externally.

<Warning>
  If httpmon is forcefully killed with `kill -9` (SIGKILL), the system proxy cannot be restored automatically. In that case, go to **System Settings → Network → Wi-Fi → Details → Proxies** and disable the HTTP and HTTPS proxy manually.
</Warning>

## Examples

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Debug a specific API
httpmon --browse https://api.example.com/v1/users

# Browse with throttling
httpmon --browse https://example.com --throttle 3g

# Browse on a custom port
httpmon --browse https://example.com --port 9090

# Combine with host filtering
httpmon --browse https://example.com --block "*.analytics.com"
```
