δΈζ | English
Convert mitmproxy flows to Chrome-like waterfall charts for visualization.
Features:
- π Support
.mitmand HAR file input - π Automatically capture HTTP requests from Python scripts
- π Generate Chrome-style waterfall chart visualizations
- π Built-in web server for real-time visualization
- π Powerful filtering and sorting capabilities
# Clone the repository
git clone https://github.com/chokwinlee/mitm-cascade.git
cd mitm-cascade
# Using uv (recommended)
uv venv
source .venv/bin/activate
uv pip install -e .
# Or using pip
pip install -e .pip install -e ".[dev]"mitm-cascade input.mitm --format json --out cascade.json# Run Python script and automatically capture HTTP requests
mitm-cascade python -m examples.test_requests --format json
# Or run script file directly
mitm-cascade python examples/test_requests.py --format json
# Start web server for visualization
mitm-cascade python examples/test_requests.py --serveCommon Options:
--format: Output format,jsonorperf-cascade(default:json)--out: Output file path (default: stdout)--filter-url <regex>: Filter entries by URL regex pattern--filter-method <GET|POST|...>: Filter entries by HTTP method--sort <start|duration>: Sort entries by field (default:start)--limit N: Limit number of entries to output--serve: Start web server for visualization (auto-opens browser)--serve-port <port>: Port for web visualization server (default: 18000)
Python Capture Mode Options:
--proxy-port <port>: Port for mitmproxy to listen on (default: 8080)--timeout <seconds>: Timeout for script execution
# Export to JSON
mitm-cascade sample.mitm --format json --out output.json
# Export to perf-cascade format
mitm-cascade sample.mitm --format perf-cascade --out cascade.json
# Filter specific URLs
mitm-cascade sample.mitm --filter-url ".*\.js$" --format json
# Show only GET requests
mitm-cascade sample.mitm --filter-method GET --format json# Capture script requests and export to JSON
mitm-cascade python examples/test_requests.py --format json --out output.json
# Run as module
mitm-cascade python -m examples.test_requests --format json
# Start web visualization (auto-opens browser)
mitm-cascade python examples/test_requests.py --serve
# Specify proxy port
mitm-cascade python examples/test_requests.py --proxy-port 8081 --format jsonmitm_cascade/
βββ cli.py # CLI entry point
βββ capture.py # Python script capture
βββ server.py # Web visualization server
βββ reader/
β βββ __init__.py
β βββ mitm_reader.py # mitm file parser
β βββ har_reader.py # HAR file parser
βββ model/
β βββ __init__.py
β βββ cascade_entry.py # Data model
βββ exporter/
β βββ __init__.py
β βββ json_exporter.py # JSON export
β βββ perf_cascade_exporter.py # perf-cascade export
βββ tests/
βββ test_mitm_reader.py
βββ test_har_reader.py
βββ test_exporter.py
βββ fixtures/ # Test data
pip install -e ".[dev]"pytestblack mitm_cascade testsmypy mitm_cascadeThe project includes example files in the examples/ directory:
# Use sample HAR file
mitm-cascade examples/sample.har --format json --out output.json- Read Input: Auto-detect
.mitmor.harfile format - Parse Flows: Extract timing information for each HTTP request
- Normalize Model: Convert to unified
CascadeEntrydata model - Export Format: Support JSON and perf-cascade compatible formats
Each cascade entry contains:
id: Unique identifierurl: Request URLmethod: HTTP methodstartTime: Start time (milliseconds since epoch)duration: Total duration (milliseconds)timings: Detailed timing breakdownblocked: Blocking timedns: DNS lookup timeconnect: TCP connection timessl: SSL/TLS handshake timesend: Request send timewait: Wait time (TTFB - Time To First Byte)receive: Response receive time
- mitmproxy files may not contain all timing information; the tool will estimate when possible
- HAR files must conform to HAR 1.2 specification
- Some edge cases (e.g., missing responses) may not be fully handled
Contributions are welcome! Please see CONTRIBUTING.md for details.
This project is licensed under the MIT License. See LICENSE file for details.
- mitmproxy - Interactive HTTP(S) proxy
- perf-cascade - Performance waterfall visualization
Thanks to all contributors and users for their support!