mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-01-13 01:02:46 +00:00
Refactor ca-certificate dependency (#3655)
This commit is contained in:
parent
ccf08086ac
commit
427b7b67d8
2 changed files with 8 additions and 38 deletions
16
install.sh
16
install.sh
|
|
@ -59,29 +59,29 @@ is_domain() {
|
||||||
install_base() {
|
install_base() {
|
||||||
case "${release}" in
|
case "${release}" in
|
||||||
ubuntu | debian | armbian)
|
ubuntu | debian | armbian)
|
||||||
apt-get update && apt-get install -y -q curl tar tzdata socat
|
apt-get update && apt-get install -y -q curl tar tzdata socat ca-certificates
|
||||||
;;
|
;;
|
||||||
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
|
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
|
||||||
dnf -y update && dnf install -y -q curl tar tzdata socat
|
dnf -y update && dnf install -y -q curl tar tzdata socat ca-certificates
|
||||||
;;
|
;;
|
||||||
centos)
|
centos)
|
||||||
if [[ "${VERSION_ID}" =~ ^7 ]]; then
|
if [[ "${VERSION_ID}" =~ ^7 ]]; then
|
||||||
yum -y update && yum install -y curl tar tzdata socat
|
yum -y update && yum install -y curl tar tzdata socat ca-certificates
|
||||||
else
|
else
|
||||||
dnf -y update && dnf install -y -q curl tar tzdata socat
|
dnf -y update && dnf install -y -q curl tar tzdata socat ca-certificates
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
arch | manjaro | parch)
|
arch | manjaro | parch)
|
||||||
pacman -Syu && pacman -Syu --noconfirm curl tar tzdata socat
|
pacman -Syu && pacman -Syu --noconfirm curl tar tzdata socat ca-certificates
|
||||||
;;
|
;;
|
||||||
opensuse-tumbleweed | opensuse-leap)
|
opensuse-tumbleweed | opensuse-leap)
|
||||||
zypper refresh && zypper -q install -y curl tar timezone socat
|
zypper refresh && zypper -q install -y curl tar timezone socat ca-certificates
|
||||||
;;
|
;;
|
||||||
alpine)
|
alpine)
|
||||||
apk update && apk add curl tar tzdata socat
|
apk update && apk add curl tar tzdata socat ca-certificates
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
apt-get update && apt-get install -y -q curl tar tzdata socat
|
apt-get update && apt-get install -y -q curl tar tzdata socat ca-certificates
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
||||||
30
x-ui.sh
30
x-ui.sh
|
|
@ -539,36 +539,6 @@ enable_bbr() {
|
||||||
before_show_menu
|
before_show_menu
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check the OS and install necessary packages
|
|
||||||
case "${release}" in
|
|
||||||
ubuntu | debian | armbian)
|
|
||||||
apt-get update && apt-get install -yqq --no-install-recommends ca-certificates
|
|
||||||
;;
|
|
||||||
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
|
|
||||||
dnf -y update && dnf -y install ca-certificates
|
|
||||||
;;
|
|
||||||
centos)
|
|
||||||
if [[ "${VERSION_ID}" =~ ^7 ]]; then
|
|
||||||
yum -y update && yum -y install ca-certificates
|
|
||||||
else
|
|
||||||
dnf -y update && dnf -y install ca-certificates
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
arch | manjaro | parch)
|
|
||||||
pacman -Sy --noconfirm ca-certificates
|
|
||||||
;;
|
|
||||||
opensuse-tumbleweed | opensuse-leap)
|
|
||||||
zypper refresh && zypper -q install -y ca-certificates
|
|
||||||
;;
|
|
||||||
alpine)
|
|
||||||
apk add ca-certificates
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo -e "${red}Unsupported operating system. Please check the script and install the necessary packages manually.${plain}\n"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Enable BBR
|
# Enable BBR
|
||||||
echo "net.core.default_qdisc=fq" | tee -a /etc/sysctl.conf
|
echo "net.core.default_qdisc=fq" | tee -a /etc/sysctl.conf
|
||||||
echo "net.ipv4.tcp_congestion_control=bbr" | tee -a /etc/sysctl.conf
|
echo "net.ipv4.tcp_congestion_control=bbr" | tee -a /etc/sysctl.conf
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue