|
|
@ -10,7 +10,7 @@ none='\e[0m' |
|
|
|
# Root |
|
|
|
# Root |
|
|
|
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 |
|
|
|
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 |
|
|
|
|
|
|
|
|
|
|
|
_version="v3.21" |
|
|
|
_version="v3.22" |
|
|
|
|
|
|
|
|
|
|
|
cmd="apt-get" |
|
|
|
cmd="apt-get" |
|
|
|
|
|
|
|
|
|
|
@ -1763,8 +1763,8 @@ change_proxy_site_config() { |
|
|
|
} |
|
|
|
} |
|
|
|
domain_check() { |
|
|
|
domain_check() { |
|
|
|
# test_domain=$(dig $new_domain +short) |
|
|
|
# test_domain=$(dig $new_domain +short) |
|
|
|
# test_domain=$(ping $domain -c 1 -4 | grep -oE -m1 "([0-9]{1,3}\.){3}[0-9]{1,3}") |
|
|
|
# test_domain=$(ping $new_domain -c 1 -4 | grep -oE -m1 "([0-9]{1,3}\.){3}[0-9]{1,3}") |
|
|
|
# test_domain=$(wget -qO- --header='accept: application/dns-json' "https://cloudflare-dns.com/dns-query?name=$domain&type=A" | grep -oE "([0-9]{1,3}\.){3}[0-9]{1,3}" | head -1) |
|
|
|
# test_domain=$(wget -qO- --header='accept: application/dns-json' "https://cloudflare-dns.com/dns-query?name=$new_domain&type=A" | grep -oE "([0-9]{1,3}\.){3}[0-9]{1,3}" | head -1) |
|
|
|
test_domain=$(curl -sH 'accept: application/dns-json' "https://cloudflare-dns.com/dns-query?name=$new_domain&type=A" | grep -oE "([0-9]{1,3}\.){3}[0-9]{1,3}" | head -1) |
|
|
|
test_domain=$(curl -sH 'accept: application/dns-json' "https://cloudflare-dns.com/dns-query?name=$new_domain&type=A" | grep -oE "([0-9]{1,3}\.){3}[0-9]{1,3}" | head -1) |
|
|
|
if [[ $test_domain != $ip ]]; then |
|
|
|
if [[ $test_domain != $ip ]]; then |
|
|
|
echo |
|
|
|
echo |
|
|
|