From 2127b48580288b36a377cfb991864d99555b9e38 Mon Sep 17 00:00:00 2001 From: bluemeda Date: Wed, 7 Mar 2018 00:31:52 +0700 Subject: [PATCH] try resolve download.dnscrypt.info first --- common/service.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/service.sh b/common/service.sh index 7e28fcb..4c30267 100755 --- a/common/service.sh +++ b/common/service.sh @@ -6,12 +6,14 @@ MODDIR=${0%/*} # This script will be executed in late_start service mode # More info in the main Magisk thread -$MODDIR/system/xbin/dnscrypt-proxy -config $MODDIR/system/etc/dnscrypt-proxy/dnscrypt-proxy.toml & while true do - ping -c 1 google.com + ping -c 1 download.dnscrypt.info if [[ $? == 0 ]]; then + + $MODDIR/system/xbin/dnscrypt-proxy -config $MODDIR/system/etc/dnscrypt-proxy/dnscrypt-proxy.toml & + sleep 5 iptables -t nat -A OUTPUT -p tcp --dport 53 -j DNAT --to-destination 127.0.0.1:5353 iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination 127.0.0.1:5353 break;