Sep 3, 2026 · Settings · About 9 min read

Shadowrocket Battery Drain in the Background: Configuring On Demand Connections

Learn how persistent connections and On Demand affect battery use, with tips for setting conditions based on Wi‑Fi, cellular networks, and domains.

At a glance

Shadowrocket’s On Demand feature determines when a connection starts automatically; it is not a battery-saving switch. When investigating background battery drain, first distinguish ongoing data transfers, repeated reconnects, and normal idle behavior, then choose your network conditions. This guide is for iPhone and iPad users with their own connection details: record a baseline, configure conditions for Wi‑Fi or cellular, then compare results over equal periods.

First, distinguish background activity from abnormal battery drain

The app usage percentages in Settings → Battery show each app’s share of battery use over the selected period, not the percentage points of battery that the app itself consumed. Shadowrocket’s share can rise when other apps use less, even if total device drain hasn’t increased. Check the overall battery level over time, screen activity, and what happened during the relevant period before changing settings.

Once a connection is established, the network extension can continue handling requests while the main app is not visible. Background sync, message refreshes, photo transfers, and connection maintenance can all involve activity. Swiping the app away from the app switcher does not prove the tunnel has stopped; check the connection status in Home and the system VPN status.

2 layers
Check overall battery use first, then each app’s share
3 items
Record network type, connection status, and background transfers
60 minutes
Suggested duration for one comparison run, not a battery-life test result

If battery drain is concentrated during weak cellular reception, frequent network switching, or heavy uploads, address those conditions first. Signal quality and data volume can affect results more than whether a connection is enabled or disabled. Don’t attribute all battery use to On Demand based on a single usage screenshot.

Understand the difference: configure connection timing and traffic routing separately

On Demand uses the system’s on-demand connection mechanism to decide whether to start a connection based on configured conditions. When those conditions remain true, the connection can stay active; it is not guaranteed to disconnect as soon as each request finishes, nor does locking the screen automatically stop it. If a rule effectively means “stay connected on the current network,” the result may be close to a persistent connection.

Global Routing controls where traffic goes within a connection: Proxy sends intercepted traffic through a proxy, Direct sends it directly, Config applies the rules in the current configuration, and Scene selects a policy for a particular scenario. Direct does not turn off the VPN, and selecting Config does not enable On Demand. These settings are not interchangeable.

Manual baseline

Recommended

During troubleshooting, turn off On Demand and use the Home switch to control the connection. Leave Global Routing and the current configuration unchanged, then observe idle behavior on the same network. This reduces the chance of automatic reconnects affecting your results.

Best for: identifying battery drain for the first time and checking for repeated reconnects

Persistent connection

Keep the connection active when needed to avoid waiting for it to start. Connection maintenance and background requests may still occur; actual battery use depends on data volume, protocol behavior, and network stability.

Best for: continuous work and background tasks that rely on a connection

Connect based on conditions

Use On Demand to limit automatic connections to specific network conditions. Narrower conditions may reduce unnecessary connection time, but frequent network changes can also trigger more reconnects. Test on your device.

Best for: predictable network use and conditions you can maintain

Steps: establish a baseline you can restore

You don’t need to change servers or protocols, or reset all settings. Record the current setup first and change only one variable per test run. Otherwise, even if battery use improves, you won’t know which change made the difference. Available On Demand conditions and editing options depend on the current interface; don’t confuse routing rules in a configuration file with the On Demand control.

  1. Record your current setup

    In Home, note the selected server and Global Routing mode; in Config, note the configuration in use. Keep a record of the original settings. Don’t update the configuration or change protocols yet.

  2. Turn off On Demand

    Go to Settings → On Demand and turn off On Demand, then return to Home and manually disconnect. Wait briefly and check that the connection stays off, ruling out any other system-level automatic connection settings that may still be active.

  3. Measure the baseline

    Choose a stable Wi‑Fi network, pause large transfers, and record the starting battery level, time, and signal conditions. First measure idle behavior while manually connected, then measure while disconnected during a period when interrupting tasks is acceptable.

  4. Add a condition

    Go back to Settings → On Demand and configure automatic connections using the network conditions available in the current editor. Test one network type first; don’t combine multiple Wi‑Fi exceptions and domain conditions at the same time.

  5. Test network changes

    Test after locking and waking the screen, switching from Wi‑Fi to cellular, and returning to the original Wi‑Fi network. Check the status in Home each time and verify availability with the same request. If anything goes wrong, restore the baseline you recorded.

Choosing conditions: Wi‑Fi, cellular, and domains

Wi‑Fi: decide based on what your tasks actually need

