HTTPS Interception
How It Works
Laurel Proxy performs HTTPS interception via a local Certificate Authority (CA). Here is what happens under the hood:
- On first startup, Laurel Proxy generates a root CA certificate and private key at
~/.laurel-proxy/ca/ - When a client sends a CONNECT request (HTTPS), Laurel Proxy:
- Accepts the tunnel
- Generates a per-domain certificate signed by the CA on the fly
- Terminates TLS with the client using the generated cert
- Opens a separate TLS connection to the real server
- Forwards traffic in both directions, capturing it along the way
The MITM TLS socket offers ALPN ['h2', 'http/1.1'] to the client, and the real server is probed separately over its own ALPN handshake -- the two hops negotiate independently, so an HTTP/2 client talking to an HTTP/1.1-only origin (or the reverse) works without any configuration. The origin probe is cached per host:port, but the first request to a given HTTPS origin still costs one extra TLS handshake for that discovery -- invisible to clients, but a real network side effect. SeeHTTP/2 Support for the full picture, including what gets recorded.
Setup
Step 1: Start the proxy
This generates the CA certificate if it does not already exist.
laurel-proxy startStep 2: Trust the CA certificate
laurel-proxy trust-caThis runs the platform-specific trust command. See the table below for details on each platform.
Step 3: Route HTTPS traffic through the proxy
# Via explicit proxy flag
curl -x http://127.0.0.1:8080 https://api.example.com/data
# Or enable system-wide proxy (macOS)
laurel-proxy proxy-onPlatform-Specific Trust
| Platform | What happens |
|---|---|
| macOS | Adds to System Keychain via security add-trusted-cert (requires sudo) |
| Linux | Copies to /usr/local/share/ca-certificates/ and runs update-ca-certificates (requires sudo) |
| Firefox | Must be done manually: Settings > Privacy & Security > Certificates > View Certificates > Import ~/.laurel-proxy/ca/ca.crt |
Certificate Details
| Property | Value |
|---|---|
| CA location | ~/.laurel-proxy/ca/ca.crt and ca.key |
| CA validity | 10 years |
| CA subject | "Laurel Proxy CA" |
| Per-domain cert validity | 1 year |
| Key size | 2048-bit RSA |
| Signature algorithm | SHA-256 |
| Domain cert cache | LRU, default 500 entries (configurable) |
iOS Device Inspection
Laurel Proxy can inspect HTTP/HTTPS traffic from an iOS device. Your computer and iOS device must be on the same Wi-Fi network.
Step 1: Start Laurel Proxy on your computer
laurel-proxy startStep 2: Note your computer's network address
The CLI prints a Network line on startup with your hostname, for example:
● Network http://robins-macbook.local:8081You can also find your IP manually:
ipconfig getifaddr en0 # macOS
hostname -I | awk '{print $1}' # LinuxStep 3: Configure the iOS device to use the proxy
- Open Settings > Wi-Fi
- Tap the (i) icon next to your connected network
- Scroll down and tap Configure Proxy
- Select Manual
- Set Server to your computer's hostname or IP (e.g.
robins-macbook.localor192.168.1.42) - Set Port to
8080 - Tap Save
HTTP traffic is now being captured. For HTTPS inspection, continue with the steps below.
Step 4: Install the CA certificate on iOS
Open Safari on your iOS device and navigate to the network address shown in the CLI or web UI:
http://robins-macbook.local:8081/api/ca.crtOr use the IP directly: http://192.168.1.42:8081/api/ca.crt
You can also open the web UI and tap the CA Cert link in the toolbar. Safari will prompt you to download a configuration profile. Tap Allow.
Step 5: Install the profile
- Open Settings > General > VPN & Device Management (or Profiles & Device Management on older iOS)
- Tap the Laurel Proxy CA profile
- Tap Install and enter your passcode
Step 6: Enable full trust for the certificate
- Open Settings > General > About > Certificate Trust Settings
- Toggle Enable Full Trust for Laurel Proxy CA
- Tap Continue on the warning dialog
HTTPS traffic from the iOS device is now fully inspectable through Laurel Proxy.
Viewing traffic
Open the web UI from any browser:
http://<your-computer-ip>:8081Or use the CLI:
laurel-proxy requests --tailCleanup
When you are done inspecting, remove the proxy from iOS:
- Settings > Wi-Fi > (i) > Configure Proxy > Off
- Optionally remove the CA profile: Settings > General > VPN & Device Management > Laurel Proxy CA > Remove Profile
On your computer, you can uninstall the CA certificate from your system trust store:
laurel-proxy uninstall-caRelated
- Getting Started - Install and capture your first request
- CLI Reference - The trust-ca and uninstall-ca commands
- HTTP/2 Support - How ALPN negotiates each hop independently
- Capture iOS Traffic - Full walkthrough for iOS device inspection