At a glance

First, allow Android to let v2rayNG create a VPN interface. Then address background restrictions that take effect when the screen is locked, and configure which apps use the VPN. This guide is for Android users who have imported a server but are seeing authorization issues, background disconnects, or apps that bypass the proxy. Change one setting at a time, and check VPN setup, app activity, and traffic routing separately.

First, know the difference: VPN connected doesn’t mean the server is working

v2rayNG is an Android client powered by the Xray core. It uses Android’s VpnService to create a local virtual network interface, then passes eligible connections to the core. A VPN icon only confirms that the interface is up. You still need to check server reachability, authentication settings, and DNS resolution separately.

VpnService is Android’s mechanism for routing network traffic through a VPN. It is not a subscription service and does not provide a server. Connection details for VMess, VLESS, and other protocols come from an imported configuration. Changing VPN permissions or disabling battery optimization won’t fix an incorrect server address or an expired subscription.

API 14
VpnService introduced in Android 4.0
API 21
Per-app VPN support introduced in Android 5.0
1
Active VPN per user or work profile

These figures describe Android’s VPN system; they do not indicate the minimum OS version required by the current app. The third point is especially important: another VPN tool started under the same user or work profile may take over the VPN connection. Before troubleshooting, stop other VPN services so a conflict isn’t mistaken for a server problem.

VpnService permission: approve the system connection request

The first time you tap Connect on v2rayNG’s main screen, Android usually displays a “Connection request” prompt or similar message explaining that the app wants to set up a VPN connection. Check the app name in the prompt and approve it. This permission does not require root access and is separate from regular runtime permissions such as contacts or storage.

  1. Select the current server

    On v2rayNG’s main screen, select an imported server configuration. Make sure you’ve selected the one you want to test; importing a subscription alone doesn’t confirm that the connection works.

  2. Approve the system request

    Tap Connect on the main screen. Check the app name in Android’s “Connection request” dialog, then approve. If you cancel, the VPN interface won’t be created.

  3. Check the connection status

    Check the connection status in both the client and Android. Some devices hide the status bar icon; search for “VPN” in Settings to check the current connection.

  4. Test actual access

    Open the browser you plan to route through the proxy and visit a known working HTTPS page. Check the client logs at the same time. If the page won’t load after you’ve approved the request, check the server and DNS instead of repeatedly reinstalling the app.

If the VPN stops immediately after starting, search for “VPN” in Settings and check whether another app is set as the “Always-on VPN.” “Block connections without VPN” can also affect per-app bypass tests: excluded apps may lose network access instead of falling back to a regular connection. Note the original setting before changing it to suit your needs.

Battery optimization: check battery and background settings separately

Check background restrictions first if the VPN works with the screen on but stops when it’s locked. Android battery optimization, manufacturer background management, and manually force-stopping an app are separate behaviors. Allowing background activity won’t fix a weak network or guarantee the system will keep the process running under extreme memory pressure.

Long-press the v2rayNG icon to open App info. Look for “Battery” or “Battery usage” and choose an option such as “Unrestricted” or “Allow background activity.” The table below lists common settings paths. Names vary across Android versions; if you can’t find an option, search in Settings rather than following steps for a different brand.

System Common settings path What to check
Near-stock Android Settings → Apps → v2rayNG → App battery usage Allow background usage. If there’s a restriction setting, choose “Unrestricted.”
Xiaomi App info → Battery saver; search Settings for “Autostart” Check for an “Unrestricted” battery setting and allow background autostart.
Huawei and HONOR Settings → Apps → App launch → v2rayNG If needed, switch to manual management and check autostart, secondary launch, and background activity permissions.
OPPO, OnePlus, and realme App info → Battery usage; search Settings for “Autostart” Check background activity permissions and see whether the system has additional app launch restrictions.
vivo Search Settings for “High background power consumption” and “Autostart” Allow high background power consumption and enable autostart.
Samsung Settings → Battery → Background usage limits Don’t add the app to the Deep sleeping apps list. If needed, add it to Never sleeping apps.

Some systems also let you lock an app in the recent apps list. This can help, but it does not exempt the app from battery optimization. Notification permission is separate: allowing service notifications can help you monitor activity, but a missing notification alone doesn’t prove the VPN has stopped. Check both the system VPN status and the client status.

Per-app proxy: understand what selecting an app does

In v2rayNG, open Settings → Per-app proxy from the side menu. Depending on the version, the controls may be on one screen or lead to an app list. Enable the per-app feature first, then check the description of “Bypass mode.” Don’t assume that a checked app uses the proxy: whether selected apps are routed or bypassed depends on whether bypass mode is on.

