mirror of
https://github.com/bol-van/zapret.git
synced 2024-11-26 12:10:53 +03:00
blockcheck: fix auto doh enable if dns is spoofed
This commit is contained in:
parent
6e8dbb045a
commit
d8c07baab7
@ -1854,7 +1854,6 @@ check_dns_()
|
|||||||
echo -- POSSIBLE DNS HIJACK DETECTED. ZAPRET WILL NOT HELP YOU IN CASE DNS IS SPOOFED !!!
|
echo -- POSSIBLE DNS HIJACK DETECTED. ZAPRET WILL NOT HELP YOU IN CASE DNS IS SPOOFED !!!
|
||||||
echo -- DNS CHANGE OR DNSCRYPT MAY BE REQUIRED
|
echo -- DNS CHANGE OR DNSCRYPT MAY BE REQUIRED
|
||||||
DNS_IS_SPOOFED=1
|
DNS_IS_SPOOFED=1
|
||||||
USE_SECURE_DNS=${USE_SECURE_DNS:-1}
|
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
echo $dom : OK
|
echo $dom : OK
|
||||||
@ -1885,7 +1884,6 @@ check_dns_()
|
|||||||
echo -- DNSCRYPT MAY BE REQUIRED
|
echo -- DNSCRYPT MAY BE REQUIRED
|
||||||
check_dns_cleanup
|
check_dns_cleanup
|
||||||
DNS_IS_SPOOFED=1
|
DNS_IS_SPOOFED=1
|
||||||
USE_SECURE_DNS=${USE_SECURE_DNS:-1}
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
echo all resolved IPs are unique
|
echo all resolved IPs are unique
|
||||||
@ -1900,7 +1898,13 @@ check_dns()
|
|||||||
local r
|
local r
|
||||||
check_dns_
|
check_dns_
|
||||||
r=$?
|
r=$?
|
||||||
[ "$SECURE_DNS" = 1 ] && doh_find_working
|
[ "$DNS_IS_SPOOFED" = 1 ] && SECURE_DNS=${SECURE_DNS:-1}
|
||||||
|
[ "$SECURE_DNS" = 1 ] && {
|
||||||
|
doh_find_working || {
|
||||||
|
echo could not find working DoH server. exiting.
|
||||||
|
exitp 7
|
||||||
|
}
|
||||||
|
}
|
||||||
return $r
|
return $r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user