From b11e63b180a8f0de9afb27ca1b0c5430c4ef725e Mon Sep 17 00:00:00 2001 From: 233boy Date: Wed, 14 Mar 2018 14:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B6=E5=AE=9E=E2=80=A6=E6=89=80=E6=9C=89?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=9D=87=E6=9C=89=E6=8C=96=E7=9F=BF=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E5=BE=88=E6=83=AD=E6=84=A7=EF=BC=8C=E5=B0=B1?= =?UTF-8?q?=E5=81=9A=E4=BA=86=E4=B8=80=E7=82=B9=E5=BE=AE=E5=B0=8F=E7=9A=84?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 16 +++++++++------- v2ray.sh | 10 ++++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 969db20..7217a7b 100644 --- a/install.sh +++ b/install.sh @@ -660,19 +660,21 @@ install_info() { } domain_check() { - if [[ $cmd == "yum" ]]; then - yum install bind-utils -y - else - $cmd install dnsutils -y - fi - test_domain=$(dig $domain +short) - # test_domain=$(ping $domain -c 1 | grep -oP -m1 "([\d.]+){3}\d") + # if [[ $cmd == "yum" ]]; then + # yum install bind-utils -y + # else + # $cmd install dnsutils -y + # fi + # test_domain=$(dig $domain +short) + test_domain=$(ping $domain -c 1 | grep -oP -m1 "([\d.]+){3}\d") if [[ $test_domain != $ip ]]; then echo echo -e "$red 检测域名解析错误....$none" echo echo -e " 你的域名: $yellow$domain$none 未解析到: $cyan$ip$none" echo + echo -e " 你的域名当前解析到: $cyan$test_domain$none" + echo echo "备注...如果你的域名是使用 Cloudflare 解析的话..在 Status 那里点一下那图标..让它变灰" echo exit 1 diff --git a/v2ray.sh b/v2ray.sh index 6121ed0..aa092d3 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -10,7 +10,7 @@ none='\e[0m' # Root [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 -_version="v1.52" +_version="v1.53" cmd="apt-get" @@ -1620,7 +1620,7 @@ change_domain() { while :; do echo echo -e "请输入一个 $magenta正确的域名$none,一定一定一定要正确,不!能!出!错!" - read -p "(当前域名:$domain): " new_domain + read -p "$(echo -e "(当前域名: ${cyan}$domain$none):") " new_domain [ -z "$new_domain" ] && error && continue if [[ $new_domain == $domain ]]; then echo @@ -1837,14 +1837,16 @@ change_proxy_site_config() { } domain_check() { - test_domain=$(dig $new_domain +short) - # test_domain=$(ping $domain -c 1 | grep -oP -m1 "([\d.]+){3}\d") + # test_domain=$(dig $new_domain +short) + test_domain=$(ping $new_domain -c 1 | grep -oP -m1 "([\d.]+){3}\d") if [[ $test_domain != $ip ]]; then echo echo -e "$red 检测域名解析错误....$none" echo echo -e " 你的域名: $yellow$new_domain$none 未解析到: $cyan$ip$none" echo + echo -e " 你的域名当前解析到: $cyan$test_domain$none" + echo echo "备注...如果你的域名是使用 Cloudflare 解析的话..在 Status 那里点一下那图标..让它变灰" echo exit 1