Platforms 6 min read

Clash Meta for Android: VPN permissions and background battery settings

Learn how Android VPN permissions, per-app proxy settings, and battery optimization affect Clash Meta in the background.

First launch: Allow Android to set up a VPN connection

Android clients powered by mihomo typically use the system’s VpnService to route traffic. It creates a virtual network interface on your device and sends traffic from VPN-enabled apps to the client. The mihomo core then directs, proxies, or blocks that traffic according to your configuration. The system prompt asking to establish a connection authorizes the app to create a VPN; it doesn’t confirm that your subscription works or that you’re connected to a proxy server.

  1. Import a working configuration from the client’s Configuration or Subscription page, then set it as the active configuration. A successful import only means the configuration has been saved. Go back to the home screen and tap Start or the connection toggle to connect.
  2. On first launch, check that the system prompt names the client you just opened, then tap Allow or OK. If you previously canceled, tap Start in the client again to bring up the prompt. Labels vary by Android version and client.
  3. On a Pixel running Android 14, check the connection under Settings → Network & internet → VPN. The key icon in the status bar can also help, though some systems hide it. When in doubt, check the VPN settings page.
  4. Open a new browser tab to a page you haven’t loaded before, then check the client’s Connections or Logs page for the destination domain, matched rule, and outbound route. If Android says the VPN is connected but the page won’t load, check your configuration, proxy server, and DNS first—not the permission prompt.

Per-app proxying: Choose which apps use the tunnel before checking rules

In clients that support per-app routing, look under VPN or Network in Settings for options such as Per-app proxy or Bypass apps. Read the mode description above the app list first: selecting an app may include it in the VPN or exclude it. After changing the selection, disconnect and restart the VPN, then test with a new connection. Don’t use a page that was already open to judge the result.

  • Only selected apps: A good way to start with a simple test. Include one browser, then visit the same site in that browser and another browser that isn’t selected. Compare the results with the client’s connection log.
  • Exclude selected apps: Keep the VPN handling most apps as usual while letting a few bypass it. For example, exclude a remote-control app that relies on local network discovery, then check whether your device becomes visible again. If Android’s Block connections without VPN setting is on, excluded apps may not be able to connect.
  • DIRECT in a rule: App traffic still enters the client, and the mihomo core chooses a direct route. This is different from excluding an app at the system level. Once excluded, the app’s route can no longer be controlled by this client’s domain rules.

If you selected just one app but its traffic doesn’t appear in the connection list after you tap a link, check whether the link actually opened in Android’s default browser. Per-app settings apply to the app that makes the connection, not the app where you tapped the link. Also check personal and work profiles separately, even if they contain apps with the same name. A test in your personal profile doesn’t show how work-profile traffic is routed.

Background battery settings: Adjust the client’s battery policy for your device

If the VPN works while the screen is on but disconnects a few minutes after you lock it, first remove background battery restrictions for the client itself—not individual browsers. Here are common settings paths for the versions listed. Menus may differ by region, software update, or translation. If you can’t find an option, search Settings for its name.

Device and software Settings path What to change
Pixel · Android 14 Settings → Apps → See all apps → Client → App battery usage Allow background usage, then select Unrestricted if that option is available.
Samsung · One UI 6.1 Settings → Battery → Background usage limits Remove the client from the Sleeping or Deep sleeping apps list, then add it to Never auto sleeping apps.
Xiaomi · HyperOS 1 Settings → Apps → Manage apps → Client → Battery saver Select No restrictions. If Android needs to allow the app to start in the background, also check Background autostart.
OPPO · ColorOS 14 Settings → Battery → More settings → App battery management Select the client and check Allow background activity. On some models, you can also find this under the app’s battery settings.

Allow background activity and allow autostart address different issues. The first lets a connected service keep running in the background; the second lets the system relaunch the app when its conditions are met. Autostart won’t establish a VPN for the client or replace the initial permission prompt. Change settings only for the affected client. If background battery use increases noticeably, restore the original settings and repeat the lock-screen test.

Always-on VPN: Automatic reconnect and blocking connections are separate settings

On a Pixel running Android 14, go to Settings → Network & internet → VPN and tap the gear beside the client to check for Always-on VPN. When enabled, Android tries to start or maintain the VPN service. The client still needs a valid saved configuration and must support this startup mode. If the option isn’t shown, check whether the client supports it and whether device management policies restrict it.

Block connections without VPN prevents traffic from bypassing the VPN when it isn’t ready; it doesn’t fix reconnection issues. When troubleshooting lock-screen disconnects, first make sure the VPN works reliably in normal mode, then test Always-on VPN and the blocking option if needed. If only apps on the exclusion list stop loading after you enable blocking, check your per-app and blocking settings instead of switching proxy servers.

VPN disconnects after locking: Isolate the issue with three tests

  1. Keep the network fixed and test the lock screen. On the same Wi-Fi network, confirm that your browser can open a new page. Lock the screen for 5 minutes, unlock it, check the system VPN status, then open a test page. If the VPN disconnected, change one battery setting and repeat. If the issue persists, extend the test to 15 minutes. Record when the disconnect happened and what you changed each time.
  2. Keep the screen on and test a network switch. Confirm that mobile data works, turn off Wi-Fi, and let the phone switch to mobile data. Reload the page and check the logs. If the issue occurs only during a network switch while the VPN still shows as connected, investigate proxy reconnection and DNS retries on the new network. A dropped connection doesn’t necessarily mean Android stopped the VPN service.
  3. Check app coverage and configuration. If only one app fails, check whether it’s included in the VPN tunnel. If several apps fail while the VPN is still connected, use the logs to distinguish DNS lookup failures, proxy connection timeouts, and rule-based blocking. Change only one proxy server or configuration setting at a time, and keep notes on the steps that reproduce the issue.

When reporting an issue, include your device model, Android and client versions, current network, and the time the error occurred. Remove subscription links and credentials. If the client works in the foreground but the VPN disappears after you lock the screen, check background restrictions first. If the VPN stays connected but requests fail, inspect the connection log to see whether the traffic was routed through the client and which rule matched.

Download Clash