From 121086d1c3dd9cb8e1da7ba4fc57f057b9dd6806 Mon Sep 17 00:00:00 2001 From: wulabing Date: Sat, 15 Feb 2020 21:08:15 +0800 Subject: [PATCH] =?UTF-8?q?1.1.0=20=E9=87=8D=E6=96=B0=E5=AE=89=E8=A3=85/?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=97=B6=E6=97=A7=E9=85=8D=E7=BD=AE=E4=BF=9D?= =?UTF-8?q?=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index 8665562..b33b1bd 100644 --- a/install.sh +++ b/install.sh @@ -224,10 +224,13 @@ basic_optimization(){ } port_alterid_set(){ - read -p "请输入连接端口(default:443):" port - [[ -z ${port} ]] && port="443" - read -p "请输入alterID(default:2 仅允许填数字):" alterID - [[ -z ${alterID} ]] && alterID="2" + if [[ "on" != "$old_config_status" ]] + then + read -p "请输入连接端口(default:443):" port + [[ -z ${port} ]] && port="443" + read -p "请输入alterID(default:2 仅允许填数字):" alterID + [[ -z ${alterID} ]] && alterID="2" + fi } modify_path(){ if [[ "on" == "$old_config_status" ]] @@ -485,6 +488,20 @@ acme(){ v2ray_conf_add_tls(){ cd /etc/v2ray wget https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/tls/config.json -O config.json + modify_path + modify_alterid + modify_inbound_port + modify_UUID +} +v2ray_conf_add_h2(){ + cd /etc/v2ray + wget https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/http2/config.json -O config.json + modify_path + modify_alterid + modify_inbound_port + modify_UUID +} +old_config_exist_check(){ if [[ -f $v2ray_qr_config_file ]] then echo -e "${OK} ${Green} 检测到旧配置文件,是否读取旧文件配置 [Y/N]?" @@ -500,18 +517,6 @@ v2ray_conf_add_tls(){ ;; esac fi - modify_path - modify_alterid - modify_inbound_port - modify_UUID -} -v2ray_conf_add_h2(){ - cd /etc/v2ray - wget https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/http2/config.json -O config.json - modify_path - modify_alterid - modify_inbound_port - modify_UUID } nginx_conf_add(){ touch ${nginx_conf_dir}/v2ray.conf @@ -806,6 +811,7 @@ install_v2ray_ws_tls(){ dependency_install basic_optimization domain_check + old_config_exist_check port_alterid_set v2ray_install port_exist_check 80