CloudflareDNS4Magisk-IPv6

@xerta555

Magisk KernelSU APatch
v1.0
Version
25.4 KB
Size
Aug 24, 2025
Updated

Module Info

  • Source Code View Repository
  • Tags
    #CloudflareDNS4Magisk #Cloudflare #DNS #IPv6 #Network #Privacy #Magisk Module #KernelSU #APatch #Systemless

About this module

CloudflareDNS4Magisk-IPv6 is a lightweight systemless network module developed by @xerta555 that redirects all mobile and Wi-Fi DNS traffic through Cloudflare's high-speed, privacy-focused resolvers (1.1.1.1 and 2606:4700:4700::1111) with dual-stack IPv4 and IPv6 support.

Dual-Stack DNS Routing

Enhance network privacy, reduce lookup latency, and prevent ISP DNS hijacking globally across all interfaces.

Native IPv6 Support

Routes DNS queries simultaneously through Cloudflare IPv4 (1.1.1.1, 1.0.0.1) and IPv6 (2606:4700:4700::1111, 2606:4700:4700::1001) servers.

Low Latency Lookups

Leverages Cloudflare's global Anycast network to deliver ultra-fast DNS resolution times for responsive browsing and gaming.

Anti-DNS Hijacking

Forces system-level resolver properties across cellular and Wi-Fi networks to bypass ISP-level DNS manipulation and censorship.

Technical Implementation & Resolution Hook

CloudflareDNS4Magisk-IPv6 operates systemlessly at boot time by configuring Android system network properties and applying iptables / ip6tables redirection rules where supported. It overrides the default dynamic name servers provided by DHCP and cellular gateways.

By updating net.dns1, net.dns2, net.dns3, and net.dns4 properties directly into the Android network daemon (netd), all app connections query Cloudflare nodes without requiring a persistent local VPN slot.

# Active Dual-Stack Target Resolvers
IPv4 Primary: 1.1.1.1
IPv4 Secondary: 1.0.0.1
IPv6 Primary: 2606:4700:4700::1111
IPv6 Secondary: 2606:4700:4700::1001