
HTTP Proxy Analysis for reverse engineering protocol communication
A lightweight HTTP/HTTPS intercepting proxy and traffic analysis tool written in Go, with a web-based UI for inspecting, filtering, coloring, and annotating captured traffic in real time.


HTTP Breakout Proxy functions as both an HTTP and HTTPS MITM proxy and a live visualization tool.
It captures requests and responses between two software components, allowing developers to:
The proxy embeds a full-featured UI accessible from any modern web browser, enabling immediate, real-time analysis without external tools.
captures.json (or specified file).status:4 status:5 → highlights HTTP errorsurl:/api/ → highlights API requests/\.css$/ → regex match on URLmethod:GET, status:404, header:Content-Type=application/json)/login/)curl command (formatted for terminal)python requests code snippet (clean JSON representation)httpbreakout -l 127.0.0.1:8080
git clone https://github.com/jbsouthe/http-breakout-proxy.git
cd http-breakout-proxy
go build -o http-breakout-proxy
This produces a single executable that contains the compiled proxy and the embedded UI assets.
# run with defaults (proxy + UI)
./http-breakout-proxy
By default the binary binds to 127.0.0.1:8080 for proxying (and optionally UI — see CLI flags). Open the UI in a browser to inspect captures.
# send an HTTPS request via the proxy (proxy listens on 127.0.0.1:8080)
curl -x http://127.0.0.1:8080 https://example.com
Captured traffic will appear in the web UI.
Use
./http-breakout-proxy -hto list available flags and usage descriptions.
The UI is optimized for investigative workflows.
METHOD URL [STATUS] but a custom name can be assigned.curl, copy as Python requests, download response body, rename, delete.method:, status:, host:, url:, body:, req.body:, resp.body:, header:, req.header:, resp.header:./pattern/flags (for example /bearer\\s+\\S+/i).header:name=value where name or value can be regexes.Examples:
method:POST status:2 host:api.example.com/token\\s*[:=]\\s*\\S+/ireq.header:authorization=/bearer/ibody:/\\"success\\"\\s*:\\s*true/iWhen Man In The Middle mode is enabled:
-ca (default ./ca).ca.pem or similar) to the trust store of the client (or system) issuing requests. On many platforms this requires administrative privileges.Security note: Only install the CA in controlled environments. Do not trust this CA in systems where you read sensitive unrelated traffic.
If persistence is enabled (via -f or configured path):
captures.json).Captured items are serialized to JSON and contain the following fields (non-exhaustive):
id — unique sequence identifiertime — timestamp (ISO 8601)method, urlrequest_headers, response_headersrequest_body, response_body — truncated to -max-body if necessaryresponse_status, duration_msname — optional user labelnotes, deleted — control metadata for SSE events and UI statecurl command including headers and body (omits hop-by-hop headers).requests snippet with url, headers, and optional data.Content-Type when possible.Design considerations:
Host, Content-Length, Connection) are omitted from generated replay commands.GET /api/captures — list captures (JSON array).DELETE /api/captures — clear all captures.GET /api/captures/{id} — retrieve a single capture.DELETE /api/captures/{id} — delete specific capture.PATCH /api/captures/{id} — update capture metadata; body example: { "name": "My label" }.GET /api/pause — returns { "paused": true|false }.POST /api/pause — set paused state; body example: { "paused": true }.GET /events — Server-Sent Events (SSE) stream for live capture notifications and control events.//go:embed ui/* and fs.Sub to serve static files. This produces a single deployable artifact.Content-Encoding and attempts to decompress gzip and deflate bodies before display. The original bytes are retained for proxy transparency.io.LimitReader to detect truncation and protect memory usage.Recommended distribution model:
CGO_ENABLED=0, -trimpath, -ldflags "-s -w")..tar.gz for Unix, .zip for Windows) and include README.md and LICENSE.goreleaser to automate cross-platform builds and release artifacts.Example build commands:
# Linux x86_64
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o dist/http-breakout-proxy-linux-amd64 .
# macOS (arm64)
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o dist/http-breakout-proxy-darwin-arm64 .
[Unit]
Description=HTTP Breakout Proxy
After=network.target
[Service]
ExecStart=/opt/http-breakout-proxy/http-breakout-proxy -l 0.0.0.0:8080
Restart=on-failure
User=proxy
Group=proxy
[Install]
WantedBy=multi-user.target
Create a plist in ~/Library/LaunchAgents and load with launchctl.
Captured body appears as binary gibberish
The body is compressed (e.g., gzip). Ensure you are running a build that includes automatic decompression; the UI shows decompressed JSON/text when available.
HTTPS traffic not displayed / connection errors
The client does not trust the generated CA. Install ca/ca.pem into the client/system trust store and mark as trusted for TLS interception.
UI shows stale selection after clearing captures
Upgrade to a client that clears selectedId on cleared SSE events or invoke the GET /api/captures endpoint to refresh state.
405 on DELETE /api/captures
Ensure the server handler accepts DELETE for /api/captures and you are not hitting a trailing-slash mismatch.
This tool performs TLS interception when MITM is enabled. Use it only in controlled environments where you have explicit authorization to inspect traffic. The generated CA is powerful: treat its private key with the same confidentiality as any other root CA private key. Do not install the CA in shared or production trust stores.
Contributions are welcome. Please open issues for bugs or feature requests. For code contributions:
This project is distributed under the MIT License. See LICENSE for details.
Author: John Southerland (GitHub: jbsouthe)
Project: http-breakout-proxy — intended for debugging, development, and learning about HTTP behavior.
| Flag | Default | Description |
|---|
-l | 127.0.0.1:8080 | Address for the proxy to listen on as well as a UI app. |
-mitm | true | Enable HTTPS Man In The Middle mode (MITM) interception (generates a local CA for intercepting TLS). |
-ca | ./ca | Directory in which generated CA certificate and key are stored when MITM is enabled and persistence is chosen. |
-f | ./captures.json | Optional path or directory for persisting captures to disk (e.g., ./captures.json). |
-max-body | 1048576 | Maximum number of bytes (per body) to store/display; larger bodies are truncated with a sentinel. |
-buffer-size | 1000 | Circular buffer capacity for in-memory captures. |
-v | false | Enable verbose logging for debugging. |