> For the complete documentation index, see [llms.txt](https://docs.aiceberg.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aiceberg.ai/developers/guardian-via-icap/getting-started/locally-test/configure-local-proxy.md). Agents can also search and read this documentation through its [MCP server](https://docs.aiceberg.ai/~gitbook/mcp).

# Configure Local Proxy

{% stepper %}
{% step %}

### Introduction

This guide explains how to configure your browser or operating system to route traffic through the local Squid proxy (default: `http://127.0.0.1:3128`). This is required to test the Aiceberg Guardian.

> **Note**: The default Squid port is `3128`. If you have changed `SQUID_PORT` in your `.env` or Docker configuration, please replace `3128` with your configured port in the instructions below.
> {% endstep %}

{% step %}

### Firefox (Recommended)

Firefox is the recommended browser for testing because it maintains its own independent certificate store and proxy settings. This allows you to test without modifying your global system configuration.

#### Trust the CA Certificate

1. Open Firefox Settings (`about:preferences`).
2. Search for **Certificates** -> **View Certificates**.
3. Go to the **Authorities** tab and click **Import...**.
4. Select your generated CA certificate (e.g., `certs/ca.crt`).
5. Check the box **"Trust this CA to identify websites"**.
6. Click **OK**.

#### Configure Proxy Settings

1. In Firefox Settings, search for **Network Settings** and click **Settings...**.
2. Select **Manual proxy configuration**.
3. **HTTP Proxy**: `127.0.0.1`
4. **Port**: `3128`
5. **Important**: Check the box **"Also use this proxy for HTTPS"**.
6. Click **OK**.
   {% endstep %}

{% step %}

### Google Chrome

Chrome uses the system's certificate store (Keychain on macOS, Cert Store on Windows). You have two options for testing.

#### Option A: Isolated Instance (Script/CLI) - Recommended

You can launch a temporary, isolated instance of Chrome that uses the proxy without affecting your main browsing profile.

Via Helper Script (macOS/Linux):

{% code title="Run helper script" %}

```bash
./launch_chrome_proxy.sh
```

{% endcode %}

Manual CLI Command (macOS):

{% code title="Launch Chrome with proxy" %}

```bash
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
    --user-data-dir="/tmp/chrome_proxy_test" \
    --proxy-server="http://127.0.0.1:3128" \
    --ignore-certificate-errors \
    https://chatgpt.com
```

{% endcode %}

Note: `--ignore-certificate-errors` is convenient but manually trusting the CA in the System Keychain provides a more realistic test of SSL interception.

#### Option B: System Proxy (OS Level)

If you prefer to use your main Chrome instance, you must configure the proxy at the Operating System level (see the Operating System Settings step) and trust the CA in your System Keychain.
{% endstep %}

{% step %}

### Operating System Settings

Configuring the proxy here affects **all** applications that respect system proxy settings (Chrome, Safari, curl, etc.).

#### macOS

1. Open **System Settings** -> **Network**.
2. Select your active network interface (Wi-Fi or Ethernet).
3. Click **Details...** -> **Proxies**.
4. Enable **Web Proxy (HTTP)**:
   * Server: `127.0.0.1`
   * Port: `3128`
5. Enable **Secure Web Proxy (HTTPS)**:
   * Server: `127.0.0.1`
   * Port: `3128`
6. Click **OK** and **Apply**.

#### Windows

1. Open **Settings** -> **Network & Internet** -> **Proxy**.
2. Under **Manual proxy setup**, click **Set up**.
3. Toggle **Use a proxy server** to **On**.
4. **Proxy IP address**: `127.0.0.1`
5. **Port**: `3128`
6. Click **Save**.

#### Linux (GNOME)

1. Open **Settings** -> **Network**.
2. Click the **Network Proxy** gear icon.
3. Select **Manual**.
4. **HTTP Proxy**: `127.0.0.1` Port `3128`
5. **HTTPS Proxy**: `127.0.0.1` Port `3128`
6. Close the dialog.
   {% endstep %}
   {% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aiceberg.ai/developers/guardian-via-icap/getting-started/locally-test/configure-local-proxy.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
