· Troubleshooting · About 10 min

v2rayNG Battery Drain: Background Settings, Battery Optimization & Per-App Proxy

Use Android battery stats to investigate v2rayNG battery drain, then adjust background access, battery optimization and per-app proxy settings to balance battery life and connection reliability.

At a glance

For Android users whose connection works but battery life is poor, who lose connectivity when the screen locks, or who aren’t sure which apps need the proxy. Compare battery use over fixed intervals to identify when drain occurs, then allow background activity or narrow the per-app proxy scope as needed. Finally, check the logs for repeated connection attempts. Keeping the app running helps prevent service shutdown; it isn’t a general battery-saving switch.

1. Check battery stats to separate app usage from total drain

Go to Settings → Battery → Battery usage and find v2rayNG. Note the reporting period and its foreground and background time. Menu names vary by manufacturer; try searching Settings for “battery usage” or “app battery management.” Proxy traffic passes through the local VPN service and Xray core, so some network-processing cost may be attributed to v2rayNG. Its position in the list alone doesn’t prove the client is misbehaving.

An app’s share of battery usage isn’t the same as the percentage points lost by the battery. For example, if your phone drops from 80% to 70% and v2rayNG accounts for 20% in the app list, that doesn’t mean it used 20% of the entire battery. System estimates also vary, so don’t convert the share directly into battery percentage. Compare total drain under the same conditions first, then check how the app’s ranking changes.

What you noticeCheck firstDon’t assume
Battery drains quickly while watching videosScreen brightness, video quality, data use and device temperatureIt’s caused by the proxy protocol alone
Significant drain continues with the screen offBackground sync, connection retries and cellular signal strengthEvery persistent notification means high activity
Connection only returns after the screen turns onBackground restrictions, battery optimization and network sleepThe subscription or node has failed
The phone heats up only on cellular dataWeak signal, network switching and continuous uploads or downloadsThe core is faulty based on temperature alone

2. Compare fixed intervals instead of changing several settings at once

Start with a screen-off standby test, then compare screen-on use if needed. Stay in the same location, use the same network and start at roughly the same battery level. Don’t charge during the test or update the system or download large files. The figures below are suggested test conditions, not measured battery-life results for a particular device.

60 minutes
Screen-off test per run
3 runs
Proxy off, all apps and per-app comparison
2 rounds
Minimum repeats per condition
  1. Proxy off: Stop the v2rayNG service and note the starting and ending battery levels, network type and background sync activity. Only run this test where connecting directly is allowed.
  2. All-app routing: Connect to the same node, leave the routing mode and other settings unchanged, and monitor battery use and traffic while the screen is locked.
  3. Per-app routing: Route only the apps that actually need the proxy through the VPN, then repeat the same test.
  4. Note when issues occur: If the phone heats up, disconnects or suddenly loses battery, record the time and compare it with the system battery chart and client logs.

If the difference after an hour is just one displayed battery point, extend the test before treating it as an improvement. Battery percentages are rounded, and system background activity isn’t fully controllable. If drain is similar with the proxy off, look at the screen, signal and other background apps instead.

Takeaway: Confirm the difference is repeatable before keeping a change

Only investigate further if the same pattern appears in both rounds under similar conditions. An occasional small drop in battery use doesn’t prove that a setting saves power.

3. Set background access and battery optimization exceptions based on disconnects

Android’s Doze mode, introduced in Android 6.0, limits some background activity when a device is idle. Manufacturers may also manage auto-start, background processes and network access while the screen is off. A battery optimization exception doesn’t bypass every restriction or guarantee a permanent connection; it simply reduces the impact of the system’s power-saving rules on background activity.

  1. Check the app’s battery setting first: Long-press the v2rayNG icon → “App info” → “Battery” or “App battery usage.” If the connection repeatedly drops when the screen is locked, try “Unrestricted” or “Allow background activity.” Names vary by device.
  2. Then check battery optimization exceptions: Search Settings for “battery optimization,” open the list of all apps and find v2rayNG. Choose “Don’t optimize” only if background activity is being interrupted. Some systems combine this with the previous setting, so there may be no separate switch.
  3. Review manufacturer-specific permissions: If the app is still stopped, check settings such as “Auto-start,” “Associated start” or “Background activity.” Locking the app in the recent-apps screen is only a supplement, not a replacement for system battery permissions.
  4. Test again with the screen locked: Leave the screen off for a while, then check the service status and try an actual request. Don’t rely on the notification icon alone: a running service doesn’t guarantee a working remote connection.

