A python implementation of configurable-http-proxy
Project description
configurable-http-proxy
This is a pure python implementation of the configurable-http-proxy written in nodejs. It is meant to be a drop in replacement.
Install
Prerequisite: Python 3.6+
pip install configurable-http-proxy
Feature support
The following items are supported:
- Proxying for Websocket and HTTP requests
- Configuring the proxy using API requests
- Auth token for API requests
- Error management using error_path and error_target
- Prepend path or include prefix
- Timeouts
- X-Forward related headers
- Custom Headers
- Customizable storage backends
- PID file writing
- Logging
- Configurable storage backend
The following options are additional (not available in nodejs CHP currently):
- Ready to use DBMS storage backend
The following options are not supported (yet):
- SSL for proxy, client, API is not available (
--ssl-*,--api-ssl-*,--client-ssl-*,--insecure) - Redirecting:
--redirect-portand--redirect-to - Change Origin:
--change-origin - Rewrites in Location header:
--protocol-rewriteand--auto-rewrite - Metrics server:
--metrics-portand--metrics-ip
Database-backed storage backend
Using a SQL DBMS instead of the default in-memory store enables chp to be replicated in a High Availability scenario.
To use a SQL DBMS as the storage backend:
- Install DBMS support
$ pip install configurable-http-proxy[sqla]
- Set the CHP_DATABASE_URL env var to any db URL supported by SQLAlchemy. The default is
sqlite:///chp.sqlite.
$ export CHP_DATABASE_URL="sqlite:///chp.sqlite"
$ configurable-http-proxy --storage-backend configurable_http_proxy.dbstore.DatabaseStore
- Optionally you may set the table name by setting the CHP_DATABASE_TABLE. The default is 'chp_routes'
$ export CHP_DATABASE_TABLE="chp_routes"
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
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 configurable_http_proxy-0.4.0.tar.gz.
File metadata
- Download URL: configurable_http_proxy-0.4.0.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2823b5a0d980b3128c93cca22b20f575e591e46dc234c0c36d44062b15beb332
|
|
| MD5 |
8802ba4f87fec11dea6d45dbf89a3110
|
|
| BLAKE2b-256 |
a600b41492e1bb64dcc71ac2b35e54d35a72c348979517fa82bc1db6902dcfa7
|
File details
Details for the file configurable_http_proxy-0.4.0-py3-none-any.whl.
File metadata
- Download URL: configurable_http_proxy-0.4.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9c83a7d5a07df5b698b030a35b4a799986197ba5ad15869a7f368a3cd6cd643
|
|
| MD5 |
fff2818d3aeb576884a8034e4ab460d8
|
|
| BLAKE2b-256 |
7a645508c5322b342a19fcf650b9e666cc97de2a436b7ca66f4ed6544b43fe1d
|