v2rayNG on Android: VPN Permissions, Battery Optimization & Per-App Proxy

Most v2rayNG disconnects and proxy bypass issues on Android stem from system settings. Learn how to approve the VpnService prompt, exempt the app from battery restrictions, and configure per-app VPN allowlists and bypass rules.

At a glance

For users who have imported a server but see no connection prompt, lose service when the screen locks, or find that only some apps can connect. Check system authorization, background activity, app selection, and routing—in that order—to tell whether traffic is reaching the VPN at all or the connection is failing afterward. This can save you from repeatedly switching servers. Menu names vary by v2rayNG version and Android device; follow the descriptions in your current settings.

1. Separate VPN routing, core connections, and server availability

v2rayNG is an Android client that uses the Xray core to handle proxy connections. VpnService is Android’s API for creating a local virtual network interface—not a server protocol, and not proof that your phone has connected successfully to a remote server. A VPN icon in the status bar only confirms that the VPN service is running; it doesn’t mean a VMess or VLESS server is reachable.

In VPN mode, app traffic first enters the virtual interface, then the client passes it to the core according to its configuration. If you’re using a mode that only exposes a local proxy port, other apps usually need to be configured to use that proxy themselves. The device-wide VPN checks in this guide don’t apply. Check the service mode under Settings in the sidebar before testing the connection.

API 21
Android 5.0 and later can include or exclude apps from a VPN
API 23
Android 6.0 introduced Doze battery-saving mode
1
VPN service active at a time for the same user or profile

These are Android platform limits, not minimum version requirements for the app. Work and personal profiles may be governed by separate management policies. On a managed device, ask your administrator about VPN restrictions; regular setup steps can’t bypass them.

2. VpnService permission: Check the system prompt and VPN conflicts

The first time you start VPN mode, Android usually displays a connection request asking whether the app can set up a VPN. Check the app name before approving it. This is different from regular permissions such as camera or storage access, and notification permission doesn’t replace it. If permission was already granted, Android may not show the prompt again on later launches.

  1. Disconnect other VPNs

    Go to Settings → Network & internet → VPN and disconnect any other VPN. On some devices, the path is Settings → Connection & sharing → VPN. Firewall and filtering apps that use a local VPN can also occupy this slot.

  2. Check always-on settings

    Tap the settings icon beside an existing VPN configuration and check Always-on VPN and Block connections without VPN. If either setting is tied to another app, note the current configuration before changing it to suit your needs.

  3. Start the app and grant permission

    Return to the v2rayNG home screen, select an imported server, and tap the start button in the lower-right corner. Approve the Android connection request, then check for the VPN icon in the status bar and a running status in the app.

  4. Check the startup log

    If the VPN still won’t start, open Logs in the sidebar and distinguish a VPN setup failure from a core startup error or remote connection timeout. Note the error line and when it occurred; a latency test result alone isn’t enough.

Once the VPN is running, you don’t need to configure port forwarding on your router for the local proxy port. The phone initiates a connection to the server as a client; a failed permission prompt isn’t caused by an unreachable server port. Troubleshoot these as separate issues.

3. Battery optimization: Check battery, background activity, and auto-start

If the connection works with the screen on but drops after it locks—and comes back as soon as you open the app—start by checking background restrictions. Android Doze, App Standby, and manufacturer-specific background cleanup are separate mechanisms. Changing one “Allow background activity” setting may not remove every restriction. A VPN foreground service helps keep the connection running, but can’t guarantee the process will never be stopped.

Android version or brandCommon settings pathWhat to check
Near-stock AndroidSettings → Apps → v2rayNG → App battery usageSelect Unrestricted. On older versions, go to Special app access → Battery optimization and select Don’t optimize.
Xiaomi / HyperOSSettings → Apps → Manage apps → v2rayNG → Battery saverSelect No restrictions. If there’s a Background autostart option, allow it if needed.
Huawei / EMUISettings → Apps & services → App launch → v2rayNGSwitch to Manage manually, then check the toggles for Auto-launch, Secondary launch, and Run in background.
Samsung / One UISettings → Battery → Background usage limitsCheck the Sleeping apps and Deep sleeping apps lists, then review background restrictions under v2rayNG’s App info → Battery.

These are common settings paths; names can vary by region and Android version. If you can’t find a setting, search Android Settings for “battery optimization,” “app launch,” or “unrestricted,” and make sure you’re changing the setting for v2rayNG. Locking the app in the recent apps screen is an additional measure on some devices, not a substitute for battery settings.

Bottom line: Run a screen-lock test

