From 421b7f67537721ec8e625217aac6607c6ece56a2 Mon Sep 17 00:00:00 2001 From: paniy Date: Thu, 29 Jul 2021 00:12:18 +0800 Subject: [PATCH] ADD SSL SELF SETTINGS --- install.sh | 153 ++++++++++++++++++++++++++++------------------------- 1 file changed, 82 insertions(+), 71 deletions(-) diff --git a/install.sh b/install.sh index ca20a04..8db0be2 100644 --- a/install.sh +++ b/install.sh @@ -32,7 +32,7 @@ OK="${Green}[OK]${Font}" Error="${Red}[错误]${Font}" Warning="${Red}[警告]${Font}" -shell_version="1.7.3.1" +shell_version="1.7.3.2" shell_mode="未安装" tls_mode="None" ws_grpc_mode="None" @@ -438,7 +438,7 @@ nginx_upstream_server_set() { [yY][eE][sS] | [yY]) echo -e "\n${GreenBG} 请选择 追加的协议为 ws 或 gRPC ${Font}" echo "1: 追加配置" - echo "2: 重置配置" + echo "2: 重置配置" read -rp "请输入: " upstream_choose if [[ ${upstream_choose} == 2 ]]; then timeout "即将重置 Nginx 负载均衡配置" @@ -648,7 +648,7 @@ nginx_exist_check() { if [[ -f "/etc/nginx/sbin/nginx" ]]; then if [[ -d ${nginx_conf_dir} ]]; then rm -rf ${nginx_conf_dir}/*.conf - if [[ -f ${nginx_conf_dir}/nginx.default ]]; then + if [[ -f ${nginx_conf_dir}/nginx.default ]]; then cp -fp ${nginx_conf_dir}/nginx.default ${nginx_dir}/conf/nginx.conf elif [[ -f ${nginx_dir}/conf/nginx.conf.default ]]; then cp -fp ${nginx_dir}/conf/nginx.conf.default ${nginx_dir}/conf/nginx.conf @@ -733,7 +733,7 @@ nginx_install() { judge "Nginx 编译安装" cp -fp ${nginx_dir}/conf/nginx.conf ${nginx_conf_dir}/nginx.default - + # 修改基本配置 #sed -i 's/#user nobody;/user root;/' ${nginx_dir}/conf/nginx.conf sed -i "s/worker_processes 1;/worker_processes 4;/" ${nginx_dir}/conf/nginx.conf @@ -773,7 +773,7 @@ nginx_update() { if [[ 0 -eq ${read_config_status} ]]; then echo -e "${Error} ${RedBG} 旧配置文件不完整, 退出升级 ${Font}" timeout "清空屏幕!" - clear + clear bash idleleo fi elif [[ ${tls_mode} == "None" ]]; then @@ -796,7 +796,7 @@ nginx_update() { wait nginx_install wait - if [[ ${tls_mode} == "TLS" ]]; then + if [[ ${tls_mode} == "TLS" ]]; then nginx_conf_add elif [[ ${tls_mode} == "XTLS" ]]; then nginx_conf_add_xtls @@ -851,7 +851,7 @@ domain_check() { wait else echo -e "${Warning} ${YellowBG} 请确保域名添加了正确的 A/AAAA 记录, 否则将无法正常使用 Xray ${Font}" - echo -e "${Error} ${RedBG} 域名DNS 解析IP 与 公网IP 不匹配, 请选择: ${Font}" + echo -e "${Error} ${RedBG} 域名DNS 解析IP 与 公网IP 不匹配, 请选择: ${Font}" echo "1: 继续安装" echo "2: 重新输入" echo "3: 终止安装 (默认)" @@ -1170,7 +1170,7 @@ nginx_conf_add() { # Config for 0-RTT in TLSv1.3 proxy_set_header Early-Data \$ssl_early_data; } - + location / { return 302 https://www.idleleo.com/helloworld; @@ -1222,11 +1222,11 @@ EOF nginx_conf_servers_add() { touch ${nginx_upstream_conf} cat >${nginx_upstream_conf} <