mirror of https://github.com/mack-a/v2ray-agent
feat(脚本): 优化dns IP校验
parent
af082db77e
commit
77f2685932
|
@ -1098,9 +1098,9 @@ checkDNSIP() {
|
|||
local domain=$1
|
||||
local dnsIP=
|
||||
local type=4
|
||||
dnsIP=$(dig @1.1.1.1 +time=2 +short "${domain}")
|
||||
dnsIP=$(dig @1.1.1.1 +time=2 +short "${domain}" | grep -E "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$")
|
||||
if [[ -z "${dnsIP}" ]]; then
|
||||
dnsIP=$(dig @8.8.8.8 +time=2 +short "${domain}")
|
||||
dnsIP=$(dig @8.8.8.8 +time=2 +short "${domain}" | grep -E "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$")
|
||||
fi
|
||||
if echo "${dnsIP}" | grep -q "timed out" || [[ -z "${dnsIP}" ]]; then
|
||||
echo
|
||||
|
@ -8470,7 +8470,7 @@ menu() {
|
|||
cd "$HOME" || exit
|
||||
echoContent red "\n=============================================================="
|
||||
echoContent green "作者:mack-a"
|
||||
echoContent green "当前版本:v2.11.22"
|
||||
echoContent green "当前版本:v2.11.23"
|
||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||
echoContent green "描述:八合一共存脚本\c"
|
||||
showInstallStatus
|
||||
|
|
Loading…
Reference in New Issue