Route selected apps through the VPN

Recommended

Best for initial setup and troubleshooting. Turn off bypass mode and select just one test browser. Connections from selected apps enter the VPN interface; other apps usually keep using the system’s regular network. This reduces variables and avoids changing the network path for many apps at once.

Good for: first-time testing and routing only a few apps through the proxy.

Bypass the VPN for selected apps

Turn on bypass mode and add apps that clearly need regular network access to the list. Apps that aren’t selected enter the VPN interface. The list contains exclusions, not a proxy allowlist. After switching modes, review your existing selections.

Good for: routing most apps through the VPN while keeping a few on a direct connection.

“Entering the VPN” still doesn’t guarantee that traffic exits through the proxy server. The per-app list determines whether an app’s traffic is handled by the VPN interface. Routing rules then decide whether connections passed to the core use the proxy, go direct, or are blocked. Even if a browser is selected, a domain matching a direct-connection rule may still use the local network.

Route only a few apps through the VPN

Per-app proxy
On
Bypass mode
Off
Selected apps
Select only a test browser to start
After saving
Disconnect and reconnect

Test one app first, then add others one at a time to make differences easier to pinpoint.

Exclude only a few apps from the VPN

Per-app proxy
On
Bypass mode
On
Selected apps
Apps that need a direct connection
System blocking setting
Check “Block connections without VPN”

If Android blocks connections outside the VPN, excluded apps may not be able to access the internet. Check the system policy first.

After changing the list, disconnect and reconnect so Android recreates the interface. Then fully close and reopen the test app to rule out existing connections. Apps in a work profile, cloned apps, and apps under the primary user may have different identities. Don’t assume you’ve selected the right one just because the icons look the same.

Follow a consistent test routine for screen-lock and per-app behavior

Keep the server, network, and test page the same throughout testing. Verify access with the screen on, then test in the background, and finally switch between Wi-Fi and mobile data. The time intervals below are suggested observation windows, not measured performance results or a guarantee of connection stability.

  1. Establish a baseline with the screen on

    After connecting, open the test page in the selected browser and refresh it to confirm access. If it already fails, check the server logs and routing first; don’t move on to the screen-lock test.

  2. Check excluded apps

    Open an app that isn’t routed through the VPN and confirm it can access the internet normally. If it has no connection, check whether Android’s “Block connections without VPN” setting is enabled.

  3. Test with the screen locked

    Lock the screen for 5 minutes, then unlock it and refresh the same page. If needed, repeat for up to 15 minutes. Note the system VPN status, client status, and when the failure occurs.

  4. Switch networks

    Keep the configuration unchanged while switching between Wi-Fi and mobile data. Wait for the network to recover, then reopen the page. If the problem occurs only after switching networks, investigate network reconnection and DNS before adding more battery exceptions.

Common misdiagnoses: narrow down the cause by symptom

The VPN icon is still there. Why won’t pages load?

The icon only indicates the system interface status. Check the client logs for connection timeouts, authentication failures, or DNS errors, then confirm that the browser is included in the per-app VPN settings. A connection test in the client can’t replace testing the target app: they may use different routes and connection paths.

The app is exempt from battery optimization, but the VPN still disconnects when the screen locks. What should I do?

First, determine whether the app process has stopped or the connection has failed. If the client has stopped, check the manufacturer’s background launch, cleanup, and sleep settings. If the service is still running, compare server availability, Wi-Fi sleep behavior, and network-switch logs. Not every screen-lock disconnect is caused by battery optimization.

I selected my browser, but nothing changed. Why?

Check whether bypass mode is enabled, then reconnect the VPN and restart the browser. Next, review the routing rules: an app can enter the VPN and still match a direct-connection rule. The browser’s secure DNS may also change how names are resolved. Note its current setting rather than changing multiple DNS options at once.

Can I use the same settings if I switch to v2flyNG?

v2flyNG uses the V2Fly core and is subject to the same Android VPN permission and background management mechanisms, but it’s a separate app from v2rayNG. Check its system permission, battery settings, and per-app list separately. Configuration compatibility also depends on the protocol and specific features; switching apps based on the name alone isn’t enough.

For troubleshooting, record only the Android version, client version, connection status before and after, steps to reproduce, and when the error occurred. For more help with network settings, see the Troubleshooting guide. Before sharing logs, remove subscription URLs, credentials, and sensitive server details. Keep the error type and relevant event order.