This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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 directory to store your certificates:

$ mkdir my-certs

Make a rproxy.ini:

[rproxy]
certificates=my-certs
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]
certificates=my-certs
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.
Release History

Release History

This version
History Node

17.3.1

History Node

17.3.0

History Node

16.9.0

History Node

16.8.0

History Node

16.6.0

History Node

16.5.0

History Node

16.4.0

History Node

16.3.1

History Node

16.3.0

History Node

16.2.0

History Node

16.1.2

History Node

16.1.1

History Node

16.1.0

History Node

16.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
rproxy-17.3.1-py2-none-any.whl (6.9 kB) Copy SHA256 Checksum SHA256 py2 Wheel Mar 22, 2017
rproxy-17.3.1.tar.gz (4.9 kB) Copy SHA256 Checksum SHA256 Source Mar 22, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting