break DNS on modern android

This commit is contained in:
Guillaume Castagnino 2022-05-15 10:37:57 +02:00
parent 4638288012
commit 4d709ab694
Signed by: casta
SSH Key Fingerprint: SHA256:PtJi7zHrXiSWdLApi+BdpmmbITeLq6cI7LZtgsuAtyk
4 changed files with 0 additions and 21 deletions

View File

@ -3,8 +3,6 @@ __HEADER__
# For OpenCamera to be picked by android 11 camera intend, it must be promoted system application
list_files() {
cat <<EOF
etc/init/reroute-dns.rc
bin/reroute-dns.sh
priv-app/OpenCamera/OpenCamera.apk
EOF
}

View File

@ -1,2 +0,0 @@
on boot
exec u:r:su:s0 root root -- /system/bin/reroute-dns.sh

View File

@ -1,7 +0,0 @@
#!/system/bin/sh
export PATH=/system/bin
iptables -t nat -A OUTPUT ! -o tun0 -p udp --dport 53 -j DNAT --to-destination 1.1.1.1
iptables -t nat -A OUTPUT ! -o tun0 -p tcp --dport 53 -j DNAT --to-destination 1.1.1.1

View File

@ -10,16 +10,6 @@ cd "$(dirname $0)"
export PATH="${PATH}:${SYSTEM}/bin:${SYSTEM}/xbin"
# install iptables script
echo "Installing iptables script"
cp cm-data/reroute-dns.sh ${SYSTEM}/bin/reroute-dns.sh
chown root:root ${SYSTEM}/bin/reroute-dns.sh
chmod 755 ${SYSTEM}/bin/reroute-dns.sh
# install iptables rc
cp cm-data/reroute-dns.rc ${SYSTEM}/etc/init/reroute-dns.rc
chown root:root ${SYSTEM}/etc/init/reroute-dns.rc
chmod 644 ${SYSTEM}/etc/init/reroute-dns.rc
# install restore script
echo "Installing restore script"
cp cm-data/99-perso.sh.addon ${SYSTEM}/addon.d/99-perso.sh