simple HTTP proxy based on tproxy
Python
Switch branches/tags
Nothing to show
Latest commit 5b22ce9 May 5, 2011 @benoitc benoitc fix readme.
Permalink
Failed to load latest commit information.
bin initial release. May 3, 2011
hroute make sue we send all data May 5, 2011
.gitignore initial release. May 3, 2011
LICENSE initial release. May 3, 2011
MANIFEST.in initial release. May 3, 2011
NOTICE initial release. May 3, 2011
README.rst fix readme. May 5, 2011
THANKS initial release. May 3, 2011
requirements.txt require tproxy >= 0.5.2 May 5, 2011
setup.cfg initial release. May 3, 2011
setup.py fix setup May 4, 2011

README.rst

hroute

simple HTTP proxy based on tproxy.

Features

  • location rewriting
  • links rewriting to handle proxy / paths
  • simple configuration
  • vhosts support
  • logging (coming)
  • authentification (coming)

Requirements

Install

$ pip install -r https://github.com/downloads/benoitc/hroute/requirements.txt
$ pip install hroute

Usage

Create a configuration file named route in /var/spool/hroute (default path) or any folder you want, for example in /tmp, put the following configuration:

{
    "all": {
        "routes": {
            "/": {
                "remote": "benoitc.io:80",
                "rewrite_response": true
            },
            "/local": {
                "remote": "127.0.0.1:8000"
            },
            "/google": {
                "remote": "google.com:80"
            },
            "/gunicorn": {
                "remote": "gunicorn.org:80",
                "rewrite_response": true
            },
            "/googles": {
                "remote": "encrypted.google.com:443",
                "ssl": true,
                "rewrite_response": true
            }
        }
    }
}

then launch hroute:

$ hroute -s /tmp -w 3

and go on http://127.0.0.1:5000/gunicorn. You should see the gunicorn.org website.

More features soon.