#!/usr/bin/env bash version=$(sed -r 's/.* ([0-9]+)\..*/\1/' /etc/redhat-release) echo centos version: "$version" case "$version" in 8) dnf install python2 alternatives --set python /usr/bin/python2 ;; 7) yum update yum install -y gcc ;; 6) ;; *) echo -e "版本不是6、7、8" ;; esac echo 'open ports 23333 23335 23337 43337 38593 6934 and reload firewall' echo read -er -p "or add more by entering you customize ports split by comma : " portstr ports="23333,23335,23337,43337,38593,6934,$portstr" IFS=',' read -ra port_array <<< "$ports" for port in "${port_array[@]}"; do firewall-cmd --zone=public --add-port="${port}/tcp" --permanent done echo 'reload firewall' firewall-cmd --reload #https://github.com/bluekk935/ToyoDAdoubi yum -y install wget wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ssr.sh && chmod +x ssr.sh && bash ssr.sh wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh