Merge pull request #384 from zqigolden/fix$domain

Fix a bug when applying ws+tls method
pull/426/head
233boy 5 years ago committed by GitHub
commit 5ba3d52f78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      v2ray.sh

@ -1765,7 +1765,7 @@ domain_check() {
# 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=$(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=$(curl -sH '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=$(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
echo
echo -e "$red 检测域名解析错误....$none"

Loading…
Cancel
Save