mirror of https://github.com/mack-a/v2ray-agent
feat(脚本): 修改jq输出方式
parent
49f44c0039
commit
c1436c0939
|
@ -539,11 +539,11 @@ EOF
|
||||||
# 检查ip
|
# 检查ip
|
||||||
checkIP() {
|
checkIP() {
|
||||||
echoContent skyBlue " ---> 检查ipv4中"
|
echoContent skyBlue " ---> 检查ipv4中"
|
||||||
local pingIP=$(curl -s -H 'accept:application/dns-json' 'https://cloudflare-dns.com/dns-query?name='${domain}'&type=A' | jq --raw-output .Answer[0].data)
|
local pingIP=$(curl -s -H 'accept:application/dns-json' 'https://cloudflare-dns.com/dns-query?name='${domain}'&type=A' | jq -r .Answer[0].data)
|
||||||
|
|
||||||
if [[ -z "${pingIP}" ]]; then
|
if [[ -z "${pingIP}" ]]; then
|
||||||
echoContent skyBlue " ---> 检查ipv6中"
|
echoContent skyBlue " ---> 检查ipv6中"
|
||||||
pingIP=$(curl -s -H 'accept:application/dns-json' 'https://cloudflare-dns.com/dns-query?name='${domain}'&type=AAAA' | jq --raw-output .Answer[0].data)
|
pingIP=$(curl -s -H 'accept:application/dns-json' 'https://cloudflare-dns.com/dns-query?name='${domain}'&type=AAAA' | jq -r .Answer[0].data)
|
||||||
pingIPv6=${pingIP}
|
pingIPv6=${pingIP}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue