On Demand controls when the system establishes a VPN connection based on conditions; it is not a dedicated battery-saving switch. This guide covers Shadowrocket on iPhone and iPad, including how to read battery usage, check Settings → On Demand, distinguish automatic connections from traffic routing rules, and use a one-variable comparison to decide whether to change On Demand. It is for users with their own provider and subscription who can connect normally but have noticed a change in standby battery use.
Bottom line: Choose based on when you need a connection
Use On Demand if you need the VPN to reconnect automatically under specific network conditions. If you connect only during defined periods and want it to stay disconnected after you turn it off, try disabling On Demand. Enabling it does not guarantee lower battery use, and disabling it cannot eliminate power used for data transfer, encryption, or network changes.
On Demand does not mean “connect only when visiting a domain routed through a proxy.” The system decides whether to connect based on On Demand rules and network status. If the conditions remain true, the tunnel may stay connected for an extended period. Focus on whether the connection is stable, whether data is continuously transferring, and whether network changes trigger repeated reconnects.
| Connection method | When to use it | What to check |
|---|---|---|
| Keep the connection on manually | Using the same network for an extended period | Whether traffic continues while idle and whether the tunnel stays stable |
| On Demand | Automatic connection based on network conditions | Whether the conditions are too broad and whether network changes trigger repeated reconnects |
| Connect manually during specific periods | VPN is needed only during defined periods | Turn off On Demand, then disconnect and confirm the connection does not restart automatically |
Recommendation: Keep the connection method that works reliably
If the issue starts after switching between Wi-Fi and cellular, check the relevant On Demand conditions first. If battery use rises while downloading over a stable network, check actual data traffic before changing automatic connection settings.
Reading battery usage: percentage share is not percentage points of battery drain
Open system Settings → Battery, choose a time range that includes the period in question, then review app and screen activity. The labels for time ranges may vary by system version; use what your device displays. First establish whether the issue occurred during active screen use, locked-screen standby, or charging. Do not directly compare readings from different conditions.
The percentage next to an app represents its share of battery use within the selected period; it does not mean the app used that same percentage of the device's total battery capacity. For example, an app showing 30% did not necessarily cause the battery to drop from 100% to 70%. VPN activity also involves the system network extension and traffic from other apps, so its position in the list alone cannot establish the cause.
- Record overall battery level: Note the level at the start and end of the observation, whether the device was charging, and the total duration.
- Record network conditions: Distinguish between stable Wi-Fi, stable cellular, and switching between them. A weak signal can also increase battery use.
- Record background activity: Photo syncing, system updates, file transfers, and audio or video playback can affect results. The VPN icon alone does not indicate how much data is being transferred.
- Keep the observation periods comparable: Do not compare ten minutes of screen-on use with an hour of locked-screen standby, or compare percentages from different time ranges.
Check Settings → On Demand: Record the current settings before making changes
These steps apply to iPhone and iPad. In Shadowrocket, open Settings → On Demand and note the main switch and any existing conditions. On Demand rules and traffic rules in Config serve different purposes; record both separately before making changes. Do not delete a working configuration just to troubleshoot battery use.
-
Record a baseline
Note the affected period in system Settings → Battery. Then return to Shadowrocket → Home and record the current server, connection status, and Global Routing option.
-
Check the conditions
Open Settings → On Demand and note the switch and existing rules. Check whether the current Wi-Fi or cellular network matches the automatic connection conditions. Available fields may vary by version.
-
Pause On Demand
Turn off On Demand, return to Home, then disconnect the current VPN. Disabling automatic connections before disconnecting helps prevent a rule-triggered reconnection from looking like a failed disconnect.
-
Use a stable network
Connect manually over the same Wi-Fi, keeping the server, Global Routing option, and activity unchanged. Check whether the connection drops or resumes after the screen is locked.
-
Restore for comparison
Restore the original On Demand conditions and repeat the same observation. If frequent reconnects occur only after restoring those conditions, narrow them down. Do not change DNS, the protocol, and the subscription at the same time.
Distinguish Global Routing, rules, and background traffic
Home → Global Routing determines the routing mode for traffic; Settings → On Demand determines when a connection is established. They are separate controls. Setting Global Routing to Direct does not mean the VPN tunnel is disconnected, nor does it prove that the network extension has stopped working.
| Option | Purpose | Troubleshooting notes |
|---|---|---|
| Config | Route traffic according to the rules in the current configuration | Check which rules and policies match; do not look only at the selected server |
| Proxy | Use a proxy routing mode | May change how much traffic goes through the proxy; avoid changing it alongside other variables |
| Direct | Use a direct routing mode | Direct mode does not mean the tunnel is disconnected |
| Scene | Route traffic according to the configured scene | Check the current scene and its conditions; do not mistake a scene change for an On Demand change |
When using Config, rules such as DOMAIN-SUFFIX, IP-CIDR, GEOIP, and FINAL determine how traffic is routed. Rules are generally matched in order, with FINAL as the fallback. They are not battery-management commands. The example below illustrates rule syntax only; it is not a recommended battery-saving configuration and will not automatically close an idle tunnel.
DOMAIN-SUFFIX,example.com,DIRECT
IP-CIDR,192.0.2.0/24,DIRECT,no-resolve
GEOIP,CN,DIRECT
FINAL,PROXY
Here, 192.0.2.0/24 is a documentation-only example network, not a usable service address. When testing battery use, keep the existing configuration and check which rules actually match the connection. If an app syncs continuously, it may generate network activity through either a proxy or a direct connection; changing its routing rule will not stop the transfer.
Frequent reconnects: Use the exact error message to investigate network issues
An unstable connection may cause the system to repeatedly try to establish a tunnel, but not every network change indicates a problem. First compare disconnect and reconnect times with Wi-Fi changes and cellular signal fluctuations. Then check connection diagnostics or logs for the actual error. The messages below are common network errors; they may appear with an address, port, or protocol prefix. Do not assume an error occurred if it is not shown.
Error: Connection refused
Cause: The destination endpoint refused the connection, often because no service is listening on the port or the connection was actively rejected.
Fix: Check the address and port in your existing service configuration, then ask your provider to confirm the service status. Repeatedly toggling On Demand is not a substitute for checking the endpoint.
Error: Operation timed out
Cause: The operation did not complete in time. The network may be unreachable, packets may be getting lost, or the destination may not be responding promptly.
Fix: Retry the same connection over a stable network, then compare it with another available network. Note when the error occurs to distinguish network-switching issues from persistent connection failures.
Use the actual port in your existing configuration when checking port settings. HTTPS commonly uses port 443, but that does not mean every proxy service uses 443. TCP and UDP are different transport conditions. Shadowsocks, VMess, VLESS, Trojan, Hysteria2, and WireGuard use different connection and transport mechanisms, so the protocol name alone cannot tell you which will use less battery.
- Fails only after switching networks: Compare the switch time with the On Demand conditions and check whether the connection remains stable after it resumes.
- Also fails on a stable network: Check signal strength, address, port, and service reachability before changing automatic connection conditions.
- Connection is stable but battery use has increased: Check actual traffic and background activity. An active connection does not necessarily mean continuous heavy data use.
- Changes only after a subscription update: Check whether the selected server or configuration has changed. Keep subscription updates separate from On Demand troubleshooting so the comparison remains valid.
Use a one-variable comparison to choose your final settings
Run two observations of equal length, such as 60 minutes each; this is only an example test duration, not a battery-life estimate. For the first round, turn off On Demand and connect manually. For the second, restore On Demand while keeping everything else the same. Use the same network, server, and configuration, keep screen activity similar, and note any reconnects in both rounds.
Battery readings are rounded to whole numbers and include estimation error, so short-term differences cannot be used to predict all-day battery life. If the two rounds are similar, repeat the observations rather than treating one reading as conclusive. If system updates, photo syncing, or a weak signal coincided with a difference, eliminate those factors and test again.
| Field | What to record | How it helps |
|---|---|---|
| On Demand | Switch status and matching network conditions | Confirm the only setting changed in this round |
| Battery level and duration | Starting and ending battery levels; start and end times | Compare overall battery drain over equal periods |
| Connection events | Disconnect and reconnect times, plus the exact error message | Check whether the issue is related to reconnects |
| Usage activity | Screen-on time, background transfers, signal strength, and charging status | Rule out other causes of battery drain |
Next steps: Change only conditions that reproduce the issue
Prioritize changing an On Demand condition only if enabling it repeatedly triggers reconnects under the same network and activity conditions. If the connection remains stable, focus instead on actual data transfers, background apps, and wireless signal strength.
After testing, restore the connection strategy that suits your everyday use. For help troubleshooting a subscription or configuration, see Subscription Troubleshooting and the Configuration File Tutorial. This site does not provide, sell, or recommend nodes or subscriptions. This guide assumes you already have your own provider and subscription. Before sharing diagnostic logs, redact subscription links, credentials, and full connection addresses.