mirror of https://github.com/wulabing/Xray_onekey
判断逻辑优化
parent
57dfcfb8ce
commit
a727921608
|
@ -518,6 +518,7 @@ judge "Nginx systemd ServerFile 添加"
|
||||||
}
|
}
|
||||||
|
|
||||||
tls_type(){
|
tls_type(){
|
||||||
|
if [[ -f "/etc/nginx/sbin/nginx" ]] && [[ -f "$nginx_conf" ]];then
|
||||||
echo "请选择支持的 TLS 版本(default:1):"
|
echo "请选择支持的 TLS 版本(default:1):"
|
||||||
echo "1: TLS1.2 and TLS1.3"
|
echo "1: TLS1.2 and TLS1.3"
|
||||||
echo "2: TLS1.3 only"
|
echo "2: TLS1.3 only"
|
||||||
|
@ -530,6 +531,10 @@ tls_type(){
|
||||||
sed -i 's/ssl_protocols.*/ssl_protocols TLSv1.2 TLSv1.3;/' $nginx_conf
|
sed -i 's/ssl_protocols.*/ssl_protocols TLSv1.2 TLSv1.3;/' $nginx_conf
|
||||||
echo -e "${OK} ${GreenBG} 已切换至TLS1.2 and TLS1.3 ${Font}"
|
echo -e "${OK} ${GreenBG} 已切换至TLS1.2 and TLS1.3 ${Font}"
|
||||||
fi
|
fi
|
||||||
|
systemctl restart nginx
|
||||||
|
else
|
||||||
|
echo -e "${Error} ${RedBG} Nginx 或 配置文件不存在,请正确安装脚本后执行${Font}"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
main(){
|
main(){
|
||||||
is_root
|
is_root
|
||||||
|
|
Loading…
Reference in New Issue