v2rayNG Settings Guide: VPN Permission, Battery Optimization, and Per-App Proxy

Configure v2rayNG from VPN permission to connection: understand Android’s VPN prompt, exempt the app from battery optimization, and choose the right per-app proxy mode.

At a glance

When using v2rayNG for the first time, confirm that Android has established the VPN, then test a node with one app. Adjust battery settings only if the connection drops repeatedly after the screen locks. To proxy traffic for just a few apps, turn on per-app proxy, turn off bypass mode, and select the apps you need.

VPN permission: confirm Android is routing traffic through the VPN

In VPN mode, v2rayNG uses Android’s VpnService to create a virtual network interface. Android routes eligible traffic through that interface, then v2rayNG’s Xray core uses its routing rules to decide how to send it out. The system’s “Connection request” prompt asks whether v2rayNG can create this interface; it is not a node sign-in prompt.

  1. Select a node

    Select an imported configuration on the v2rayNG home screen. When troubleshooting for the first time, turn off per-app proxy in Settings so you don’t test the node with an app that isn’t included in the VPN.

  2. Grant permission

    Return to the home screen and tap the connect button in the lower-right corner. If Android shows a “Connection request” prompt, confirm that it’s from v2rayNG and tap “OK.” If permission was already granted, the prompt may not appear again.

  3. Check the connection status

    Check the VPN icon in the status bar, or go to Android Settings → Network & internet → VPN and confirm that v2rayNG is connected. Some devices put VPN under “More connections”; you can also search for “VPN” in Settings.

  4. Test with a new request

    Return to your usual browser and open a page that isn’t cached. The VPN icon only confirms that a VPN is active on your device; it doesn’t confirm that the remote node connected successfully or that the page’s traffic went through the proxy.

Only one VPN can be active at a time for the same Android user or profile. Another service that uses the VPN interface to filter traffic or forward DNS requests may conflict with v2rayNG. Check the system’s VPN list to see what’s connected; this is usually more useful than repeatedly tapping Connect in the app.

Battery optimization: adjust it only if the VPN drops when the screen locks

Android version can help you find the right troubleshooting settings, but it can’t tell you when a particular phone will kill background processes. Keep three functions separate: per-app VPN controls which apps use the interface, Doze limits background activity while the device is idle, and always-on VPN asks Android to keep a selected VPN active.

API 21
Android 5.0: per-app VPN app list API
API 23
Android 6.0: Doze introduced
API 24
Android 7.0: always-on VPN support
  • App battery settings: Long-press the v2rayNG icon and open App info → Battery or App battery management. If you see “Unrestricted,” you can enable it for v2rayNG only. If the page only has an “Allow background activity” option, make sure it’s enabled.
  • Battery optimization list: If App info doesn’t have the relevant option, search for “Battery optimization” in Settings. Change the list from “Not optimized” to “All apps,” select v2rayNG, then choose “Don’t optimize.” Some devices offer only the first option, so there’s no need to find both settings.
  • Manufacturer background controls: If the connection still drops when the screen locks after you’ve changed the battery settings, check Settings for “App launch management” or “Auto-start.” If there’s an “Allow background activity” option, check that first. Investigate startup settings separately only if the connection doesn’t return after restarting the phone.

Bottom line: check whether the VPN stays active after the screen locks

Keep the same node and network. After confirming the connection with the screen on, lock the screen for 15 minutes as a first test. After unlocking, check the system VPN status before opening a webpage. If the VPN is gone, check background restrictions first. If it’s still active but requests time out, check for network changes and node connectivity. Fifteen minutes is only a quick test, not a fixed time for Android to enter Doze.

Per-app proxy: do selected apps use the VPN or bypass it?

In v2rayNG, go to Settings → Per-app proxy, enable per-app settings, then check whether “Bypass mode” is on. The mode determines what the app list means, not the number of apps selected. The comparison below assumes Android’s “Block connections without VPN” setting is off.

Turn off “Bypass mode”

Recommended

Selected apps use the VPN. Other apps aren’t routed through this VPN connection. For your first setup, select one browser to test and leave another internet-connected app unselected for comparison.

Best for: routing only a browser or a few selected apps through the VPN

Turn on “Bypass mode”

Selected apps bypass the VPN; unselected apps can use it. Newly installed apps may also use the VPN if they aren’t on the bypass list, so review the list after installing apps.

Best for: routing most apps through the VPN while excluding a few that need direct access to your local network

  1. After changing the app list, return to the home screen, disconnect, then reconnect so the VPN interface uses the updated list. Test with a new request; don’t rely on a video already playing or an existing connection to tell whether the change took effect.
  2. Use two apps to access the same destination. If you’re comparing exit IP addresses, first confirm that v2rayNG’s routing rules send that destination through the proxy. Otherwise, seeing the same exit IP in both apps doesn’t prove the app list is being ignored.
  3. Check the app that actually makes the network request. If tapping a link in a chat app opens a separate browser, check whether that browser is on the list. Also check cloned apps and apps in work profiles separately, even if they have the same name.

Per-app proxy determines whether traffic enters the device’s VPN; core routing determines which outbound route it takes once inside. Even if a browser is included in the VPN, requests matching a direct-connection rule may still go out directly. When troubleshooting, check the app list first, then the rule matching the destination domain or address. Change one setting at a time.

VPN permission, disconnections, and bypass mode: FAQs

Why don’t I see a permission prompt when I tap Connect?

First, open VPN in Android Settings. If v2rayNG is already connected, you usually won’t need to confirm again. If another VPN is connecting, check whether Android has set it as the always-on VPN. On a personal device, change this setting if needed; on a device managed by your organization, contact your administrator.

Why does the connection time out when I switch networks, even though it works with the screen locked?

Keep the screen on and connect to the same node over both Wi-Fi and mobile data. If the connection drops only while switching networks, reconnect after the new network is ready. If it keeps failing on just one network, first check whether you can browse the web on that network, then troubleshoot the node connection. There’s no need to change battery settings first.

Why can’t an app connect after I add it to the bypass list?

Open the system VPN list, tap the settings icon next to v2rayNG, and check “Block connections without VPN.” When enabled, Android can block non-VPN traffic from excluded apps. If you need to keep this restriction on, add the app back to the VPN list, then check the core routing rules as needed.

Will adding v2rayNG to the battery optimization exemption list make it connect automatically after a restart?

The exemption alone won’t connect automatically. To have Android keep the VPN active, open the system VPN list and check the settings for v2rayNG for an “Always-on VPN” option. After enabling it, restart the phone and test. Treat “Block connections without VPN” as a separate policy, not a requirement for automatic connection.

Clients & Downloads