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.6.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

rproxy-16.6.0-py2-none-any.whl (6.2 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for rproxy-16.6.0.tar.gz
Algorithm Hash digest
SHA256 9e9cb3914a4c0cef0418d46dbe3cf85c808a24df81245b31fd4d98dc52a34a34
MD5 2a69cb5cdb1418c1bf3d3f0fb982552a
BLAKE2b-256 25f228f6438ce420552984c7dea4cc0871d44160b3f0d81b5478480561b375da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rproxy-16.6.0-py2-none-any.whl
Algorithm Hash digest
SHA256 03b3492f4bc9c1f75b5fd7c69df23f587ea2bc11fa4dd6f4fe5400324defaba7
MD5 c1966abc3a1f7ff99072d70be6f31738
BLAKE2b-256 69b043985b676f79a48bd6a78a25c6d0929d5bb7ca0ee82bf54bd132c89d2106

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