Total Pageviews

Monday, 10 December 2018

一个基于python的http proxy server程序: proxy-by-voorloopnul

登陆linux vps.
git clone https://github.com/voorloopnul/proxy proxy-by-voorloopnul
cd proxy-by-voorloopnul


root@wh:~/proxy-by-voorloopnul# ls
LICENSE  README.md  proxy.py
root@wh:~/proxy-by-voorloopnul# python proxy.py

^CCtrl C - Stopping server
root@wh:~/proxy-by-voorloopnul# python proxy.py &
[1] 1677 
root@wh:~/proxy-by-voorloopnul# lsof -i:9090
COMMAND  PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
python  1677 root    3u  IPv4 37061406      0t0  TCP *:9090 (LISTEN)
root@wh:~/proxy-by-voorloopnul#

访问https://github.com/voorloopnul/proxy/blob/master/proxy.py的第87行,可修改其所监听的端口9090为其他端口。

项目地址:https://github.com/voorloopnul/proxy
http://voorloopnul.com/blog/a-python-proxy-in-less-than-100-lines-of-code/

No comments:

Post a Comment