A small whitelisting HTTP CONNECT proxy
Project description
A small whitelisting HTTP CONNECT proxy
This is a small HTTP CONNECT proxy, with a target host whitelist.
Implemented in Python on top of trio and h11, it is written for ease of comprehension and auditing. (This makes it easy to adopt in situations where you'd want such a proxy.)
A secondary goal is to be flexible. It can be used in two ways:
-
As a stand-alone proxy. Just run the module:
python -m tunnelproxy --address localhost --port 8080 --config example-config.json
-
As a library. The proxy (
TunnelProxy) always runs in Trio's event loop, but a wrapper (SynchronousTunnelProxy) lets you run it from normal code.Make it your own!
For example of (2), see tunnelproxy/__main__.py.
Performance
The proxy is single-threaded. On an Intel i7-7700HQ @ 2.80GHz, it handles ~560 connections per second. Not much, but enough for many use cases.
License
This project is MIT licensed. TrioHTTPConnection from adapter.py is
based on h11's example server, by Nathaniel J. Smith. The rest is written
by Antun Maldini.
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 tunnelproxy-0.1.0.tar.gz.
File metadata
- Download URL: tunnelproxy-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d48fbc0c5fdce7330efb378bef326e1f6537e8bb9584fca0f8a1fa6a1f38d5b9
|
|
| MD5 |
ec3cb31fec3a8c234929b18e3af50b90
|
|
| BLAKE2b-256 |
819927933276cc6cd31ad4be8bce9d69462178c6ba5d627455ad2869b2dd9f41
|
File details
Details for the file tunnelproxy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tunnelproxy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb1ac70e0b4041b2cb99c034d42957d0adc619fc5b15eb7c7a179fbd0e7441f7
|
|
| MD5 |
979a5228a038d66fd550f95645a1ca76
|
|
| BLAKE2b-256 |
2d4ee6229e9d5d6a4f8e70cca2b299a6cfdf81477fc90981eff9f54952cf0d23
|