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网站的更多功能。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
无法将XML加载到属性对象Java中   java如何判断当前线程是否为事件分派线程   java如何在带有CouchbaseTemplate的Spring数据Couchbase中使用密钥前缀   java将JSON数组存储在不同的列表或数组中   java OpenCV检测最大矩形会产生令人费解的结果   java正则表达式获取选项卡式值及其频率   安卓致命异常:主java。lang.NullPointerException   java有没有一种方法可以使用CLI(命令行界面)使用junit测试用例测试我的项目的jar文件?   Java数组属性   java我应该升级到CGLIB 3.0吗?   用户界面什么Java GUI框架适合第一个GUI项目?   java如何使用tomcat、mysql和jdbc驱动程序在internet上发布我的jsp项目   java计数字符串中非重叠出现的次数   通用域名格式。太阳网httpserver Java httpserver基本身份验证问题   java Android WebView:只显示网页的一半   将json字符串转换为java中的对象列表   io使用Java在目录中查找第一个文件   if语句如何在java游戏中使用switch和case?