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

Learn how to approve v2rayNG’s VPN prompt, exempt it from Android background battery restrictions, and choose between bypass and proxy-only per-app modes.

At a glance

If v2rayNG disconnects after your first launch or when the screen locks—or you only want your browser to use the proxy—check the right settings layer. System permission determines whether a VPN can be established, background battery settings affect whether the service keeps running, and the per-app list determines which apps send traffic through the VPN. Check them in that order to avoid mistaking a system issue for a faulty server.

VPN permission: Check whether Android is handling the connection

In VPN mode, v2rayNG uses Android’s VpnService to create a virtual network interface. Android routes traffic from matching apps through this interface, and the client then handles it according to the core’s routing rules. The first-time prompt is Android’s connection request—not a server login screen. You don’t need to enter subscription details there.

  1. Choose a running mode

    Open the menu in the top-left corner of v2rayNG, go to “Settings,” and set “Running mode” to “VPN” (some versions call it “Mode”). Proxy-only mode starts a local proxy listener, but does not establish a system VPN or route traffic according to the VPN app list.

  2. Approve the connection request

    Return to the main screen, select a configured server, and tap the start button in the bottom-right corner. Check that Android’s “Connection request” prompt names v2rayNG, then tap “OK.” If you’ve already approved it, Android usually won’t ask again.

  3. Check the system status

    In Android Settings, search for “VPN” and check whether v2rayNG is connected. The key icon’s visibility depends on the system interface; the VPN list can help distinguish a VPN that wasn’t established from an icon that simply isn’t shown. Then open a known-working page in your browser to confirm that requests complete successfully.

  4. Check for VPN conflicts

    If the VPN disconnects immediately after permission is granted, check whether another service is active in Android’s VPN list. Some firewalls and network-filtering tools also occupy the VPN interface. If your device is managed by your organization or has an always-on VPN policy, find out where the policy comes from rather than disabling required security controls.

Disconnects when the screen locks: Check your Android brand’s battery settings

Prioritize background restrictions if the VPN works with the screen on but stops after the screen has been off for a while. Long-press the v2rayNG icon and open “App info”—it’s usually quicker than navigating from the top of Settings. These are common menu paths; labels vary by system version, so search Settings for the terms in parentheses if you can’t find them.

SystemCommon menu pathWhat to check
Stock Android (e.g., Pixel)“Settings” → “Apps” → “v2rayNG” → “App battery usage”Turn on “Allow background usage.” If there are battery usage options and disconnections continue, try “Unrestricted.”
Xiaomi HyperOS“App info” → “Battery saver”Set the app to “No restrictions.” If the issue only occurs after a reboot, also check “Autostart.”
Samsung One UI“Settings” → “Battery” → “Background usage limits”Remove v2rayNG from “Deep sleeping apps”; if needed, add it to “Never sleeping apps.”
OPPO ColorOS“App info” → “Battery usage”Check “Allow background activity.” If it isn’t shown, search Settings for “background battery usage.”
Huawei EMUI“Settings” → “Apps” → “Launch manager”Find v2rayNG, switch to manual management, and make sure “Allow background activity” is enabled.

If the VPN works after you start it manually but disconnects only when the screen locks, change the background activity permission first; you don’t need to enable autostart at the same time. Autostart affects when some systems allow an app to launch. It doesn’t grant VPN permission or guarantee an automatic connection after reboot. During testing, don’t tap “Force stop” or use one-tap cleanup tools, or you won’t be able to tell whether the process was ended manually or by battery management.

Android 6.0
Account for Doze and App Standby
Android 7.0
Use Android’s always-on VPN option
10 minutes
Initial screen-lock test duration, not a system threshold

Distinguish a stopped service from a timed-out request

Keep the same Wi-Fi network and server. Confirm the VPN works with the screen on, then lock the screen for 10 minutes. After unlocking, check whether the existing VPN is still connected before reconnecting. If Android shows it as disconnected, adjust the background settings and test again. If the VPN is still connected but pages time out, note the time and check server connectivity and DNS results. A successful short test doesn’t rule out restrictions during longer periods of inactivity.

Per-app proxy: Bypass or proxy-only?

Open the menu in the top-left corner of v2rayNG and go to “Settings” → “Per-app proxy.” Enable the feature, check the “Bypass mode” switch, then select apps. In many versions, with bypass mode on, selected apps are excluded; with it off, selected apps are included. Review your current selections before switching modes. After changing the list, stop and restart the VPN so Android creates the interface with the updated app list.

Proxy-only: Include only selected apps

Recommended

Start with one browser and select only that app; other apps won’t use this VPN. This makes it easy to verify that the app list works and keeps unrelated apps out of your first test.

Best for: Using a VPN with only a few apps, or testing with the smallest possible scope.

Bypass: Exclude selected apps

Selected apps won’t use this VPN; all other apps are handled within the VPN’s scope. If only your printer utility needs access to your local network, add it to the exclusion list first, then test whether printer discovery and job submission work again.

Best for: Using a VPN with most apps while keeping a few on your regular network.

FAQ: VPN permission, lock-screen disconnects and app list issues

No prompt appears when I tap Start. How can I tell if VPN permission was granted?

First make sure the running mode is set to VPN, then search for “VPN” in Android Settings. If v2rayNG is listed as connected, you usually don’t need to grant permission again. If it isn’t connected, check the app for startup errors and see whether another VPN service in the same user profile is occupying the connection.

It still disconnects on mobile data after I allow background activity. What should I check?

Test the two scenarios separately: lock the screen without changing networks, then keep the screen on and switch from Wi-Fi to mobile data. If only the second test fails, check v2rayNG’s mobile data permission under “App info,” then reconnect to the same server over mobile data. Handle network-switching problems separately from background process termination.

I selected a messaging app. Why don’t links I open use the proxy?

Check whether the link opens inside the messaging app or launches a separate browser. If the browser makes the request, go to “Settings” → “Per-app proxy” and select the browser that actually opens the link in proxy-only mode. Recreate the VPN, then verify with a new page rather than one that may already be cached.

I selected an app. Why hasn’t my public IP address changed?

First check whether bypass mode is on by mistake, then confirm the test request is coming from a selected app. If both are correct, check the client log for the relevant connection and outbound details (depending on the current log level), and see whether the test domain matched a direct-connection rule. There’s no need to clear all routing rules first.

Download the client