HTTP路由器
hroute的Python项目详细描述
hroute
----
基于“tproxy<;http://github.com/benoitc/tproxy>;”的简单http代理。
功能
+++++-而对于“gevent<;http://gevent.org>;``gevent<;http://code.google.com/p/py-setproctitle/>;```setproctitle<;http://code.google.com/p/py-setproctitle/>;`1.1.2
-`tproxy<;http://github.com/benoitc/http parser>;```gevent>;=0.5.2
-`http parser<;http://github.com/benoitc/benoitc/http parser>;``gevent>;``gevent>;=0.5.2
-`http://.3
-`lxml<;http://lxml.de>;`
安装
----
::
$pip install hroute
usage
----
设置
以下配置::
{
“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,
“重写响应”:true
}
}
}
}
}
,然后启动hroute::
$hroute-s/tmp-w 3
,继续“http://127.0.0.1:5000/gunicorn
<;http://127.0.0.1:5000/gunicorn>;`。你很快就会看到gunicorn.org网站的更多功能。
----
基于“tproxy<;http://github.com/benoitc/tproxy>;”的简单http代理。
功能
+++++-而对于“gevent<;http://gevent.org>;``gevent<;http://code.google.com/p/py-setproctitle/>;```setproctitle<;http://code.google.com/p/py-setproctitle/>;`1.1.2
-`tproxy<;http://github.com/benoitc/http parser>;```gevent>;=0.5.2
-`http parser<;http://github.com/benoitc/benoitc/http parser>;``gevent>;``gevent>;=0.5.2
-`http://.3
-`lxml<;http://lxml.de>;`
安装
----
::
usage
----
设置
以下配置::
{
“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,
“重写响应”:true
}
}
}
}
}
,然后启动hroute::
$hroute-s/tmp-w 3
,继续“http://127.0.0.1:5000/gunicorn
<;http://127.0.0.1:5000/gunicorn>;`。你很快就会看到gunicorn.org网站的更多功能。