DNS VPN Auto-Toggle

Magisk KSU APatch

Say goodbye to connection drops and captive portal errors. DNS VPN Auto-Toggle by ceryneian775 is a lightweight automation module that dynamically manages your Private DNS and VPN connections, adapting instantly whenever you switch between Wi-Fi and Cellular networks.

Seamless Network Automation

A smart background utility that handles your privacy and routing settings so you don't have to.

Smart Switching

Detects network changes instantly. Automatically disables strict Private DNS when joining public Wi-Fi networks to allow captive portal logins.

VPN Synchronization

Toggles compatible VPN applications based on predefined triggers, ensuring your privacy is maintained when moving to untrusted networks.

Systemless Execution

Operates completely systemlessly via Magisk, KernelSU, or APatch. No permanent modifications are made to your Android OS.

How It Works

By default, Android's Private DNS feature (DNS-over-TLS) can be rigid. When active, it often prevents the local resolution required to load hotel, airport, or cafe Wi-Fi login pages (captive portals). Similarly, keeping a VPN constantly active can cause local network conflicts.

DNS VPN Auto-Toggle utilizes advanced shell scripting executed safely in the background. It listens for CONNECTIVITY_ACTION broadcasts. When a change is detected (e.g., Cellular to Wi-Fi), the script uses root privileges via the settings put global private_dns_mode command to temporarily disable DNS until the connection is fully established and authenticated, then seamlessly turns it back on.

Frequently Asked Questions

While the module comes with sane defaults that work out-of-the-box for most users, advanced users can edit the configuration files located inside the module directory to specify exact VPN package names or custom DNS providers.

This module is typically compatible with Android 9 (Pie) and higher, as this is when the native Private DNS feature was officially introduced to the Android operating system.

Module Info

  • Version Latest
  • Module By
    ceryneian775
  • Contributors ceryneian775
  • Source Code View Repository
  • Tags
    #DNS #VPN #Automation #Network #Magisk Module #KernelSU #APatch
  • Requirement
    Magisk KernelSU APatch
  • Latest Update