How yashvirgaming/http-debugger-lite works
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: main_window.py Main window · capture_manager.py Capture manager · mitm_capture.py MITM capture backend · mitm_manager.py MITM manager
Components 20
Startup & Windows
- Application entry
main.py - Admin manifest · Enables privileged certificate and proxy operations.
admin.manifest - MITM manager
utils/mitm_manager.py - Windows proxy manager · Enables and restores Windows proxy settings.
utils/proxy_manager.py
Capture Pipeline
- Capture manager · Starts and stops the configured acquisition backend.
capture/capture_manager.py - MITM capture backend
capture/mitm_capture.py - MITM addon · Observes intercepted HTTP and HTTPS requests and responses.
capture/mitm_addon.py - WinDivert capture backend
capture/windivert_capture.py - Stream reassembler
capture/stream_reassembler.py - HTTP parser · Recognizes and classifies HTTP traffic.
capture/packet_parser.py
Sessions & Views
- Session models · Defines request, response, and session data.
core/models.py - Session store
core/session_store.py - Filters
core/filters.py - Formatting & highlighting · Produces display-ready session values.
core/formatter.py
Desktop UI
- Main window · Coordinates capture lifecycle, session display, and shutdown cleanup.
gui/main_window.py - Application signals · Delivers captured sessions to the interface.
utils/signals.py - Request table
gui/request_table.py - Filter bar
gui/filter_bar.py - Request & response tabs · Shows headers, body, raw data, and response previews.
gui/response_tabs.py - Status bar
gui/status_bar.py
Connections 22
- 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