proxy updated

This commit is contained in:
Yujin Boby
2024-05-22 23:38:13 +05:30
parent ed82f2b30f
commit a46afa1213
2 changed files with 10 additions and 18 deletions

View File

@@ -20,6 +20,8 @@ if [ ! -f /usr/bin/sok-find-os ]; then
exit 1
fi
rm -f /root/squid3-install.sh > /dev/null 2>&1
SOK_OS=$(/usr/bin/sok-find-os)
if [ $SOK_OS == "ERROR" ]; then
@@ -94,7 +96,6 @@ elif [ "$SOK_OS" == "centos9" ]; then
fi
rm -f /usr/bin/squid-add-user > /dev/null 2>&1
rm -f /root/squid3-install.sh > /dev/null 2>&1
rm -f /usr/bin/sok-find-os > /dev/null 2>&1
rm -f /usr/bin/squid-uninstall > /dev/null 2>&1

View File

@@ -68,7 +68,6 @@ elif [ $SOK_OS == "ubuntu2204" ]; then
/usr/bin/wget -q --no-check-certificate -O /etc/squid/squid.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/conf/ubuntu-2204.conf
if [ -f /sbin/iptables ]; then
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
/sbin/iptables-save
fi
service squid restart
systemctl enable squid
@@ -81,7 +80,6 @@ elif [ $SOK_OS == "ubuntu2004" ]; then
/usr/bin/wget -q --no-check-certificate -O /etc/squid/squid.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid.conf
if [ -f /sbin/iptables ]; then
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
/sbin/iptables-save
fi
service squid restart
systemctl enable squid
@@ -104,7 +102,6 @@ elif [ $SOK_OS == "ubuntu1604" ]; then
/usr/bin/touch /etc/squid/blacklist.acl
/usr/bin/wget -q --no-check-certificate -O /etc/squid/squid.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid.conf
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
/sbin/iptables-save
service squid restart
update-rc.d squid defaults
elif [ $SOK_OS == "ubuntu1404" ]; then
@@ -115,7 +112,6 @@ elif [ $SOK_OS == "ubuntu1404" ]; then
/usr/bin/touch /etc/squid3/blacklist.acl
/usr/bin/wget -q --no-check-certificate -O /etc/squid3/squid.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid.conf
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
/sbin/iptables-save
service squid3 restart
ln -s /etc/squid3 /etc/squid
#update-rc.d squid3 defaults
@@ -130,7 +126,6 @@ elif [ $SOK_OS == "debian8" ]; then
/usr/bin/touch /etc/squid3/blacklist.acl
/usr/bin/wget -q --no-check-certificate -O /etc/squid3/squid.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid.conf
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
/sbin/iptables-save
service squid3 restart
update-rc.d squid3 defaults
ln -s /etc/squid3 /etc/squid
@@ -144,7 +139,6 @@ elif [ $SOK_OS == "debian9" ]; then
/usr/bin/touch /etc/squid/blacklist.acl
/usr/bin/wget -q --no-check-certificate -O /etc/squid/squid.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid.conf
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
/sbin/iptables-save
systemctl enable squid
systemctl restart squid
elif [ $SOK_OS == "debian10" ]; then
@@ -157,7 +151,6 @@ elif [ $SOK_OS == "debian10" ]; then
/usr/bin/touch /etc/squid/blacklist.acl
/usr/bin/wget -q --no-check-certificate -O /etc/squid/squid.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid.conf
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
/sbin/iptables-save
systemctl enable squid
systemctl restart squid
elif [ $SOK_OS == "debian11" ]; then
@@ -171,7 +164,6 @@ elif [ $SOK_OS == "debian11" ]; then
/usr/bin/wget -q --no-check-certificate -O /etc/squid/squid.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/squid.conf
if [ -f /sbin/iptables ]; then
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
/sbin/iptables-save
fi
systemctl enable squid
systemctl restart squid
@@ -184,7 +176,6 @@ elif [ $SOK_OS == "debian12" ]; then
/usr/bin/wget -q --no-check-certificate -O /etc/squid/conf.d/serverok.conf https://raw.githubusercontent.com/serverok/squid-proxy-installer/master/conf/debian12.conf
if [ -f /sbin/iptables ]; then
/sbin/iptables -I INPUT -p tcp --dport 3128 -j ACCEPT
/sbin/iptables-save
fi
systemctl enable squid
systemctl restart squid
@@ -196,8 +187,8 @@ elif [ $SOK_OS == "centos7" ]; then
systemctl enable squid
systemctl restart squid
if [ -f /usr/bin/firewall-cmd ]; then
firewall-cmd --zone=public --permanent --add-port=3128/tcp > /dev/null 2>&1
firewall-cmd --reload > /dev/null 2>&1
firewall-cmd --zone=public --permanent --add-port=3128/tcp > /dev/null 2>&1
firewall-cmd --reload > /dev/null 2>&1
fi
elif [ "$SOK_OS" == "centos8" ] || [ "$SOK_OS" == "almalinux8" ] || [ "$SOK_OS" == "almalinux9" ]; then
yum install squid httpd-tools wget -y
@@ -207,8 +198,8 @@ elif [ "$SOK_OS" == "centos8" ] || [ "$SOK_OS" == "almalinux8" ] || [ "$SOK_OS"
systemctl enable squid
systemctl restart squid
if [ -f /usr/bin/firewall-cmd ]; then
firewall-cmd --zone=public --permanent --add-port=3128/tcp > /dev/null 2>&1
firewall-cmd --reload > /dev/null 2>&1
firewall-cmd --zone=public --permanent --add-port=3128/tcp > /dev/null 2>&1
firewall-cmd --reload > /dev/null 2>&1
fi
elif [ "$SOK_OS" == "centos8s" ]; then
dnf install squid httpd-tools wget -y > /dev/null 2>&1
@@ -218,8 +209,8 @@ elif [ "$SOK_OS" == "centos8s" ]; then
systemctl enable squid > /dev/null 2>&1
systemctl restart squid > /dev/null 2>&1
if [ -f /usr/bin/firewall-cmd ]; then
firewall-cmd --zone=public --permanent --add-port=3128/tcp > /dev/null 2>&1
firewall-cmd --reload > /dev/null 2>&1
firewall-cmd --zone=public --permanent --add-port=3128/tcp > /dev/null 2>&1
firewall-cmd --reload > /dev/null 2>&1
fi
elif [ "$SOK_OS" == "centos9" ]; then
dnf install squid httpd-tools wget -y > /dev/null 2>&1
@@ -229,8 +220,8 @@ elif [ "$SOK_OS" == "centos9" ]; then
systemctl enable squid > /dev/null 2>&1
systemctl restart squid > /dev/null 2>&1
if [ -f /usr/bin/firewall-cmd ]; then
firewall-cmd --zone=public --permanent --add-port=3128/tcp > /dev/null 2>&1
firewall-cmd --reload > /dev/null 2>&1
firewall-cmd --zone=public --permanent --add-port=3128/tcp > /dev/null 2>&1
firewall-cmd --reload > /dev/null 2>&1
fi
fi