v2rayNG Android setup: VPN permission, battery optimization and per-app proxy

Set up v2rayNG VPN access, prevent Android battery restrictions from interrupting background connections, and configure per-app proxy rules.

At a glance

On first use, approve Android’s VPN connection request and confirm that you can access the internet with the screen on. If the connection drops only after the screen locks, check background battery restrictions. To route only a few apps through the proxy, turn off bypass mode, select only the apps you need, save, and reconnect. The steps below compare two apps using the same node to help distinguish permission, background activity, and traffic-routing issues.

First connection: approve VpnService access

In VPN mode, v2rayNG uses Android’s VpnService to create a local virtual network interface on your device, then passes captured traffic to the Xray core. The system prompt grants permission to capture traffic; it does not verify the server address, account, or subscription. Importing a subscription successfully does not mean the VPN connection is working.

From the system prompt to an internet check

  1. Check the connection mode

    Open the menu in the upper-left corner of v2rayNG, go to Settings, and make sure VPN mode is selected rather than a mode that only provides a local proxy. If your version has no separate mode setting, start from the Connect button on the main screen.

  2. Approve the connection request

    Return to the configuration list, select the configuration you want to test, then tap the Connect button in the lower-right corner. When Android’s connection request appears, make sure v2rayNG is the app requesting access, then tap Allow. If you have already granted permission, reconnecting usually won’t show the prompt again. The notification permission prompt is a separate setting.

  3. Check the system status

    Open Android Settings and search for VPN to see whether v2rayNG is connected. Typically, only one VPN can be active per user or work profile. If another service in the same profile has Always-on VPN enabled, check whether you can turn it off. For managed devices, contact your administrator.

  4. Check that you can access the internet

    Turn off per-app proxy first, then open a website that normally works in your browser and refresh it. A VPN status of Connected only confirms that the local interface is up. If the page won’t load, check the current configuration, network, and logs before changing battery settings.

Disconnects when the screen is locked: check battery and background restrictions

Keep the node and network consistent. For example, stay on the same Wi-Fi network, confirm that browsing works with the screen on, then lock the screen for 10 minutes and check the system VPN page after unlocking. If the VPN is disconnected, focus on background restrictions. If it still shows as connected but new content won’t load, don’t assume the app was stopped. Retry on the same network and see whether the issue occurs only when switching from Wi-Fi to mobile data.

Android 6.0
Android’s Doze mode limits background activity while the device is idle
Android 7.0
Android’s Always-on VPN setting
10 minutes
The initial screen-lock interval for comparing before and after a setting change—not an Android sleep timeout

Where to find the settings

Menu names vary by Android version. If you can’t find a setting, start from the app’s info page or search Settings for the relevant term. Change one setting at a time and retest using the same screen-lock interval. If disconnects normally take 30 minutes to appear, repeat the test for the same length of time. Loosening restrictions may increase standby battery use and won’t fix node timeouts. If it makes no difference, restore the original setting and continue troubleshooting.

Per-app proxy: does selecting an app include or exclude it?

Open the menu in the upper-left corner of v2rayNG, go to Settings → Per-app proxy, turn it on, then open the app list. Depending on the version, Bypass mode may be called Bypass. This switch changes what the selected apps mean: when it’s off, selected apps use the VPN; when it’s on, selected apps are excluded from this VPN connection.

Choose the app list that matches your needs

Route only selected apps through the VPN

Recommended

Turn on Per-app proxy, turn off Bypass mode, and select the browser you want to test. Apps you don’t select won’t use this VPN, so you can use a second browser as a comparison.

Best when only one or two apps need a proxy, or when you’re checking that the app list works as expected.

Exclude a few apps from the VPN

Turn on Per-app proxy and Bypass mode, then select only the apps to exclude. For example, exclude a smart-home app that only needs to access devices on your local Wi-Fi network.

Best when most apps should use the VPN and only a few need to keep their regular network route.

Don’t filter by app

Turn off Per-app proxy. The client will no longer filter traffic using this app list; connections entering the VPN will still follow the current routing rules.

Best for establishing a baseline internet connection or checking whether the app list is causing the issue.

After changing settings: change one thing at a time

After updating the app list, return to the main screen, stop the connection, then reconnect so Android can create the interface with the new list. Keep the node and Wi-Fi or mobile data connection the same during testing so a network change doesn’t obscure the results.

  1. Choose two apps you can compare. Open the same trusted test page in two separate browsers, adding one to the app list and leaving the other out. Don’t use an in-app browser from a messaging app as a substitute: embedded pages may use the host app’s network identity.
  2. Make a new request. Visit the page in a new tab and refresh it; don’t judge by whether an already-open page still loads. If you’re comparing public IP addresses, first confirm that the current routing rules send the test destination through the proxy. A page that matches a direct-connection rule can’t show that the app list is failing.
  3. Note when the failure occurs. If the problem happens only after the screen locks, record when you locked and woke the device, when the failure occurred, and whether the VPN status changed. If the VPN is still connected and the logs repeatedly show i/o timeout, check the current network and selected node first; this error alone does not prove that a battery policy stopped the service.

Frequently asked questions

I tapped Cancel the first time I tried to connect. Can I grant permission again?

Return to the v2rayNG main screen and tap Connect again. If no prompt appears, make sure you’re using VPN mode, then search for VPN in Android Settings to see whether v2rayNG is already connected or another service in the same profile has Always-on VPN enabled.

I selected a browser. Why isn’t it using the VPN?

Go to Settings → Per-app proxy and check Bypass mode. When it’s on, selected apps are excluded. To route the browser through the VPN, turn off Bypass mode, keep the browser selected, then stop and reconnect. If your device has a work profile or cloned apps, make sure you opened the same browser instance you selected.

I set up bypass mode. Why can’t the excluded app access the internet?

Go to Android Settings → VPN, tap the settings icon next to the current VPN, and check whether Block connections without VPN is enabled. This option may prevent excluded apps from connecting directly. If you need to keep direct connections blocked, don’t exclude apps that need internet access. For managed devices, follow your administrator’s policy.

Notifications disappeared after I locked the screen. Does that mean the VPN disconnected?

A missing notification alone doesn’t tell you whether the VPN disconnected. After unlocking, check the system VPN page, then make a new request. If the VPN is disconnected, retest each background battery setting. If it’s still connected, note the network type and any log errors, and check for a network switch or a failed connection to the node.

View Android downloads