mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-15 19:22:54 +08:00
fix DoH/DoT always fallback check /etc/ssl/
This commit is contained in:
parent
999e42c9b1
commit
52d3fa08d9
|
@ -608,9 +608,8 @@ setdns(){ #DNS设置
|
|||
|
||||
elif [ "$num" = 4 ]; then
|
||||
echo -----------------------------------------------
|
||||
openssldir=$(openssl version -a 2>&1 | grep OPENSSLDIR | awk -F "\"" '{print $2}')
|
||||
[ -z "$openssldir" ] && openssldir=/etc/ssl
|
||||
if [ -s "$openssldir/certs/ca-certificates.crt" ];then
|
||||
openssldir="$(openssl version -d 2>&1 | awk -F '"' '{print $2}')"
|
||||
if [ -s "$openssldir/certs/ca-certificates.crt" -o "/etc/ssl/certs/ca-certificates.crt" ];then
|
||||
dns_nameserver='https://223.5.5.5/dns-query, https://doh.pub/dns-query, tls://dns.rubyfish.cn:853'
|
||||
dns_fallback='tls://1.0.0.1:853, tls://8.8.4.4:853, https://doh.opendns.com/dns-query'
|
||||
setconfig dns_nameserver \'"$dns_nameserver"\'
|
||||
|
|
Loading…
Reference in New Issue
Block a user