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>
  • whitelist [show|add|remove|clear] ...
  • cache [show|on|off|toggle]
  • config [show|save [path]|reload]
  • policy [show|add-editor|add-static|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).
  • Backspace: Zeichen in der Kommandozeile löschen.
  • Tab / Shift+Tab: Im Request-Detail zwischen Request und Response Tab wechseln.
  • Shift+B: Request-Detail schließen, zurück zur Request-Liste.
  • Shift+P: Rechtes Panel auf Policies fokussieren.
  • Shift+S: Rechtes Panel auf Sites fokussieren.
  • Shift+V: Rechtes Panel ein-/ausblenden.
  • Shift+M: Ausgewählten Request als Editor-Policy (METHOD + URL) hinzufügen.
  • Shift+R: Ausgewählten Request editieren und erneut senden.
  • Shift+T: Im Request-Detail zwischen Request und Response Tab wechseln.
  • Shift+A: Ausgewählte Site zur Log-Whitelist hinzufügen (Sites-Tab).
  • Shift+D: Ausgewählte Site aus der Log-Whitelist entfernen (Sites-Tab).
  • Shift+E: Ausgewählte Policy aktivieren (Policies-Tab).
  • Shift+D: Ausgewählte Policy deaktivieren (Policies-Tab).
  • Shift+I: Ausgewählte Policy bearbeiten (Policies-Tab).
  • Shift+X: Ausgewählte Policy entfernen (Policies-Tab).

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.1.tar.gz (40.5 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.1-py3-none-any.whl (54.1 kB view details)

Uploaded Python 3

File details

Details for the file proxyscope-0.1.1.tar.gz.

File metadata

  • Download URL: proxyscope-0.1.1.tar.gz
  • Upload date:
  • Size: 40.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.9 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for proxyscope-0.1.1.tar.gz
Algorithm Hash digest
SHA256 48805cebd42bd5ed397418b94d76900b169f47c62b0d5bdfb29fb5256d37fbd6
MD5 4cb2663cd7610654264c842a306e2285
BLAKE2b-256 d1a2273c95116327f179be3bce6628ec55f0b513dca1fc5cf47fa9ed9f0a33b5

See more details on using hashes here.

File details

Details for the file proxyscope-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: proxyscope-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 54.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.9 Linux/6.6.87.2-microsoft-standard-WSL2

File hashes

Hashes for proxyscope-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b128f0e5a91ec9c6d7595a2932af1fac1a07be2805c84d9dd4443c0c2f7d2af
MD5 5bd5fd99e5c9edf98f21d183c8b74bc0
BLAKE2b-256 ebaac6840914b892eac1c67501ecfaf0d7b815499da45b53a377d2b67acd0784

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