Interactive HTTP/HTTPS debugging proxy with runtime policies and terminal UI.
Project description
proxyscope
proxyscope is an interactive HTTP/HTTPS debugging proxy with a terminal UI.
It supports request/response inspection, response editing, replay, and both static and editor-based policy rules.
Features
- HTTP forward proxy and HTTPS via
CONNECT - Optional TLS interception (MITM) with a local CA
- Runtime control directly in the TUI
- Request/response log with details, filters, export (
json,har), and session persistence - Policy type
open_editor(manually edit responses) - Policy type
static_response(serve static responses)
Requirements
- Python
>=3.13 - Poetry
2.x(for development)
Installation
From the repository (recommended for development):
git clone <repo-url>
cd proxyscope
poetry install
Install from PyPI:
pip install proxyscope
Start
Default start:
poetry run proxyscope --host 127.0.0.1 --port 8080
With a static configuration file:
poetry run proxyscope --config ./runtime-config.json
Without TUI:
poetry run proxyscope --no-ui
Available CLI options:
--host <ip-or-hostname>--port <port>--config <path>--mitm on|off--certs-dir <path>--no-ui
Use Proxy With A Client
Example with curl:
curl -x http://127.0.0.1:8080 http://httpbin.org/get
curl -x http://127.0.0.1:8080 https://httpbin.org/get
Screenshots
Overview
Request Detail
Policies Sidebar
Regenerate screenshots:
poetry run python scripts/generate_readme_screenshots.py
Runtime Commands (TUI)
help,?clearsitesloglevel <DEBUG|INFO|WARNING|ERROR>filter [show|clear|host|method|status|text] ...find <text>find clearexport <json|har> <path>session <save|load> <path>mitm [show|on|off|certs-dir <path>]whitelist [show|add|remove|clear] ...cache [show|on|off|toggle]config [show|save [path]|reload]policy [show|add-editor|add-editor-prefix|remove-editor|clear-editor|add-static|add-static-prefix|set-priority|edit|remove|enable|disable] ...quit,exit,q
Keyboard Shortcuts (TUI)
Tab/Shift+Tab: Cycle focus through panesEnter: Open request detail or execute the current command inputShift+S: Toggle sidebar (Sites)Shift+P: Open Policies sidebarShift+B: Go back in the current viewShift+M: Create an editor policy from the selected requestShift+R: Edit and resend the selected requestShift+A/Shift+U: Add/remove selected site to/from whitelistShift+D/Shift+E: Disable/enable selected policyShift+I: Open selected policy in external editorShift+X: Remove selected policy
Static Configuration (runtime-config.json)
The file can be loaded at startup via --config.
If a config_path is attached, many runtime changes are automatically persisted to this file.
Example:
{
"schema_version": 1,
"settings": {
"log_level": "INFO",
"log_whitelist": ["api.example.com", "service.internal"],
"cache_invalidation_enabled": true,
"mitm_enabled": true,
"mitm_certs_dir": "certs"
},
"policy_shortcuts": [
{
"name": "health-static",
"match": "GET https://service.internal/health",
"priority": 20,
"respond": {
"status": 200,
"headers": {
"Cache-Control": "no-store"
},
"json": {
"status": "ok",
"source": "proxyscope"
}
}
},
{
"name": "edit-login-response",
"match": "POST https://api.example.com/v1/login*",
"priority": 10,
"action": "open_editor"
}
]
}
policy_shortcuts is intended for demos and replay setups. A trailing *
creates a prefix match. Static responses support respond.body or
respond.json. When the config is saved, shortcuts are converted to the
canonical typed policies format.
Files without schema_version use the previous format and are migrated
automatically when next saved.
Start with file:
poetry run proxyscope --config ./runtime-config.json
MITM / Certificates
On startup, proxyscope automatically creates missing CA files under <mitm_certs_dir>/ca.
For HTTPS interception, the root certificate <mitm_certs_dir>/ca/mitm-ca.crt must be trusted by your client/browser.
Tests
poetry run python -m unittest discover -s tests -p "test_*.py" -v
Architecture And Quality Checks
The current architecture, module boundaries, and refactoring roadmap are
documented under docs/architecture/ and
docs/architecture-refactoring-plan.md.
Run the local quality gates:
poetry check
poetry run ruff format --check proxyscope tests scripts
poetry run ruff check proxyscope tests scripts
poetry run pyright
poetry run coverage run -m unittest discover -s tests -p "test_*.py"
poetry run coverage report
poetry build
License
MIT, see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file proxyscope-0.2.0.tar.gz.
File metadata
- Download URL: proxyscope-0.2.0.tar.gz
- Upload date:
- Size: 61.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.13.12 Linux/6.6.87.2-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
170610f5650a08f39e993838de2d3804d8e4928fa7b12eb8d74581d791fe4b44
|
|
| MD5 |
171bd5ef5bec67691cec7387bb8d0489
|
|
| BLAKE2b-256 |
471a8fd1458255728d56f0b0c0f0d2707283b101b39c673089fb189aab9d1efa
|
File details
Details for the file proxyscope-0.2.0-py3-none-any.whl.
File metadata
- Download URL: proxyscope-0.2.0-py3-none-any.whl
- Upload date:
- Size: 91.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.13.12 Linux/6.6.87.2-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb5d4a58597c58768a5d0e92289369b82a84b7852235782d3ccd318fd0b1b301
|
|
| MD5 |
7b0d85532a18f7a6f0d04d72e6cfb373
|
|
| BLAKE2b-256 |
9117ee8414b485c60e3e0b478eaa6e5d807e65cb6a7b5137b1a3b887b9ebbd66
|