First connection: Grant VPN permission
First, establish a working connection while the screen is on, then troubleshoot disconnects when the screen is locked. On first launch, approve Android’s “Connection request.” If the VPN connects successfully but disappears after the screen locks, check battery and background restrictions first. If the VPN still shows as connected but webpages won’t load, check network changes, rules, and proxy nodes.
- In Clash Meta for Android, select an imported profile under “Profiles,” return to the home screen, then tap “Stopped” to connect. Status labels may vary slightly between builds.
- When Android displays a “Connection request,” check the app name in the prompt. If it’s the client you just launched, tap “OK.” Once permission is granted, Android lets the client use
VpnServiceto create a virtual network interface and receive traffic routed to it by the system. - In Android Settings, search for “VPN” and confirm that Clash Meta for Android is the active connection. In a browser, open one site that should connect directly and another that should use the proxy. Then check the client’s “Logs” for the corresponding domains, rules, and outbound connections.
The system VPN notification or key icon only shows that the connection is active; it doesn’t mean every request is going through the proxy. The mihomo core typically selects a direct connection, proxy, or rejection based on the rules. If per-app routing is enabled, a browser excluded from the VPN can’t be used to verify proxy rules.
Disconnects When Locked: Remove Background Restrictions by Manufacturer
Android Doze restricts some background network activity and tasks when a device is idle. Manufacturer-specific software may also put apps to sleep or close them. Existing network connections may simply time out, or the client process may be stopped, which also closes the VPN interface. Exempting an app from battery optimization reduces restrictions on its activity, but can’t preserve every existing connection or guarantee that the process will never be stopped.
Start by long-pressing the home screen icon to open “App info” and adjust settings for Clash Meta for Android only. Then run the screen-lock test described below. The paths here are examples for each system family; menus may differ between regional versions. If you can’t find a setting, search Settings for the menu name shown.
Pixel: App battery usage on Android 14
- Go to Settings → Apps → See all apps → Clash Meta for Android, then open “App battery usage.”
- If you see “Unrestricted,” “Optimized,” and “Restricted,” select “Unrestricted.” If there’s an “Allow background usage” switch, turn it on first, then open that entry to check for additional battery options.
- Return to the client, connect manually, then lock the screen and test again. You don’t need to turn off Battery Saver for the entire device to do this.
Xiaomi and Redmi: HyperOS battery settings and background autostart
- Long-press the app icon to open “App info,” then open “Battery saver” and select “No restrictions.” This helps troubleshoot connections that work initially but drop after the app has been in the background for a while.
- If the issue occurs after a reboot, or the app can’t reconnect after being closed, search Settings for “Background autostart” and enable it for Clash Meta for Android. On some HyperOS versions, go to Settings → Apps → Permissions → Autostart. Some MIUI versions label the setting “Autostart.”
- After saving the settings, launch the app manually and test the locked-screen connection first, then test after a reboot separately. Locking the app in Recents is not a battery optimization exemption: it mainly prevents the app from being removed when you clear recent apps and doesn’t replace battery settings.
Samsung: Background usage limits in One UI 6
- Go to Settings → Battery → Background usage limits. If Battery is under “Battery and device care” on your device, open that section first.
- Check “Sleeping apps” and “Deep sleeping apps.” If Clash Meta for Android is listed, remove it. Then add the client to “Never auto sleeping apps.” Some versions call this “Never sleeping apps.”
- If App info → Battery still shows “Restricted,” change the setting to “Unrestricted” and test again. There’s no need to turn off auto-sleep for every app to troubleshoot one client.
No Connection After Reboot: Autostart vs. Always-On VPN
A manufacturer’s autostart setting allows certain background launches; it doesn’t necessarily make the app establish a VPN connection at boot. “Always-on VPN” lets Android try to start and maintain the selected VPN service, provided the client build supports it. Even if the option is available, test after a reboot to confirm the profile and network work.
- Search Settings for “VPN,” then tap the gear icon next to the client. If “Always-on VPN” is available, enable it and test after a reboot. If the option is missing, unavailable, or controlled by an organization’s policy, don’t use the manufacturer’s autostart switch to infer whether Always-on VPN is working.
- After rebooting, unlock the phone and wait for Wi-Fi or mobile data to connect. Check the system VPN page before opening the client. This helps determine whether Android restored the connection or opening the app triggered it.
- While verifying the basic connection, leave “Block connections without VPN” turned off. This option can prevent apps from accessing the internet outside the VPN; if the VPN hasn’t connected yet, affected apps may appear to have no internet access.
DIRECTin your rules is a direct outbound connection made after traffic reaches the client. That’s separate from whether Android allows an app to bypass the VPN.
Don’t use “Force stop” in App info to simulate locking the screen. It explicitly stops the app, so it doesn’t reflect what happens when you return to the home screen or Android stops a background process. If you tapped it by mistake, reopen the client and reconnect before continuing the test.
Compare Screen-Lock and Network-Switch Tests
Change one setting per test. Keep the profile, policy group, and node the same, and record the Android version, client version, test time, and network type. Use webpages you can refresh; don’t treat a browser cache as proof that the network is still working. The time intervals below are checkpoints for testing, not fixed thresholds for Android to enter sleep mode.
- Screen-on baseline: Connect to your home Wi-Fi and open one page matched by
DIRECTand another matched by a proxy policy group. Check “Logs” for both new requests. If either fails while the screen is on, fix the profile or node before testing with the screen locked. - Screen-lock test: Unplug the charger, keep Wi-Fi connected, and lock the screen for 15 minutes. After unlocking, don’t open the client yet. Check the system VPN status, then refresh the same two pages. If the short test passes but you still get occasional disconnects, repeat under the same conditions for 60 minutes.
- Network switch: With the screen on, turn off Wi-Fi and confirm mobile data is working, then refresh the same pages. Record what happens 10 and 30 seconds after switching. It’s not unusual for an existing connection to drop during a network change; the key is whether new requests recover.
- VPN disappears after locking: Recheck the app’s battery mode, the manufacturer’s sleep list, and whether another app has taken over the VPN. If opening the app manually restores the connection, check autostart and “Always-on VPN.”
- VPN is active; direct sites work, but proxy sites fail: Check the client logs to confirm which policy group was selected, then test another known-working node in the same group. If the original node only fails on mobile data, check connectivity from that network to the node instead of expanding battery exemptions.
- VPN is active, but both types of sites fail: First check whether Wi-Fi requires a sign-in, mobile data is unavailable, or the network switch hasn’t completed. If the logs show DNS timeouts, check your DNS settings. A key icon or latency test alone can’t confirm that browser requests are working again.
Once the connection is stable, keep only the settings that made a difference in your tests. For example, if removing the client from Samsung’s “Deep sleeping apps” list fixes two screen-lock tests, there’s no need to enable reboot recovery options as well. If disconnects return after a major system update, check VPN status, battery settings, and actual requests in the same order.