From e37db7f4c4ce283595443ead1f42b4849c2bafe1 Mon Sep 17 00:00:00 2001 From: paniy Date: Fri, 9 Apr 2021 14:47:03 +0800 Subject: [PATCH] DNS optimize --- VLESS_tls/config.json | 8 ++++---- VLESS_xtls/config.json | 8 ++++---- install.sh | 14 ++++++++------ 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/VLESS_tls/config.json b/VLESS_tls/config.json index de8f094..109a612 100644 --- a/VLESS_tls/config.json +++ b/VLESS_tls/config.json @@ -36,12 +36,12 @@ ], "dns": { "servers": [ - "https+local://1.1.1.1/dns-query", - "1.1.1.1", - "1.0.0.1", "8.8.8.8", "8.8.4.4", - "localhost" + "1.1.1.1", + "1.0.0.1", + "localhost", + "https+local://1.1.1.1/dns-query" ] }, "routing": { diff --git a/VLESS_xtls/config.json b/VLESS_xtls/config.json index 25704d3..20ab72f 100644 --- a/VLESS_xtls/config.json +++ b/VLESS_xtls/config.json @@ -67,12 +67,12 @@ ], "dns": { "servers": [ - "https+local://1.1.1.1/dns-query", - "1.1.1.1", - "1.0.0.1", "8.8.8.8", "8.8.4.4", - "localhost" + "1.1.1.1", + "1.0.0.1", + "localhost", + "https+local://1.1.1.1/dns-query" ] }, "routing": { diff --git a/install.sh b/install.sh index fa740e5..f98d960 100644 --- a/install.sh +++ b/install.sh @@ -33,7 +33,7 @@ Error="${Red}[错误]${Font}" Warning="${Red}[警告]${Font}" # 版本 -shell_version="1.5.5.2" +shell_version="1.5.5.6" shell_mode="None" shell_mode_show="未安装" version_cmp="/tmp/version_cmp.tmp" @@ -1346,23 +1346,25 @@ install_xray_ws_only() { update_sh() { ol_version=$(curl -L -s https://raw.githubusercontent.com/paniy/Xray_bash_onekey/main/install.sh | grep "shell_version=" | head -1 | awk -F '=|"' '{print $3}') echo "$ol_version" >$version_cmp + [[ -z ${ol_version} ]] && echo -e "${Error} ${RedBG} 检测最新版本失败! ${Font}" && bash idleleo echo "$shell_version" >>$version_cmp - if [[ "$shell_version" < "$(sort -rV $version_cmp | head -1)" ]]; then + if [[ "$shell_version" != "$(sort -rV $version_cmp | head -1)" ]]; then echo -e "${GreenBG} 存在新版本, 是否更新 [Y/N]? ${Font}" read -r update_confirm case $update_confirm in [yY][eE][sS] | [yY]) rm -f ${idleleo_commend_file} wget -N --no-check-certificate -P ${idleleo_xray_dir} https://raw.githubusercontent.com/paniy/Xray_bash_onekey/main/install.sh && chmod +x ${idleleo_xray_dir}/install.sh - ln -s ${idleleo_xray_dir}/install.sh ${idleleo_commend_file} echo -e "${OK} ${GreenBG} 更新完成 ${Font}" - exit 0 + ln -s ${idleleo_xray_dir}/install.sh ${idleleo_commend_file} + bash idleleo ;; *) ;; esac else echo -e "${OK} ${GreenBG} 当前版本为最新版本 ${Font}" + bash idleleo fi } @@ -1409,7 +1411,7 @@ idleleo_commend() { } menu() { - update_sh + echo -e "\nXray 安装管理脚本 ${Red}[${shell_version}]${Font}" echo -e "--- authored by paniy ---" echo -e "--- changed by www.idleleo.com ---" @@ -1445,7 +1447,7 @@ menu() { read -rp "请输入数字: " menu_num case $menu_num in 0) - bash idleleo + update_sh ;; 1) shell_mode="ws"