# jbsouthe/http-breakout-proxy architecture

> Architecture diagram of the GitHub repository jbsouthe/http-breakout-proxy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jbsouthe/http-breakout-proxy
- Repository: https://github.com/jbsouthe/http-breakout-proxy

## Overview

HTTP Breakout Proxy intercepts HTTP/HTTPS traffic, captures request/response details, and serves a browser UI for live inspection and management. The main workflow runs from client traffic through proxy capture to the in-memory/persisted capture collection and live UI updates; users can then inspect, filter, annotate, export, and analyze captures. The graph also preserves documented color rules, search history, timing charts, and the analysis modules. Edges are limited to relationships shown in excerpts or stated in the README; unsampled server wiring is not inferred.

Main entry points: [`src/ui/js/main.js`](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/main.js) (UI initialization), [`src/ui/js/list.js`](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/list.js) (Capture list), [`src/ui/js/details.js`](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/details.js) (Capture details), [`src/ui/js/api.js`](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_proxy["Proxy and captures"]
  node_proxycore["HTTP/S MITM proxy<br/>[proxy.go]"]
  node_captures[("Capture collection<br/>[captures.go]")]
  node_persistence[("Capture persistence<br/>[persist.go]")]
  node_performance["Request timings<br/>[performance.go]"]
end

subgraph group_analysis["Traffic analysis"]
  node_analysisadapter["Analysis endpoints"]
  node_authanalysis["Auth and cookies<br/>[auth_cookie.go]"]
  node_fingerprints["Client fingerprints"]
  node_transitions["Error transitions"]
  node_latency["Latency metrics<br/>[latency.go]"]
  node_methodpath["Method and paths<br/>[method_path.go]"]
  node_responseprofile["Response profiles"]
  node_retry["Retry analysis<br/>[retry.go]"]
  node_sizeanalysis["Size analysis<br/>[size.go]"]
  node_temporal["Temporal analysis<br/>[temporal.go]"]
end

subgraph group_serverui["Server interface"]
  node_serverui["Embedded UI server<br/>[ui.go]"]
end

subgraph group_browserui["Browser interface"]
  node_entry["UI initialization<br/>[main.js]"]
  node_api["API client<br/>[api.js]"]
  node_state["UI state<br/>[state.js]"]
  node_list["Capture list<br/>[list.js]"]
  node_filter["Capture filtering<br/>[filter.js]"]
  node_details["Capture details<br/>[details.js]"]
  node_exports["Capture exports<br/>[exports.js]"]
  node_rules["Color rule logic<br/>[rules.js]"]
  node_rulemodal["Rule editor<br/>[modal.js]"]
  node_searchhistory["Search history<br/>[searchHistory.js]"]
  node_sse["Live updates<br/>[sse.js]"]
  node_timings["Timing charts<br/>[timings.js]"]
  node_analysisui["Analysis dashboard<br/>[analysis.js]"]
end

node_client(("HTTP client"))
node_upstream(("Origin server"))
node_operator(("Browser user"))

node_client -->|"sends traffic"| node_proxycore
node_proxycore -->|"forwards traffic"| node_upstream
node_proxycore -->|"records exchanges"| node_captures
node_captures -->|"persists captures"| node_persistence
node_operator -->|"opens interface"| node_serverui
node_serverui -->|"serves embedded UI"| node_entry
node_entry -->|"loads data"| node_api
node_entry -->|"renders captures"| node_list
node_entry -->|"selects capture"| node_details
node_entry -->|"initializes history"| node_searchhistory
node_entry -->|"starts updates"| node_sse
node_entry -->|"initializes analysis"| node_analysisui
node_api -->|"updates captures"| node_state
node_list -->|"filters captures"| node_filter
node_list -->|"finds rule"| node_rules
node_list -->|"selects capture"| node_details
node_details -->|"fetches capture"| node_api
node_details -->|"builds snippets"| node_exports
node_details -->|"finds rule"| node_rules
node_rulemodal -->|"saves rules"| node_rules
node_rulemodal -->|"refreshes list"| node_list
node_searchhistory -->|"loads searches"| node_api
node_searchhistory -->|"applies search"| node_list
node_sse -->|"updates state"| node_state
node_analysisui -.->|"requests metrics"| node_analysisadapter
node_timings -.->|"visualizes timings"| node_performance

click node_proxycore "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/proxy.go"
click node_captures "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/captures.go"
click node_persistence "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/persist.go"
click node_performance "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/performance.go"
click node_analysisadapter "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis_adapter.go"
click node_authanalysis "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/auth_cookie.go"
click node_fingerprints "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/client_fingerprint.go"
click node_transitions "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/error_transitions.go"
click node_latency "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/latency.go"
click node_methodpath "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/method_path.go"
click node_responseprofile "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/response_profile.go"
click node_retry "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/retry.go"
click node_sizeanalysis "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/size.go"
click node_temporal "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/temporal.go"
click node_serverui "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui.go"
click node_entry "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/main.js"
click node_api "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/api.js"
click node_state "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/state.js"
click node_list "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/list.js"
click node_filter "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/filter.js"
click node_details "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/details.js"
click node_exports "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/exports.js"
click node_rules "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/rules.js"
click node_rulemodal "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/modal.js"
click node_searchhistory "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/searchHistory.js"
click node_sse "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/sse.js"
click node_timings "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/timings.js"
click node_analysisui "https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/analysis.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_proxycore,node_captures,node_persistence,node_performance,node_client,node_operator toneBlue
class node_analysisadapter,node_authanalysis,node_fingerprints,node_transitions,node_latency,node_methodpath,node_responseprofile,node_retry,node_sizeanalysis,node_temporal toneAmber
class node_serverui,node_upstream toneMint
class node_entry,node_api,node_state,node_list,node_filter,node_details,node_exports,node_rules,node_rulemodal,node_searchhistory,node_sse,node_timings,node_analysisui toneRose
```

## Components

### Proxy and captures

- [HTTP/S MITM proxy](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/proxy.go): `src/proxy.go`
- [Capture collection](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/captures.go): `src/captures.go`
- [Capture persistence](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/persist.go): `src/persist.go`
- [Request timings](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/performance.go): `src/performance.go`

### Traffic analysis

- [Analysis endpoints](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis_adapter.go): `src/analysis_adapter.go`
- [Auth and cookies](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/auth_cookie.go): `src/analysis/auth_cookie.go`
- [Client fingerprints](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/client_fingerprint.go): `src/analysis/client_fingerprint.go`
- [Error transitions](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/error_transitions.go): `src/analysis/error_transitions.go`
- [Latency metrics](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/latency.go): `src/analysis/latency.go`
- [Method and paths](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/method_path.go): `src/analysis/method_path.go`
- [Response profiles](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/response_profile.go): `src/analysis/response_profile.go`
- [Retry analysis](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/retry.go): `src/analysis/retry.go`
- [Size analysis](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/size.go): `src/analysis/size.go`
- [Temporal analysis](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/analysis/temporal.go): `src/analysis/temporal.go`

### Server interface

- [Embedded UI server](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui.go): `src/ui.go`

### Browser interface

- [UI initialization](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/main.js): `src/ui/js/main.js`
- [API client](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/api.js): `src/ui/js/api.js`
- [UI state](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/state.js): `src/ui/js/state.js`
- [Capture list](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/list.js): `src/ui/js/list.js`
- [Capture filtering](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/filter.js): `src/ui/js/filter.js`
- [Capture details](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/details.js): `src/ui/js/details.js`
- [Capture exports](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/exports.js): `src/ui/js/exports.js`
- [Color rule logic](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/rules.js): `src/ui/js/rules.js`
- [Rule editor](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/modal.js): `src/ui/js/modal.js`
- [Search history](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/searchHistory.js): `src/ui/js/searchHistory.js`
- [Live updates](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/sse.js): `src/ui/js/sse.js`
- [Timing charts](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/timings.js): `src/ui/js/timings.js`
- [Analysis dashboard](https://github.com/jbsouthe/http-breakout-proxy/blob/main/src/ui/js/analysis.js): `src/ui/js/analysis.js`

### Other components

- **HTTP client**
- **Origin server**
- **Browser user**

## Connections

- HTTP client → HTTP/S MITM proxy: sends traffic (evidence: `README.md`)
- HTTP/S MITM proxy → Origin server: forwards traffic (evidence: `README.md`)
- HTTP/S MITM proxy → Capture collection: records exchanges (evidence: `README.md`)
- Capture collection → Capture persistence: persists captures (evidence: `README.md`)
- Browser user → Embedded UI server: opens interface (evidence: `README.md`)
- Embedded UI server → UI initialization: serves embedded UI (evidence: `README.md`)
- UI initialization → API client: loads data (evidence: `src/ui/js/main.js`)
- UI initialization → Capture list: renders captures (evidence: `src/ui/js/main.js`)
- UI initialization → Capture details: selects capture (evidence: `src/ui/js/main.js`)
- UI initialization → Search history: initializes history (evidence: `src/ui/js/main.js`)
- UI initialization → Live updates: starts updates (evidence: `src/ui/js/main.js`)
- UI initialization → Analysis dashboard: initializes analysis (evidence: `src/ui/js/main.js`)
- API client → UI state: updates captures (evidence: `src/ui/js/api.js`)
- Capture list → Capture filtering: filters captures (evidence: `src/ui/js/list.js`)
- Capture list → Color rule logic: finds rule (evidence: `src/ui/js/list.js`)
- Capture list → Capture details: selects capture (evidence: `src/ui/js/list.js`)
- Capture details → API client: fetches capture (evidence: `src/ui/js/details.js`)
- Capture details → Capture exports: builds snippets (evidence: `src/ui/js/details.js`)
- Capture details → Color rule logic: finds rule (evidence: `src/ui/js/details.js`)
- Rule editor → Color rule logic: saves rules (evidence: `src/ui/js/modal.js`)
- Rule editor → Capture list: refreshes list (evidence: `src/ui/js/modal.js`)
- Search history → API client: loads searches (evidence: `src/ui/js/searchHistory.js`)
- Search history → Capture list: applies search (evidence: `src/ui/js/searchHistory.js`)
- Live updates → UI state: updates state (evidence: `src/ui/js/sse.js`)
- Analysis dashboard → Analysis endpoints: requests metrics
- Timing charts → Request timings: visualizes timings