If tasks don’t need a connection on a particular Wi‑Fi network, you can exclude that network from automatic connections using the conditions available in the current interface. If background tasks still need access to the same resources, keep the connection or control it manually. A Wi‑Fi name is only used to match a condition; it doesn’t prove the network is trustworthy or guarantee direct access to a service.

Cellular: check signal strength and how often the network changes

While you’re moving, signal changes, network switches, and connection recovery may happen at the same time. You can connect manually only when needed, or keep automatic connections enabled on cellular for background tasks. The tradeoff is connection availability versus maintenance overhead, not a guaranteed battery-saving ranking. Don’t change the system’s cellular data settings during the test.

Domains: distinguish connection triggers from routing rules

The system’s on-demand mechanism can involve domain-resolution conditions, but whether you can edit those conditions directly in Shadowrocket depends on the options shown in Settings → On Demand. A resolution condition doesn’t mean “connect when I open a particular app.” Existing DNS cache entries, established connections, and requests made directly to an IP address can all produce results different from what you expect. If there’s no domain-condition editor in the current interface, don’t use Config rules as a substitute.

Before using domain conditions, first decide whether you need automatic connection or domain-based routing. If you only want to reduce requests sent through the proxy, check which Config rules match. If you want to prevent a connection on certain networks, adjust On Demand instead. Mixing up these two layers can lead to the mistaken conclusion that “the rules changed, but the VPN is still connected.”

Comparison notes: don’t present a test plan as a battery-saving result

The following is a practical test plan, not pre-measured battery data. Each run should last about 60 minutes; repeat it twice if conditions allow. Battery percentages are rounded, and temperature, signal, and background tasks can all change. A one-percentage-point difference in a single run isn’t enough to show that one setting consistently saves more battery.

Test group Conditions to keep constant What to record
Idle while manually connected On Demand off; fixed Wi‑Fi network; connection on in Home Starting and ending battery levels, screen activity, and whether data transfers continue
Idle while manually disconnected On Demand off; same Wi‑Fi network; connection off in Home Starting and ending battery levels, whether tasks are interrupted, and whether the connection reconnects automatically
Idle with On Demand Enable one network condition; keep all other settings the same as in the first run Starting and ending battery levels, connection status changes, and whether requests have to wait
Network-switch test Keep the same request in progress; switch once between Wi‑Fi and cellular and back Time of each switch, whether the connection recovers, and whether failures continue

If manual-connection standby is stable but On Demand standby triggers repeated reconnects, first check for conflicting conditions or frequent network changes. If both runs involve continuous data transfers, identify the background task first. If drain is noticeably higher only on cellular, retest where reception is stable before changing other settings. This helps avoid mistaking wireless network overhead for a protocol issue.

FAQ: screen lock, notifications, and background settings

The VPN indicator is still visible after I lock the screen. Did the setting fail?

Not necessarily. On Demand conditions may still be met after the screen is locked. Check the conditions in Settings → On Demand, then compare them with the connection status in Home. The VPN indicator can help show connection status, but it doesn’t show real-time battery use. To test with the connection fully off, disable On Demand first.

Will turning off Background App Refresh stop the connection?

Background App Refresh and the VPN network extension are separate system mechanisms, so turning off the former is not a substitute for disconnecting. Leave other settings unchanged, turn off On Demand first, then disconnect in Home and check whether the system VPN status changes too.

Notifications are slower with On Demand enabled. How can I troubleshoot this?

First restore the connection state that previously allowed notifications to arrive normally and check whether the issue goes away. Then test Wi‑Fi and cellular separately, noting whether delays occur only while an automatic connection is still being established. Also check system notification permissions, Focus settings, and the target app’s own background settings.

Will switching to Direct save more battery?

Direct changes how intercepted traffic is routed; it doesn’t stop the network extension. To test idle behavior while disconnected, first turn off On Demand, then turn off the connection in Home. Don’t use a Direct test group in Global Routing as a substitute for a disconnected test group.

Do I need to retest every day after changing the settings?

No. After two runs under similar conditions, just keep an eye on connection stability in day-to-day use. Retest using the same process if your network environment changes, you modify On Demand conditions, or unusual battery drain persists. Change only one variable per run.

Keep the settings that support your actual tasks and behave predictably when networks change; don’t aim to make background activity disappear entirely. Shadowrocket is a closed-source commercial app, primarily for iPhone and iPad, and is available exclusively through the App Store. Check the App Store listing for system requirements and purchase availability. Buying the app and having your own connection service are separate matters; this article covers only local settings and how to test them.

Get Shadowrocket on the App StoreVerify the official listing