天天看點

TinyProxy正向代理

動态撥号VPS主機

ssh [email protected] -p 20063  # 登入主機

sh ppp.sh   # 輸入賬号密碼

adsl-start  # 撥号
adsl-stop   # 停止

ifconfig  # 檢視主機ip 網卡ppp0      

安裝TinyProxy

yum install -y epel-release
yum update -y
yum install -y tinyproxy      

配置

/etc/tinyproxy/tinyproxy.conf

# Allow 127.0.0.1  注釋此行      

啟動服務

service tinyproxy start  # 啟動服務
start|stop|status|restart|condrestart|try-restart|reload|force-reload

curl -x 112.84.118.216:8888 httpbin.org/get  # 測試代理      

代理池

撥号服務端

pip3 install redis tornado
git clone https://github.com/Germey/ADSLProxyPool
cd server
python3 server.py      

撥号用戶端

pip3 install requests
git clone https://github.com/Germey/ADSLProxyPool.git
python3 client.py      

參考:

使用Tornado+Redis維護ADSL撥号伺服器代理池

問題及解決

問題1: Failed to start Startup script for the tinyproxy server

描述:service tinyproxy restart 啟動tinyproxy的時候卡主好久

使用ps -ef|grep tinyproxy 檢視,發現有很多tinyproxy程序

殺掉進行後重新開機ok

ps -ef|grep tinyproxy|grep -v grep|awk '{print "kill -9 "$2}'|sh

service tinyproxy start      

繼續閱讀