Cloudflare DNS Enabler by ryu makes your phone use Cloudflare's DNS, 1.1.1.1 and 1.0.0.1, on Wi-Fi and mobile data. It also catches apps that ask a different DNS server and sends those requests to 1.1.1.1 too.
What the boot script does
Everything happens in one post-fs-data.sh that runs at every boot:
- Sets
net.dns1/net.dns2and the mobile-data equivalents (net.rmnet0.dns1/2,net.rmnet1.dns1/2) to 1.1.1.1 and 1.0.0.1 withresetprop. - Adds two
iptablesNAT rules that rewrite every outgoing DNS request on port 53, UDP and TCP, to 1.1.1.1. Apps with a hard-coded DNS server end up at Cloudflare as well.
iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination 1.1.1.1:53
iptables -t nat -A OUTPUT -p tcp --dport 53 -j DNAT --to-destination 1.1.1.1:53Good to know
- It's plain DNS on port 53, not encrypted. The README lists DNS over HTTPS as a future plan; v1.0 is described as "the initial & possibly the final release".
- The redirect rules are IPv4 only (
iptables, noip6tables), so DNS requests over IPv6 aren't rewritten. - Android's Private DNS uses port 853, which these rules don't touch. If you have Private DNS set to a hostname, that keeps working as before.
- The redirect always goes to 1.1.1.1; 1.0.0.1 is only set as the secondary DNS property.
Install, check, remove
- Install
ohyescloudflareV1.zipfrom the Modules screen in Magisk (v20.4 or newer) and reboot. - Open
https://one.one.one.one/helpin a browser and look for "Connected to 1.1.1.1". - To undo it, remove the module and reboot. The rules and properties are only set at boot, so they're gone after the restart.
MIT licensed. Support is in the author's Telegram chat linked from the repository.