3proxy代理部署
作者:互联网
部署3proxy
yum install 3proxy -y
vim /etc/3proxy
nserver 服务器dns nserver 服务器dns nscache 655360 timeouts 1 5 30 60 180 1800 15 600 users "代理用户名:CL:密码" "代理用户名:密码" daemon log /var/log/3proxy/3proxy.log logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T" archiver gz /bin/gzip %F rotate 30 auth strong flush allow * maxconn 300 socks -p28080
curl https://gist.githubusercontent.com/AntonOrlov/a70aeed276d35dc9d77060b0a6c167ed/raw -o /etc/3proxy.cfg
chmod 644 /etc/3proxy.cfg
systemctl enable 3proxy.service
systemctl restart 3proxy.service
批量配置各服务器
在第一台已经部署好的云服务器上安装Nginx,修改配置文件。
yum -y install nginx
vim /etc/nginx/nginx.conf
cp /etc/3proxy /usr/local/src/
安装pssh
#tar xf pssh-2.3.1.tar.gz -C /usr/local/pssh/
#cd /usr/local/pssh/pssh-2.3.1/
#python setup.py install
cd /root
git clone https://github.com/knktc/insecure_pssh
cd insecure_pssh
vim hosts.txt #添加需部署的云服务器IP、用户名、密码。
./pssh -h hosts.txt 'yum install 3proxy -y'
./pssh -h hosts.txt 'curl http://本机ip/3proxy.cfg -o /etc/3proxy.cfg'
./pssh -h hosts.txt 'chmod 644 /etc/3proxy.cfg'
./pssh -h hosts.txt 'systemctl enable 3proxy.service'
./pssh -h hosts.txt 'systemctl restart 3proxy.service'
测试28080端口
for i in ip地址 IP地址 ip地址 ; do nc -vz $i 28080; done
模拟代理请求
for i in IP地址 IP地址 IP地址 ; do curl -v -x socks5://代理用户名:密码:28080 http://api.paypal.com; done
标签:pssh,部署,cfg,代理,etc,3proxy,hosts,txt 来源: https://www.cnblogs.com/bluth/p/16088599.html