From 2ba0ccc0785fda137eecebdbc370b4fbbf76ea21 Mon Sep 17 00:00:00 2001 From: wulabing Date: Wed, 27 Nov 2019 15:52:23 +0800 Subject: [PATCH] =?UTF-8?q?tls=5Ftype=20=E6=B7=BB=E5=8A=A0=20TLS1.1=20?= =?UTF-8?q?=E9=80=89=E9=A1=B9=EF=BC=8C=E5=90=91=E4=B8=8B=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 6c716ee..6c475ec 100644 --- a/install.sh +++ b/install.sh @@ -525,13 +525,17 @@ judge "Nginx systemd ServerFile 添加" tls_type(){ if [[ -f "/etc/nginx/sbin/nginx" ]] && [[ -f "$nginx_conf" ]];then echo "请选择支持的 TLS 版本(default:1):" - echo "1: TLS1.2 and TLS1.3" - echo "2: TLS1.3 only" + echo "1: TLS1.1 TLS1.2 and TLS1.3" + echo "2: TLS1.2 and TLS1.3" + echo "3: TLS1.3 only" read -p "请输入:" tls_version - [[ -z ${tls_version} ]] && tls_version=1 - if [[ $tls_version == 2 ]];then + [[ -z ${tls_version} ]] && tls_version=2 + if [[ $tls_version == 3 ]];then sed -i 's/ssl_protocols.*/ssl_protocols TLSv1.3;/' $nginx_conf echo -e "${OK} ${GreenBG} 已切换至 TLS1.3 only ${Font}" + elif [[ $tls_version == 1 ]];then + sed -i 's/ssl_protocols.*/ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;/' $nginx_conf + echo -e "${OK} ${GreenBG} 已切换至 TLS1.3 only ${Font}" else sed -i 's/ssl_protocols.*/ssl_protocols TLSv1.2 TLSv1.3;/' $nginx_conf echo -e "${OK} ${GreenBG} 已切换至TLS1.2 and TLS1.3 ${Font}"