Skip to main content

A super simple reverse proxy.

Project description

A super simple HTTP/1.1 proxy, with TLS and Let’s Encrypt support.

rproxy takes care of your Let’s Encrypt certificates, automatically renewing them. This is done by the excellent txacme library.

Install from PyPI:

$ pip install rproxy

Make a rproxy.ini:

[rproxy]
certs=certificates
http_ports=80
https_ports=443

[hosts]
mysite.com_port=8080

Then run it:

sudo twistd -u nobody -g nobody -n rproxy

This will start the server, drop permissions (setting the effective uid/guid to nobody), and will proxy incoming requests to mysite.com to localhost:8080. You can configure it further:

[rproxy]
certs=certificates
http_ports=80,8080
https_ports=443
clacks=true

[hosts]
mysite.com_port=8080
mysite.com_host=otherserver
mysite.com_onlysecure=True
mysite.com_proxysecure=True

myothersite.net_port=8081

This config will:

  • connect to https://otherserver:8080 as the proxied server for mysite.com, and only allow HTTPS connections to the proxy for this site

  • connect to http://localhost:8081 as the proxied server for myothersite.net, and allow HTTP or HTTPS connections.

General Config

  • http_ports – comma-separated list of numerical ports to listen on for HTTP connections.

  • https_ports – comma-separated list of numerical ports to listen on for HTTPS connections.

  • certificates – directory where certificates are kept.

  • clacks – Enable X-Clacks-Overhead for requests.

Hosts Config

  • <host>_onlysecure – enforce HTTPS connections. If not set, or set to False, it will allow HTTP and HTTPS connections.

  • <host>_proxysecure – connect to the proxied server by HTTPS. If not set, or set to False, it will connect over HTTP.

  • <host>_port – The port of the proxied server that this proxy should connect to.

  • <host>_host – the hostname/IP of the server to proxy to.

  • <host>_sendhsts – send HSTS headers on HTTPS connections.

  • <host>_wwwtoo – match www too.

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

rproxy-16.8.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distributions

rproxy-16.8.0-py2.7.egg (10.0 kB view details)

Uploaded Source

rproxy-16.8.0-py2-none-any.whl (6.7 kB view details)

Uploaded Python 2

File details

Details for the file rproxy-16.8.0.tar.gz.

File metadata

  • Download URL: rproxy-16.8.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rproxy-16.8.0.tar.gz
Algorithm Hash digest
SHA256 9658a0ce73c43d0c79e4cc82c1d06ba681004e5a31f9f8646db164a5051acf0d
MD5 69f4b285dc87d196a32abff99425a659
BLAKE2b-256 3c83039211cb774f9c7579874ad95019baf5b747ef9782e15812677da51676d4

See more details on using hashes here.

File details

Details for the file rproxy-16.8.0-py2.7.egg.

File metadata

  • Download URL: rproxy-16.8.0-py2.7.egg
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rproxy-16.8.0-py2.7.egg
Algorithm Hash digest
SHA256 fcbff3f16ba4f272cd635b73cd23646b50b94fad67317d558307c9908e4923b4
MD5 a7a15bc879d98f2442b8d222d663bf4d
BLAKE2b-256 3b71cf691734facbedda264f5e4431154fe6a1ce85c339362b90c8f09b5ca1a8

See more details on using hashes here.

File details

Details for the file rproxy-16.8.0-py2-none-any.whl.

File metadata

File hashes

Hashes for rproxy-16.8.0-py2-none-any.whl
Algorithm Hash digest
SHA256 87d4f5132fd9f2cfbaad9a372f78cc6bf8188674514a146e0ad694906b06a757
MD5 f59469f694537039301c737ed64706dc
BLAKE2b-256 f6e19d83cbe946298e7fefb1072b3bc383e7b20c5df2659e0fd1dcb8aeea95f2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page