High-performance MitM proxy with HAR capture and response mutation. Drop-in replacement for BrowserMob Proxy, written in Rust.
Everything you need to intercept, capture, and transform HTTP traffic.
Full compatibility with all 25+ BMP endpoints. Swap the binary and keep your existing test suite unchanged.
Record HTTP Archive (HAR 1.2) files with full request/response details, timing, headers, and content. Page refs supported.
Mutate JSON response bodies using JSONPath selectors. Set, replace, or delete values deep within API responses on the fly.
Rewrite HTML responses with CSS selectors powered by lol_html. Set text, attributes, or inject content at streaming speed.
Simple find-and-replace across response bodies. Supports plain text matching for quick content overrides.
Write JavaScript transform functions that run in a secure, sandboxed V8 isolate. Full programmatic control over response mutation.
Generate realistic fake names, emails, addresses, phone numbers, and more using built-in data generators. Perfect for test fixtures.
Whitelist or blacklist URLs with regex patterns and HTTP status codes. Control exactly which traffic flows through.
Throttle downstream/upstream bandwidth and add latency to simulate slow networks. Configurable per proxy session.
Every BMP endpoint is supported, plus powerful new mutation capabilities.
| Endpoint | Method | BrowserMob Proxy | har-capture-proxy |
|---|---|---|---|
| Proxy Lifecycle | |||
| /proxy | POST | ✓ | ✓ |
| /proxy | GET | ✓ | ✓ |
| /proxy/{port} | DELETE | ✓ | ✓ |
| HAR Capture | |||
| /proxy/{port}/har | PUT | ✓ | ✓ |
| /proxy/{port}/har | GET | ✓ | ✓ |
| /proxy/{port}/har/pageRef | PUT | ✓ | ✓ |
| Headers & Auth | |||
| /proxy/{port}/headers | POST | ✓ | ✓ |
| /proxy/{port}/auth/basic/{domain} | POST | ✓ | ✓ |
| URL Filtering | |||
| /proxy/{port}/whitelist | PUT | ✓ | ✓ |
| /proxy/{port}/whitelist | DELETE | ✓ | ✓ |
| /proxy/{port}/blacklist | PUT | ✓ | ✓ |
| Network Configuration | |||
| /proxy/{port}/limit | PUT | ✓ | ✓ |
| /proxy/{port}/timeout | PUT | ✓ | ✓ |
| /proxy/{port}/hosts | POST | ✓ | ✓ |
| /proxy/{port}/retry | PUT | ✓ | ✓ |
| /proxy/{port}/rewrite | PUT | ✓ | ✓ |
| /proxy/{port}/dns/cache | DELETE | ✓ | ✓ |
| /proxy/{port}/wait | PUT | ✓ | ✓ |
| Request & Response Filters | |||
| /proxy/{port}/filter/request | POST | ✓ | ✓ |
| /proxy/{port}/filter/response | POST | ✓ | ✓ |
| Response Mutation Rules | |||
| /proxy/{port}/rules | POST | ✗ | ✓New |
| /proxy/{port}/rules | GET | ✗ | ✓New |
| /proxy/{port}/rules | DELETE | ✗ | ✓New |
Built in Rust for speed, safety, and minimal resource usage.
Up and running in under a minute.
Grab the latest release for your platform from GitHub.
# macOS (Apple Silicon)
curl -L https://github.com/jaygen/har-capture-proxy/releases/latest/download/har-capture-proxy-aarch64-apple-darwin \
-o har-capture-proxy && chmod +x har-capture-proxy
# Linux (x86_64)
curl -L https://github.com/jaygen/har-capture-proxy/releases/latest/download/har-capture-proxy-x86_64-unknown-linux-gnu \
-o har-capture-proxy && chmod +x har-capture-proxy
Launch the REST API on the control port.
./har-capture-proxy --port 8080
POST to /proxy to spin up a new proxy listener.
curl -X POST http://localhost:8080/proxy
# {"port": 8081}
Point your HTTP proxy to localhost:8081 and install the CA cert from ~/.har-capture-proxy/.
# The CA certificate is auto-generated at:
# ~/.har-capture-proxy/har-capture-proxy-ca.pem
# Common Name: "har-capture-proxy CA"
Start recording, browse, then retrieve the HAR file.
# Start HAR capture
curl -X PUT http://localhost:8080/proxy/8081/har
# ... drive your browser / run tests ...
# Retrieve HAR
curl http://localhost:8080/proxy/8081/har -o capture.har
Three steps to switch. No code changes required for standard usage.
Swap your BMP JAR + JVM with the single har-capture-proxy binary. Same --port flag, same REST API.
Install the auto-generated CA cert from ~/.har-capture-proxy/har-capture-proxy-ca.pem into your browser or test framework trust store.
All BMP REST endpoints are compatible. Your existing Selenium, Playwright, or HTTP client code works without changes.