mirror of
https://github.com/serverok/squid-proxy-installer.git
synced 2026-04-06 20:49:01 +00:00
added ubuntu 22.04 support
This commit is contained in:
@@ -29,9 +29,22 @@ if [[ -d /etc/squid/ || -d /etc/squid3/ ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if cat /etc/os-release | grep PRETTY_NAME | grep "Ubuntu 20.04"; then
|
||||
if cat /etc/os-release | grep PRETTY_NAME | grep "Ubuntu 22.04"; then
|
||||
/usr/bin/apt update
|
||||
/usr/bin/apt -y install apache2-utils squid3
|
||||
/usr/bin/apt -y install apache2-utils squid
|
||||
touch /etc/squid/passwd
|
||||
/bin/rm -f /etc/squid/squid.conf
|
||||
/usr/bin/touch /etc/squid/blacklist.acl
|
||||
/usr/bin/wget --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
|
||||
elif cat /etc/os-release | grep PRETTY_NAME | grep "Ubuntu 20.04"; then
|
||||
/usr/bin/apt update
|
||||
/usr/bin/apt -y install apache2-utils squid
|
||||
touch /etc/squid/passwd
|
||||
/bin/rm -f /etc/squid/squid.conf
|
||||
/usr/bin/touch /etc/squid/blacklist.acl
|
||||
@@ -137,11 +150,12 @@ elif cat /etc/os-release | grep PRETTY_NAME | grep "CentOS Linux 8"; then
|
||||
firewall-cmd --reload
|
||||
else
|
||||
echo "OS NOT SUPPORTED.\n"
|
||||
echo "Contact https://serverok.in/contact to add support for your os."
|
||||
echo "Contact https://serverok.in/contact to add support for your OS."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "Thank you for using ServerOk.in Squid Proxy Installer."
|
||||
echo "Thank you for using Squid Proxy Installer by ServerOk"
|
||||
echo "To create a proxy user, run command: squid-add-user"
|
||||
echo "To change squid proxy port, see https://serverok.in/how-to-change-port-of-squid-proxy-server"
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user