First, pause repeated latency tests, then check battery use and connection status on the same device while it’s locked. If you use the VPN frequently on a stable network, test a persistent connection first. Try On Demand only if you need automatic connections on certain networks. This guide walks through a side-by-side test and troubleshooting for reconnects after switching networks, test timeouts, and a VPN status that remains after closing the app.
What drains battery in the background: persistent connections, repeated reconnects, and latency tests
Returning to the Home screen or locking your device doesn’t disconnect the VPN. The system manages the connection, and background requests from other apps may still pass through the tunnel. A persistent VPN status only indicates that the connection is active; it doesn’t show how much data was transferred or mean that Shadowrocket caused all battery drain while the screen was locked.
- Persistent connection: On a stable network, the tunnel can stay connected without repeated handshakes. The actual battery impact depends on background requests, protocol keepalives, and network conditions. Background traffic from cloud sync or messaging apps may also pass through the tunnel, so whether Shadowrocket is in the foreground doesn’t tell the whole story.
- Repeated reconnects: Switching from Wi-Fi to cellular, or repeatedly joining Wi-Fi in a weak-signal area, can disrupt the existing connection. A brief status change after switching networks is different from repeated drops and recoveries in one location. For the latter, check the stability of the network first.
- Latency tests: A manual test sends probe requests. Running tests repeatedly or testing multiple servers at once adds network activity. For a standby comparison, don’t run tests manually. To check reachability, run one test separately and keep it outside your screen-locked test period.
When to use a persistent connection or On Demand
Here, a persistent connection means manually turning on the VPN and leaving it connected. With On Demand, the system starts a connection automatically when configured conditions are met. It isn’t an idle timer: locking the screen doesn’t remove the trigger conditions, and the VPN may stay connected as long as they’re met. So if the VPN status remains active with On Demand enabled, that doesn’t necessarily mean the setting isn’t working.
| Use case | What to try first | What to check |
|---|---|---|
| Fixed Wi-Fi, extended use | Connect manually from Home and leave it connected. | Check for stability on the same network and repeated disconnects while the screen is locked. |
| Automatic connection needed only on certain networks | Review the conditions in Settings → On Demand and enable only the networks where automatic connection is needed. | Test on networks that do and don’t meet the conditions. Before checking automatic activation, make sure you haven’t left a manual connection active. |
| Frequent network switching during a commute; occasional use | Turn off On Demand first, then connect and disconnect from Home as needed. | Check whether reconnects also happen on a single stable network. If they occur only while moving, investigate network switching first. |
Bottom line: limit automatic connections to the networks you need
If the VPN disconnects and then reconnects automatically on a network where you don’t need it, check in Settings → On Demand whether that network meets the trigger conditions. Don’t use Direct in Global Routing as a substitute for disconnecting: Direct changes how traffic is handled, but doesn’t turn off the VPN.
Compare standby battery use on the same iPad or iPhone
Test on stable Wi-Fi first, then try your usual network-switching scenario. Don’t compare an iPad locked at home with an iPhone used during a commute: screen activity, wireless signal, and background tasks all differ. Similar battery drops don’t show which connection method uses less power.
Keep test conditions consistent
Use the same device, Wi-Fi network, server, and Global Routing setting. Keep Low Power Mode in the same state, don’t charge the device, and avoid large downloads or latency tests during the test. Start with a 60-minute test for each run, and record the start and end times and battery levels.
Record a disconnected baseline
Go to Settings → On Demand and turn off On Demand. Return to Home, disconnect the VPN, and lock the screen. At the end of the test, open the system Settings → Battery and check the period for noticeable screen activity or background activity from other apps. If syncing or an update ran during the test, repeat it at another time.
Test a manual persistent connection
Leave On Demand off. Turn on the connection from Home, confirm you can access the sites you normally use, then lock the screen for the same amount of time. When the test ends, check the connection status and record the battery level. If the connection has dropped by the time you unlock the device, mark this run as unstable rather than counting it as a complete persistent-connection test.
Check On Demand activation
Disconnect any manual connection first. Then go to Settings → On Demand, enable On Demand, and check that the configured conditions include the test network. On a network that meets those conditions, check whether the VPN connects automatically, then lock the screen for the same amount of time. Also run a separate network-switch test and record the connection status after leaving or returning to a matching network.
Compare the results
If the readings differ by only one percentage point, extend the test or repeat it at a similar time of day. If On Demand and the manual persistent connection both stay connected throughout on the same Wi-Fi network, the results show only how each performs while connected. They don’t show whether On Demand reduces connection time on other networks.
How to troubleshoot connection timeouts and unexpected reconnects
Start by noting when the error occurs. If it happens only while switching networks, check the network connection first. If it happens every time you connect manually on a stable network, check your server address, port, and service status. Change one thing at a time so you can identify the cause instead of changing the network, server, and connection method all at once.
Error: The VPN server did not respond.
Cause: This system alert means the connection attempt didn’t receive an expected response. On its own, it can’t tell you whether the network is unreachable or the server didn’t respond. Fix: Turn off On Demand and disconnect. First, open a regular webpage on the same network, then retry once manually from Home. If only the proxy connection fails, check your server address and port.
Error: The Internet connection appears to be offline.
Cause: No network path was available when the request was sent, for example, because the Wi-Fi switch wasn’t complete. Fix: Wait for the network to stabilize, confirm a webpage loads in your browser, then return to Home and try connecting or running one latency test. Don’t run repeated tests while switching networks.
- Reconnects after you turn it off manually: Go to Settings → On Demand and turn off On Demand, then return to Home and disconnect. If it no longer reconnects automatically, restore only the trigger conditions you need and test again on the relevant network.
- VPN still shows as active after switching to Direct: Traffic handling and tunnel status are separate. To test a disconnected baseline, disconnect from Home and make sure On Demand is off; don’t just switch Global Routing.
- Noticeable battery drain continues while disconnected: Open the system Settings → Battery and check for syncing, media playback, or other background activity during the test period. If the baseline is also high, rule out these factors first rather than attributing the difference to the connection method.
Get Shadowrocket and setup guides
Shadowrocket for iPhone and iPad costs $2.99 as a one-time App Store purchase. Check the App Store listing for system requirements. The Mac (Apple silicon and Intel), Windows, Android, and Linux versions are free; download installers from this site’s download page.