Pages

Sunday, 25 November 2018

http代理服务器程序:tornado-proxy

登陆linux vps.
首先安装pip:
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
参见https://briteming.blogspot.com/2018/09/pip.html

git clone https://github.com/senko/tornado-proxy
cd tornado-proxy
pip install requirements.txt
(此步骤是安装tornado2.2版)

cd tornado_proxy

root@whme:~/tornado-proxy/tornado_proxy# ls
__init__.py  proxy.py
root@whme:~/tornado-proxy/tornado_proxy# python proxy.py 9999
会显示:
Starting HTTP proxy on port 9999

python proxy.py 9999是运行在前台的命令,可以利用systemd把该命令运行为service.
这http代理服务器程序可用作各种tunnel程序(比如stunnel/kcptun)的后端。

项目地址:https://github.com/senko/tornado-proxy
类似的程序https://briteming.blogspot.com/2015/11/proxypy-pythonhttp.html

No comments:

Post a Comment