https://github.com/benoitc/hroute
simple HTTP proxy based on tproxy
https://github.com/benoitc/hroute
Last synced: 7 months ago
JSON representation
simple HTTP proxy based on tproxy
- Host: GitHub
- URL: https://github.com/benoitc/hroute
- Owner: benoitc
- License: other
- Created: 2011-05-03T23:34:34.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2011-05-05T21:46:31.000Z (almost 15 years ago)
- Last Synced: 2025-08-10T00:38:54.765Z (7 months ago)
- Language: Python
- Homepage:
- Size: 129 KB
- Stars: 28
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
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
------------
- `Python `_ 2.6 and sup (Python 3 not suppported yet)
- `gevent `_ >= 0.13.4
- `setproctitle `_ >= 1.1.2
- `tproxy `_ >= 0.5.2
- `http-parser `_ >= 0.3.3
- `lxml `_
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.