Merge pull request #8 from lindroidux/updated-service.sh

updated-service.sh
This commit is contained in:
George Daniel 2019-06-12 16:39:23 +00:00 committed by GitHub
commit 6743fede72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -6,13 +6,14 @@
# if Magisk change its mount point in the future # if Magisk change its mount point in the future
MODDIR=${0%/*} MODDIR=${0%/*}
# change config directory from /system/etc to /data/media/0/dnscrypt-proxy
# /sdcard is softlink to /data/media/0 in lineageos 16
while ! [ `pgrep -x dnscrypt-proxy` ] ; do
$MODDIR/system/bin/dnscrypt-proxy -config /data/media/0/dnscrypt-proxy/dnscrypt-proxy.toml;
done
# change config directory from /system/etc to /data/media/0/dnscrypt-proxy
# /sdcard is softlink to /data/media/0 in lineageos 16
$MODDIR/system/bin/dnscrypt-proxy -config /data/media/0/dnscrypt-proxy/dnscrypt-proxy.toml
#IPTABLES #IPTABLES
iptables -t nat -A OUTPUT -p tcp ! -d 1.1.1.1 --dport 53 -j DNAT --to-destination 127.0.0.1:5354 iptables -t nat -A OUTPUT -p tcp ! -d 1.1.1.1 --dport 53 -j DNAT --to-destination 127.0.0.1:5354
iptables -t nat -A OUTPUT -p udp ! -d 1.1.1.1 --dport 53 -j DNAT --to-destination 127.0.0.1:5354 iptables -t nat -A OUTPUT -p udp ! -d 1.1.1.1 --dport 53 -j DNAT --to-destination 127.0.0.1:5354
ip6tables -t nat -A OUTPUT -p tcp ! -d 1.1.1.1 --dport 53 -j DNAT --to-destination [::1]:5354 ip6tables -t nat -A OUTPUT -p tcp ! -d 1.1.1.1 --dport 53 -j DNAT --to-destination [::1]:5354
ip6tables -t nat -A OUTPUT -p udp ! -d 1.1.1.1 --dport 53 -j DNAT --to-destination [::1]:5354 ip6tables -t nat -A OUTPUT -p udp ! -d 1.1.1.1 --dport 53 -j DNAT --to-destination [::1]:5354