main.sh 866 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. echo "installing apps"
  2. yum -y install gcc net-tools bsdtar zip >/dev/null
  3. install_3proxy
  4. echo "working folder = /home/proxy-installer"
  5. WORKDIR="/home/proxy-installer"
  6. WORKDATA="${WORKDIR}/data.txt"
  7. mkdir $WORKDIR && cd $_
  8. IP4=$(curl -4 -s ifconfig.co)
  9. IP6=$(curl -6 -s ifconfig.co | cut -f1-4 -d':')
  10. echo "Internal ip = ${IP4}. Exteranl sub for ip6 = ${IP6}"
  11. echo "How many proxy do you want to create? Example 500"
  12. read COUNT
  13. FIRST_PORT=10000
  14. LAST_PORT=$(($FIRST_PORT + $COUNT))
  15. gen_data >$WORKDIR/data.txt
  16. gen_iptables >$WORKDIR/boot_iptables.sh
  17. gen_ifconfig >$WORKDIR/boot_ifconfig.sh
  18. chmod +x boot_*.sh /etc/rc.local
  19. gen_3proxy >/usr/local/etc/3proxy/3proxy.cfg
  20. cat >>/etc/rc.local <<EOF
  21. bash ${WORKDIR}/boot_iptables.sh
  22. bash ${WORKDIR}/boot_ifconfig.sh
  23. ulimit -n 2048
  24. service 3proxy start
  25. EOF
  26. bash /etc/rc.local
  27. gen_proxy_file_for_user
  28. upload_proxy