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-port
and--redirect-to
- Change Origin:
--change-origin
- Rewrites in Location header:
--protocol-rewrite
and--auto-rewrite
- Metrics server:
--metrics-port
and--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
File details
Details for the file configurable-http-proxy-0.3.0.tar.gz
.
File metadata
- Download URL: configurable-http-proxy-0.3.0.tar.gz
- Upload date:
- Size: 31.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f5f82377ac699549ab618892addfbaa0052cb2dc7c0aed1034bc88e4953b555 |
|
MD5 | 63b376e23a76f6d5a49025d247bf1b19 |
|
BLAKE2b-256 | 7bc1812ca9b578a419729e2e5766ce18c28b4b1a5a55623c54db0e43b33f5d6b |
File details
Details for the file configurable_http_proxy-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: configurable_http_proxy-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f75ca53ed7ffe7592b212cbbea6f66a41e2f0d8bf89edabb9c47f5d25a5e064f |
|
MD5 | c1690d5c0805d3bb5719ca8fbd54ea7d |
|
BLAKE2b-256 | 06912ae0fd55ee9c414f8aecd5ea1e8e01a5fac973a02259e60177c1179dbbaa |