# yashvirgaming/http-debugger-lite architecture

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

- Interactive diagram: https://gitdiagram.com/yashvirgaming/http-debugger-lite
- Repository: https://github.com/yashvirgaming/http-debugger-lite

## Overview

#### Purpose and Entry Point
HTTP Debugger Lite is a Windows desktop HTTP/HTTPS inspection application. It captures live traffic, MITM-decrypts HTTPS through a local proxy, and presents sessions in a PySide6 interface. Application startup is `main.py`; elevation requirements are represented by `admin.manifest`.

#### Application Orchestration
The main window coordinates capture lifecycle, session display, filtering, selection, and cleanup. It starts/stops capture backends, receives captured sessions through application signals, and restores system state on shutdown.
Paths: `main.py`, `gui/main_window.py`, `utils/signals.py`.

#### Capture Backends and Protocol Pipeline
Capture is separated from UI and supports two likely acquisition paths: a mitmproxy-based local proxy for HTTP/HTTPS interception and WinDivert-based packet capture. Captured bytes are reassembled into streams, parsed as HTTP, and recognized/classified before becoming application sessions.
Paths: `capture/capture_manager.py`, `capture/mitm_capture.py`, `capture/windivert_capture.py`, `capture/stream_reassembler.py`, `capture/packet_parser.py`.

#### HTTPS MITM and Windows Network Control
The HTTPS boundary is the MITM proxy: its addon observes intercepted requests/responses, while a manager owns proxy/certificate/backend lifecycle. Windows proxy settings are enabled for capture and must be restored after capture stops. Administrative execution is material for certificate installation and proxy control.
Paths: `capture/mitm_addon.py`, `utils/mitm_manager.py`, `utils/proxy_manager.py`.

#### Session Domain and Retention
Core models represent request/response/session data passed from capture to presentation. A session store provides the retained traffic dataset, while filters and formatting/highlighting derive view-ready values without making the GUI responsible for protocol parsing.
Paths: `core/models.py`, `core/session_store.py`, `core/filters.py`, `core/formatter.py`, `core/highlighter.py`.

#### Desktop Presentation and Inspection
The PySide6 UI presents a real-time request table and details panes for selected sessions. Request and response tabs expose headers, body/content, and raw data; response rendering includes formatted data, HTML/browser preview, and image preview. The filter bar narrows the session view and the status bar communicates runtime state.
Paths: `gui/request_table.py`, `gui/request_tabs.py`, `gui/response_tabs.py`, `gui/filter_bar.py`, `gui/status_bar.py`.

#### Primary Flow and Runtime Dependencies
Control flow is: launch → initialize GUI/capture manager → start MITM backend and Windows proxy → intercepted traffic enters addon/capture pipeline → parsed session is emitted to the UI → stored, filtered, and rendered incrementally → stop/exit tears down backend and restores proxy settings. Material runtime dependencies are Python, PySide6, Qt WebEngine for embedded HTML rendering, mitmproxy for HTTPS interception, and Windows/WinDivert capabilities for packet capture. Dependencies are declared in `requirements.txt`; installer branding assets are under `assets/`.