On Android 13 and later, check the app’s notification permission so you can see its foreground-service status. Notification access, VPN authorization and battery optimization exceptions are separate settings. A hidden notification alone doesn’t prove that the service has stopped.

4. Per-app proxy: Narrow the VPN scope before changing routes

In Android VPN mode, v2rayNG uses the system VPN interface to receive app traffic and pass it to local processing and routing. Per-app proxy settings determine which apps enter the VPN; domain and IP routing rules determine how connections that enter it are sent out. These are separate layers: a “direct” routing rule doesn’t mean the app bypasses the VPN entirely.

App traffic Per-app filtering VPN capture Route matching Outbound connection

Open the v2rayNG sidebar → “Settings” → “Per-app proxy.” Options and wording vary by version. Read the explanation first: does selecting an app mean “proxy selected apps only” or “bypass selected apps”? Don’t infer the behavior from the checkboxes alone. Stop and restart the service after changing the selection so the new VPN app scope takes effect.

Per-app proxy reduces the traffic handled by the client; it doesn’t stop downloads, sync or video playback that would otherwise happen. If an app keeps using cellular data, total battery drain may remain high even after you exclude it. Adjust that app’s background sync and media settings instead.

5. Check the logs for repeated timeouts before changing protocols

v2rayNG uses the Xray core to handle connections. Weak signal, unreachable nodes, DNS failures and apps repeatedly retrying requests can all keep background activity running. Note when the issue occurs, then check the client logs. Exact log prefixes vary by core version; the snippets below are possible errors, not proof that a single occurrence caused battery drain.

Error: i/o timeout

What it means and what to do: A network read or write exceeded its timeout, possibly due to the remote server, network path or DNS. Identify whether it happened during name resolution, connection setup or data transfer. Then compare the same app on a stable network and a reachable node. Focus on the source of retries only if the error keeps recurring alongside repeated requests.

Error: network is unreachable

What it means and what to do: There was no available network route at the time, often because the device was offline or switching networks. Confirm that Android itself can connect, wait for Wi-Fi or cellular data to stabilize, then reconnect. Avoid repeatedly testing by hand while offline.

Error: connection refused

What it means and what to do: The connection to the target address was refused. Check the destination host and port in the logs, and determine whether the target is a local service or a remote node. Verify the subscription configuration and try again; changing battery permissions won’t fix a network-level refusal.

During troubleshooting, check the logging options under “Settings.” Turn on verbose logging briefly if you need more detail, then restore the usual level. Don’t run batch speed tests, refresh subscriptions repeatedly or leave verbose logging on while monitoring battery use; these activities also consume data and processing power.

6. FAQs: Screen-lock disconnects, persistent notifications and battery settings

Does a persistent notification mean the app is constantly using a lot of power?

No. A persistent notification indicates foreground-service status; it doesn’t show current traffic or processing load. Check Android’s “Battery usage” for the same period and see whether data is continuously being uploaded or downloaded. To stop the service, use the client’s stop button rather than just dismissing the notification.

Why does the connection still drop when the screen is locked, even after I disabled battery optimization?

Check the manufacturer’s background restrictions, network access while locked and the messaging app’s own battery settings. Run a screen-off test on the same network. If the service is still running but requests time out, check the network and node first. If the service has stopped, investigate Android’s background management.

Will proxying just one browser definitely save battery?

Not necessarily. A browser streaming video can still use a lot of data, and other apps can still drain the battery when connecting directly. Confirm the selection mode on the per-app proxy screen, then compare total battery drain with the same content, screen brightness and similar network conditions.

What should I do about delayed messages when Battery Saver is on?

Temporarily turn off Battery Saver and compare, then check background permissions for v2rayNG and the messaging app separately. If messages arrive normally afterward, set app-specific exceptions where Android allows them. Don’t exempt every app at once, or it will be hard to identify which restriction caused the delay.

Takeaway: Adjust background permissions separately from traffic scope

If the connection drops when the screen locks, first check whether the service has been stopped. If it’s still running but battery use is high, investigate traffic, signal and retries. Change one setting at a time and keep repeatable test notes; that’s more reliable than stacking power-saving switches.

Client and platform options

On Android, first make sure v2rayNG is installed and subscriptions import correctly, then adjust background permissions and per-app routing as described here. For a desktop client or a refresher on the basics, visit the downloads page and tutorials.

Download v2rayN