Skip to main content

Reverse proxy for forward proxy

Project description

reverse-forward-proxy

Reverse proxy to resources behind a forward proxy. The purpose of this is to simplify configuration of clients or allow scaling behind load balancers that do not support forward proxying on the back-end (e.g. HAProxy, Squid, Apache).

Usage

# Required.
HTTP_PROXY=http://192.168.1.2:8080
# Optional. Defaults to $HTTP_PROXY
HTTPS_PROXY=http://192.168.1.2:8080
# Optional.
SSL_CERT_FILE=
# Optional. Enabled when set to '1'
REVERSE_FORWARD_PROXY_VERBOSE=
# Optional. Default is "localhost"
REVERSE_FORWARD_PROXY_HOST=
# Optional. Default is "8080"
REVERSE_FORWARD_PROXY_PORT=
# Optional. Default is "X-Reverse-Forward-Proxy-Target"
REVERSE_FORWARD_PROXY_TARGET_HEADER=
reverse-forward-proxy

Now the server will be up and listening on http://localhost:8080 for requests.

Requests must have header X-Reverse-Forward-Proxy-Target set to the remote host to connect to via the proxy.

The server will make the request via $HTTP_PROXY and return the response.

Testing

pytest
make docker-test
docker run --rm --net=host svagi/h2load --h1 -n 100 -c5 -H "X-Reverse-Forward-Proxy-Target: http://files/" http://localhost:$(make get-port)/file.100m

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

reverse-forward-proxy-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reverse_forward_proxy-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file reverse-forward-proxy-0.1.0.tar.gz.

File metadata

  • Download URL: reverse-forward-proxy-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

File hashes

Hashes for reverse-forward-proxy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 88c392e2706be4bccbe87714645c3429413d035d6a734b11fed96ee91302428e
MD5 b2ccbe15e051f7ebb6a15cfb107d0d97
BLAKE2b-256 5cf4f47f95ac0ec274296841e1a5e9d7a7e5447f17f84fbd3604a5f27ebb4a9f

See more details on using hashes here.

File details

Details for the file reverse_forward_proxy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: reverse_forward_proxy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

File hashes

Hashes for reverse_forward_proxy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0133f1ba548894d4838765d59e85fa2c522d358bb73ed05b8521518fa5683e5b
MD5 d1957bfc01c72e5fcc16efcc6fc60f66
BLAKE2b-256 c15f46adc43d1b79c4e73459c716ebca1fb82b86ee1f57227c9df1c4d646bc7c

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