Skip to content

proxy.py

Python HTTP proxy with plugins for filtering, caching and TLS interception

Permissive (OSI) · BSD-3-Clause

Listed by , founder & editor

13

Health

Dormant

Overview

Stars

3,560

Last commit

2 years ago

Mar 2025

Repository age

13 years

since Aug 2013

Latest version

v2.4.10

Feb 2025

Contributors

–

Releases

0

last 12 months

Docker pulls

642k

abhinavsingh/proxy.py

Language

Python

proxy.py is an HTTP, HTTPS and WebSocket proxy server written in Python. It uses asyncio for threadless execution and can use all available cores. Nearly everything is a plugin, so you change behavior by loading small Python classes.

Bundled plugin examples cover modifying request headers and POST data, mocking APIs, redirecting to another server, filtering by upstream host or client IP, caching responses, pooling proxies and custom DNS resolvers. It also supports TLS interception, a reverse proxy mode, a web server with routes, a dashboard for inspecting traffic, Chrome DevTools Protocol support and Prometheus metrics.

It includes Grout, a drop-in alternative to ngrok for exposing local services. You can embed proxy.py in your own code in blocking or non-blocking mode, and it provides a test case class for unit tests. Install it with pip, Docker or Homebrew. The license is BSD-3-Clause. It can stand in for ngrok and for traffic-inspecting proxy tools.

Who it's for

Developers who expose local services to the internet

Grout works as an ngrok alternative and can be self-hosted.

Skip if: You want a managed tunnel service with no server to run.

Python developers who need a scriptable proxy in tests

You can embed it and use its test case class and plugin system.

Skip if: You want a ready-made interception tool with a polished GUI.

Engineers debugging HTTP traffic

TLS interception, a traffic dashboard and DevTools support let you inspect requests.

Skip if: You need a proxy with active upstream maintenance.

The problem it solves

Controlling or inspecting HTTP traffic usually means a heavy proxy or a paid tunnel service. proxy.py gives you a small Python proxy you can extend with plugins. It also covers exposing local services to the internet.

Strengths

  • Plugin architecture for headers, caching, filtering, DNS and redirects
  • Includes Grout, an ngrok-style tunnel you can self-host
  • Threadless asyncio design that scales across available cores
  • Can be embedded in Python code and used in unit tests
  • Installs via pip, Docker or Homebrew

Trade-offs

  • No commits since March 2025 and no releases in the past year
  • Writing custom behavior means writing Python plugins
  • TLS interception takes certificate setup and care
  • Docker image has known issues on macOS

Self-host proxy.py

Self-hostable
Yes
Docker image
abhinavsingh/proxy.py

In the community

Frequently asked questions

Is proxy.py free?

Yes. It is open source under the BSD-3-Clause license.

Can I self-host it?

Yes. Install it with pip, Docker or Homebrew and run it on your own server.

Can it replace ngrok?

Its Grout feature is designed as a drop-in alternative to ngrok, and it can be self-hosted.

Does it intercept HTTPS?

Yes. It supports TLS interception, including through Docker.

Similar tools in Reverse proxies and web servers

uwsgi

Reverse proxies and web servers

Application server for running Python and other web apps behind a web server

3.6k 696 13 months ago Dormant GPL-2.0-or-later

harp

Reverse proxies and web servers

5k 334 5 months ago Slowing Unknown

Apache HTTP Server

Reverse proxies and web servers

Long-running web server with modules, for hosting sites on Linux, macOS and more

4.1k 1.3k today Active Apache-2.0

Tinyproxy

Reverse proxies and web servers

Small HTTP and HTTPS proxy daemon for small networks and low-resource servers

6.1k 770 today Active GPL-2.0

Lancache

Reverse proxies and web servers

Docker game download cache for LAN parties and shared networks

912 91 2 days ago Active MIT

Squid

Reverse proxies and web servers

Caching web proxy for networks that need faster, controlled HTTP, HTTPS and FTP access

3.2k 675 17 days ago Active GPL-2.0