Keep the same server and network. Use the connection with the screen on for 2 minutes, then lock the screen for 10 minutes and test again. If it fails only while locked, check background restrictions first. If it also fails with the screen on, check the server and network. These times are for troubleshooting, not measured battery-life or reliability results.

4. Per-app proxy: Are selected apps included or bypassed?

Go to Settings → Per-app proxy in the v2rayNG sidebar. Check the master switch, app list, and any options related to bypassing. Some versions put the app list on a separate screen. A checked app isn’t necessarily using the proxy—the result depends on the selected mode.

Proxy only selected apps

Recommended

Enable per-app proxy and turn off Bypass mode, or any equivalent option. Select the browser you want to test; apps you leave unchecked won’t use this VPN. For troubleshooting, select just one app to make it easy to confirm which traffic is being routed.

Best for: First-time testing or proxying just a few apps

Bypass selected apps

Enable per-app proxy, then turn on Bypass mode or Bypass selected apps. Selected apps are excluded from the VPN; other apps may still use it. This reverses what the app list means in the previous mode.

Best for: Routing most apps through the VPN while excluding a few local services

Turn off app filtering

Disable per-app proxy to route eligible apps in the current profile through the VPN. Whether traffic connects directly afterward still depends on core routing rules; not every request necessarily goes to the proxy server.

Best for: Checking whether an app was missing from the list

After changing the list, stop and restart v2rayNG so the virtual interface picks up the new configuration. Then fully close and reopen the target app to avoid interference from an existing connection. Cloned apps and work-profile copies may have separate identities, so selections in your personal profile might not apply to them. Whether a newly installed app uses the VPN also depends on whether the list is an allowlist or a bypass list.

5. VPN access doesn’t mean every request goes through a remote proxy

Per-app filtering determines which apps enter the virtual interface; routing rules determine which outbound connection handles their traffic. Even if a browser is selected, the core may send local network addresses or some domains directly. Conversely, changing domain rules in the core won’t bring apps that never entered the VPN under its control.

If one browser opens a site but another app doesn’t, the issue isn’t necessarily a proxy bypass. The app may use different domains, UDP traffic, or its own DNS resolution, or it may restrict VPN use. Check the logs for a connection to the app’s destination before deciding whether the app missed the VPN, routing sent it direct, or the remote server refused the connection.

6. Common questions: Restarting, switching networks, and recovery

Why do I get a permission prompt every time I connect? Wasn’t it saved?

First, check whether you’ve switched between other VPNs. When another VPN service is used in the same user profile, the original app may need permission again. Check Android’s VPN list and always-on settings; don’t clear the app’s data as a first step.

Messages arrive late after the screen locks, and come through as soon as I open v2rayNG. What should I check?

Check battery restrictions for both v2rayNG and the messaging app. v2rayNG maintains the connection, but Android may also suspend the messaging app itself. After adjusting battery and background data settings, repeat a consistent 10-minute screen-lock test. Don’t change multiple servers at once.

The VPN icon is still there after switching to mobile data, but webpages won’t load. What now?

Stop and restart the connection, then test the same webpage. If restarting fixes it, note when you switched networks and check the logs. If mobile data keeps failing, check server address resolution, IPv4/IPv6 reachability, and carrier network restrictions.

Should I enable auto-start or always-on VPN?

Auto-start controls whether the app can launch in the background; Android’s always-on VPN keeps a specific VPN service active. They’re separate settings. If Android lets you set v2rayNG as always-on, first test whether it reconnects after a reboot. Then decide whether to enable blocking connections when the VPN is disconnected.

7. Retest in order and keep a log

Change one variable at a time. Keep the server and network fixed, confirm the basic connection with per-app filtering off, then restore the app list and routing rules one by one. This helps identify whether the issue came from permissions, background restrictions, or a configuration change—rather than masking the cause by repeatedly refreshing the subscription.

  1. Note your Android version, v2rayNG version, service mode, and the app where the problem occurs.
  2. Connect with the screen on, test the same webpage, and note when it succeeds or fails. Treat latency as a clue, not a guarantee of connectivity.
  3. Run the screen-lock test, then test Wi-Fi and mobile data separately. Don’t switch networks and change servers at the same time.
  4. Restore the per-app list, stop and restart the connection, then check that selected and unselected apps behave as expected.
  5. If the issue persists, collect log lines showing startup errors, connection timeouts, or DNS errors. Before sharing, remove subscription addresses, account identifiers, and browsing records.

v2rayN’s system proxy settings on desktop aren’t the same as Android’s VpnService permission, so desktop troubleshooting steps don’t apply directly to a phone. If you need to reinstall a client or review the basic setup, use the links below. Choose the installer for your platform, then return to this guide to check your Android system settings.

Download v2rayN