Skip to main content

Interactive HTTP/HTTPS debugging proxy with runtime policies and terminal UI.

Project description

proxyscope

proxyscope is an interactive HTTP/HTTPS proxy for request inspection, response editing, static-response policies, and live runtime control in a terminal UI.

Highlights

  • Forward HTTP requests through an upstream connection.
  • Handle HTTPS via CONNECT and optional TLS interception (MITM).
  • Group request/response logs by request id.
  • Inspect request/response details in a TUI.
  • Edit matching responses in an external editor.
  • Persist runtime configuration and policy rules.
  • Replay captured requests.

Requirements

  • Python 3.13+
  • Poetry 2.x

Installation

poetry install

Run

poetry run proxyscope --host 127.0.0.1 --port 8080

With persisted runtime configuration:

poetry run proxyscope --config ./runtime-config.json

Without TUI:

poetry run proxyscope --no-ui

Runtime Commands (TUI)

  • help
  • clear
  • sites
  • loglevel <DEBUG|INFO|WARNING|ERROR>
  • filter [show|clear|host|method|status|text] ...
  • find <text>|clear
  • export <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

Keyboard Shortcuts (TUI)

  • Left / Right: Focus zwischen Panels wechseln.
  • Up / Down: Auswahl bewegen oder vertikal scrollen (abhängig vom aktiven Panel).
  • PageUp / PageDown: Schnelles vertikales Scrollen.
  • Enter: Request-Detail für den ausgewählten Request öffnen (oder Kommando ausführen, wenn Eingabezeile befüllt ist).
  • Enter im Policies-Tab: Ausgewählte Policy im externen Editor öffnen.
  • Backspace: Zeichen in der Kommandozeile löschen.
  • Tab / Shift+Tab: Vorwärts oder rückwärts durch Requests, Detail-Tabs, Sidebar-Tabs und Kommandozeile wechseln.
  • Shift+B: Request-Detail schließen, zurück zur Request-Liste.
  • Shift+S: Rechtes Panel auf Sites schalten; bei erneutem Drücken im Sites-Tab wird die Sidebar ausgeblendet.
  • Shift+P: Rechtes Panel auf Policies schalten.
  • Shift+M: Ausgewählten Request als Editor-Policy (METHOD + URL) hinzufügen.
  • Shift+R: Ausgewählten Request editieren und erneut senden.
  • Shift+A: Ausgewählte Site zur Log-Whitelist hinzufügen (Sites-Tab).
  • Shift+D: Ausgewählte Policy deaktivieren (Policies-Tab).
  • Shift+E: Ausgewählte Policy aktivieren (Policies-Tab).
  • Shift+I: Ausgewählte Policy bearbeiten (Policies-Tab).
  • Shift+U: Ausgewählte Site aus der Log-Whitelist entfernen (Sites-Tab).
  • Shift+X: Ausgewählte Policy entfernen (Policies-Tab).

Hinweis: Buchstaben-Shortcuts werden nur als Shift-Kombination verarbeitet (Shift+M entspricht M).

TLS Interception (MITM)

On startup, proxyscope now auto-creates local CA materials under certs/ca if they are missing. Import certs/ca/mitm-ca.crt into your browser trust store for local testing.

To regenerate CA files, delete the existing cert material and restart proxyscope:

rm -f certs/ca/mitm-ca.key.pem certs/ca/mitm-ca.cert.pem certs/ca/mitm-ca.crt certs/ca/mitm-ca.cnf certs/hosts/*.pem certs/hosts/*.srl

Tests

poetry run python -m unittest discover -s tests -p "test_*.py" -v

Release / Publish

1. Bump Version

poetry version patch
# or: poetry version minor / poetry version major

2. Validate + Build

poetry check
poetry build

3. Configure PyPI Token

Either use an environment variable:

export POETRY_PYPI_TOKEN_PYPI="pypi-..."

or persistent Poetry config:

poetry config pypi-token.pypi "pypi-..."

4. Publish to PyPI

poetry publish --no-interaction

Alternative:

./scripts/publish_pypi.sh

5. Install from PyPI (verification)

pip install proxyscope

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proxyscope-0.1.2a0.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

proxyscope-0.1.2a0-py3-none-any.whl (62.8 kB view details)

Uploaded Python 3

File details

Details for the file proxyscope-0.1.2a0.tar.gz.

File metadata

  • Download URL: proxyscope-0.1.2a0.tar.gz
  • Upload date:
  • Size: 47.7 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

Hashes for proxyscope-0.1.2a0.tar.gz
Algorithm Hash digest
SHA256 24da83e84302a2cef8250f5d2ed4dbf2c0d0d863f7eb6c548e725d8c4cca7606
MD5 e363c4d4ba5cb73dde8e1743ce334d93
BLAKE2b-256 58595e66d1932ffba91186637ef144c98bc182244059ae525958084f9183b0c1

See more details on using hashes here.

File details

Details for the file proxyscope-0.1.2a0-py3-none-any.whl.

File metadata

  • Download URL: proxyscope-0.1.2a0-py3-none-any.whl
  • Upload date:
  • Size: 62.8 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

Hashes for proxyscope-0.1.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 02457451e3bfc962a8e2cd199b88f234f55b25ec4070d337c0593c5b22bcb067
MD5 d38f83e10f7e7a9e9ce1587e23438b04
BLAKE2b-256 08f25cda95d52574a3cadd7ec25416e0422cc3193fd1d0046cd346c77674cecc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page