Main entry points: [`gui/main_window.py`](https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/main_window.py) (Main window), [`capture/capture_manager.py`](https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/capture_manager.py) (Capture manager), [`capture/mitm_capture.py`](https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/mitm_capture.py) (MITM capture backend), [`utils/mitm_manager.py`](https://github.com/yashvirgaming/http-debugger-lite/blob/main/utils/mitm_manager.py) (MITM manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Startup &amp; Windows"]
  node_entry["Application entry<br/>Python entry point<br/>[main.py]"]
  node_manifest["Admin manifest<br/>Windows elevation<br/>[admin.manifest]"]
  node_mitm_manager["MITM manager<br/>proxy and certificate lifecycle<br/>[mitm_manager.py]"]
  node_proxy_manager["Windows proxy manager<br/>system network control<br/>[proxy_manager.py]"]
end

subgraph group_capture["Capture Pipeline"]
  node_capture_manager["Capture manager<br/>backend coordinator<br/>[capture_manager.py]"]
  node_mitm_capture["MITM capture backend<br/>local proxy capture<br/>[mitm_capture.py]"]
  node_mitm_addon{{"MITM addon<br/>mitmproxy hook<br/>[mitm_addon.py]"}}
  node_windivert_capture["WinDivert capture backend<br/>packet capture"]
  node_reassembler["Stream reassembler<br/>TCP stream assembly"]
  node_packet_parser["HTTP parser<br/>protocol parser<br/>[packet_parser.py]"]
end

subgraph group_domain["Sessions &amp; Views"]
  node_models["Session models<br/>traffic domain model<br/>[models.py]"]
  node_session_store[("Session store<br/>retained traffic dataset<br/>[session_store.py]")]
  node_filters["Filters<br/>session view filtering<br/>[filters.py]"]
  node_presentation["Formatting &amp; highlighting<br/>view derivation<br/>[formatter.py]"]
end

subgraph group_ui["Desktop UI"]
  node_main_window["Main window<br/>PySide6 orchestrator<br/>[main_window.py]"]
  node_signals["Application signals<br/>event bridge<br/>[signals.py]"]
  node_request_table["Request table<br/>live session list<br/>[request_table.py]"]
  node_filter_bar["Filter bar<br/>filter controls<br/>[filter_bar.py]"]
  node_inspection_tabs["Request &amp; response tabs<br/>session inspector<br/>[response_tabs.py]"]
  node_status_bar["Status bar<br/>runtime status<br/>[status_bar.py]"]
end

node_entry -->|"launches"| node_main_window
node_manifest -.->|"permits elevation"| node_mitm_manager
node_main_window -->|"start / stop"| node_capture_manager
node_main_window -->|"subscribes"| node_signals
node_capture_manager -->|"selects"| node_mitm_capture
node_capture_manager -->|"selects"| node_windivert_capture
node_mitm_capture -->|"uses"| node_mitm_manager
node_mitm_manager -->|"configures"| node_proxy_manager
node_mitm_capture -->|"loads"| node_mitm_addon
node_mitm_addon -->|"intercepted HTTP"| node_packet_parser
node_windivert_capture -->|"packets"| node_reassembler
node_reassembler -->|"streams"| node_packet_parser
node_packet_parser -->|"builds sessions"| node_models
node_models -->|"emits sessions"| node_signals
node_signals -->|"adds sessions"| node_session_store
node_session_store -->|"session dataset"| node_filters
node_filters -->|"matching sessions"| node_presentation
node_presentation -->|"renders rows"| node_request_table
node_request_table -->|"selected session"| node_inspection_tabs
node_filter_bar -->|"filter criteria"| node_filters
node_main_window -->|"runtime state"| node_status_bar
node_main_window -->|"restores on exit"| node_proxy_manager

click node_entry "https://github.com/yashvirgaming/http-debugger-lite/blob/main/main.py"
click node_manifest "https://github.com/yashvirgaming/http-debugger-lite/blob/main/admin.manifest"
click node_main_window "https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/main_window.py"
click node_signals "https://github.com/yashvirgaming/http-debugger-lite/blob/main/utils/signals.py"
click node_capture_manager "https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/capture_manager.py"
click node_mitm_capture "https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/mitm_capture.py"
click node_mitm_addon "https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/mitm_addon.py"
click node_mitm_manager "https://github.com/yashvirgaming/http-debugger-lite/blob/main/utils/mitm_manager.py"
click node_proxy_manager "https://github.com/yashvirgaming/http-debugger-lite/blob/main/utils/proxy_manager.py"
click node_windivert_capture "https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/windivert_capture.py"
click node_reassembler "https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/stream_reassembler.py"
click node_packet_parser "https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/packet_parser.py"
click node_models "https://github.com/yashvirgaming/http-debugger-lite/blob/main/core/models.py"
click node_session_store "https://github.com/yashvirgaming/http-debugger-lite/blob/main/core/session_store.py"
click node_filters "https://github.com/yashvirgaming/http-debugger-lite/blob/main/core/filters.py"
click node_presentation "https://github.com/yashvirgaming/http-debugger-lite/blob/main/core/formatter.py"
click node_request_table "https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/request_table.py"
click node_filter_bar "https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/filter_bar.py"
click node_inspection_tabs "https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/response_tabs.py"
click node_status_bar "https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/status_bar.py"

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_entry,node_manifest,node_mitm_manager,node_proxy_manager toneBlue
class node_capture_manager,node_mitm_capture,node_mitm_addon,node_windivert_capture,node_reassembler,node_packet_parser toneAmber
class node_models,node_session_store,node_filters,node_presentation toneMint
class node_main_window,node_signals,node_request_table,node_filter_bar,node_inspection_tabs,node_status_bar toneRose
```

## Components

### Startup & Windows

- [Application entry](https://github.com/yashvirgaming/http-debugger-lite/blob/main/main.py): Python entry point · `main.py`
- [Admin manifest](https://github.com/yashvirgaming/http-debugger-lite/blob/main/admin.manifest): Windows elevation · Enables privileged certificate and proxy operations. · `admin.manifest`
- [MITM manager](https://github.com/yashvirgaming/http-debugger-lite/blob/main/utils/mitm_manager.py): proxy and certificate lifecycle · `utils/mitm_manager.py`
- [Windows proxy manager](https://github.com/yashvirgaming/http-debugger-lite/blob/main/utils/proxy_manager.py): system network control · Enables and restores Windows proxy settings. · `utils/proxy_manager.py`

### Capture Pipeline

- [Capture manager](https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/capture_manager.py): backend coordinator · Starts and stops the configured acquisition backend. · `capture/capture_manager.py`
- [MITM capture backend](https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/mitm_capture.py): local proxy capture · `capture/mitm_capture.py`
- [MITM addon](https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/mitm_addon.py): mitmproxy hook · Observes intercepted HTTP and HTTPS requests and responses. · `capture/mitm_addon.py`
- [WinDivert capture backend](https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/windivert_capture.py): packet capture · `capture/windivert_capture.py`
- [Stream reassembler](https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/stream_reassembler.py): TCP stream assembly · `capture/stream_reassembler.py`
- [HTTP parser](https://github.com/yashvirgaming/http-debugger-lite/blob/main/capture/packet_parser.py): protocol parser · Recognizes and classifies HTTP traffic. · `capture/packet_parser.py`

### Sessions & Views

- [Session models](https://github.com/yashvirgaming/http-debugger-lite/blob/main/core/models.py): traffic domain model · Defines request, response, and session data. · `core/models.py`
- [Session store](https://github.com/yashvirgaming/http-debugger-lite/blob/main/core/session_store.py): retained traffic dataset · `core/session_store.py`
- [Filters](https://github.com/yashvirgaming/http-debugger-lite/blob/main/core/filters.py): session view filtering · `core/filters.py`
- [Formatting & highlighting](https://github.com/yashvirgaming/http-debugger-lite/blob/main/core/formatter.py): view derivation · Produces display-ready session values. · `core/formatter.py`

### Desktop UI

- [Main window](https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/main_window.py): PySide6 orchestrator · Coordinates capture lifecycle, session display, and shutdown cleanup. · `gui/main_window.py`
- [Application signals](https://github.com/yashvirgaming/http-debugger-lite/blob/main/utils/signals.py): event bridge · Delivers captured sessions to the interface. · `utils/signals.py`
- [Request table](https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/request_table.py): live session list · `gui/request_table.py`
- [Filter bar](https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/filter_bar.py): filter controls · `gui/filter_bar.py`
- [Request & response tabs](https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/response_tabs.py): session inspector · Shows headers, body, raw data, and response previews. · `gui/response_tabs.py`
- [Status bar](https://github.com/yashvirgaming/http-debugger-lite/blob/main/gui/status_bar.py): runtime status · `gui/status_bar.py`

## Connections

- Application entry → Main window: launches
- Admin manifest → MITM manager: permits elevation
- Main window → Capture manager: start / stop
- Main window → Application signals: subscribes
- Capture manager → MITM capture backend: selects
- Capture manager → WinDivert capture backend: selects
- MITM capture backend → MITM manager: uses
- MITM manager → Windows proxy manager: configures
- MITM capture backend → MITM addon: loads
- MITM addon → HTTP parser: intercepted HTTP
- WinDivert capture backend → Stream reassembler: packets
- Stream reassembler → HTTP parser: streams
- HTTP parser → Session models: builds sessions
- Session models → Application signals: emits sessions
- Application signals → Session store: adds sessions
- Session store → Filters: session dataset
- Filters → Formatting & highlighting: matching sessions
- Formatting & highlighting → Request table: renders rows
- Request table → Request & response tabs: selected session
- Filter bar → Filters: filter criteria
- Main window → Status bar: runtime state
- Main window → Windows proxy manager: restores on exit
