Shadowrocket On Demand Setup: Connect by Wi-Fi, Cellular, or Domain

Learn how On Demand triggers work with Wi-Fi SSIDs, cellular networks, and domains, plus rule priority and common configuration mistakes.

At a glance

This guide is for users who have imported their own subscription into Shadowrocket and can connect manually. On iPhone and iPad, go to Settings → On Demand to configure network triggers, domain conditions, and traffic routing after connection. Test a manual connection first, then add Wi-Fi and cellular conditions one at a time. Finally, check DNS resolution and rule order to avoid mistaking a routing issue for a connection failure. Settings and system behavior may differ on other platforms, so don’t assume these system-level triggers apply there.

On Demand vs. Global Routing

On Demand controls when the system establishes or disconnects the VPN connection based on conditions. Global Routing controls how traffic is handled after the connection is established. These are separate layers. The system VPN indicator only shows that the tunnel is connected; it doesn’t prove that a particular website is routed through a remote server. Likewise, adding a domain rule to a configuration doesn’t mean the system will connect automatically when you visit that domain.

2 layers
On Demand controls connection triggers; Global Routing controls traffic after connection
4 options
Global Routing:Proxy / Direct / Config / Scene
2 network types
Test Wi-Fi and cellular conditions separately

Use Home to check the selected server and connection status, Config to check the active configuration, and Settings → On Demand to manage automatic connections. During troubleshooting, note the current selection in all three places. Avoid changing the server while also adjusting automatic connection conditions, or you won’t know which change affected the result.

Before enabling On Demand: test a manual connection

This guide assumes you already have your own provider and subscription. On Demand can’t restore expired server details or fix incorrect authentication settings. Turn off automatic triggers temporarily and confirm that a manual connection works before adding conditions. Save a copy of your current configuration and note your existing On Demand settings before making changes.

  1. Check the server

    Select a server you already have in Home. If you use a subscription, update it first and confirm that the desired entry is still available. Don’t change the protocol and port during this test.

  2. Check the configuration

    Open Config and check which configuration is active. Then go to Home → Global Routing, select Config, and note the current option so you can restore it later.

  3. Connect manually

    Turn on the connection in Home and allow Shadowrocket to add the VPN configuration when prompted. Test a website you know is reachable; don’t rely on the connection switch’s color alone.

  4. Configure On Demand

    Go to Settings → On Demand and review the existing conditions before enabling the network triggers you need. Available fields may vary; don’t add several overlapping conditions at once.

  5. Retest after switching networks

    In system settings, switch between Wi-Fi and cellular once, then return to Home and check the connection status. Change only one condition at a time and note whether it behaves as expected.

Wi-Fi SSIDs: Set exceptions by network name

An SSID is a Wi-Fi network name, not a router’s admin address or the Wi-Fi password. When checking Wi-Fi conditions in Settings → On Demand, use the name shown by the system. Preserve spaces, hyphens, and capitalization exactly; similar-looking names may belong to different networks.

For example, if you want to prevent automatic connections on your home network, Home-WiFi, while using On Demand on other Wi-Fi networks, distinguish the exception for that SSID from the general Wi-Fi condition. If the editor offers actions such as Connect or Disconnect, check the action assigned to each condition—not just whether the SSID appears.

To test, connect to the target SSID and wait for the system to finish switching networks, then check Home. Switch to a Wi-Fi network with a different name and repeat the test. Repeatedly opening websites on the same network doesn’t verify that the SSID condition handles network changes correctly.

Cellular: Test connection and availability separately

Check cellular conditions separately from Wi-Fi conditions. Turn off Wi-Fi, confirm that the device can access the internet over mobile data, then see whether On Demand establishes a connection as expected. If mobile data is off, the signal is weak, or your plan doesn’t provide internet access, the connection to the server may fail even when the trigger is configured correctly.

Test scenarioStepsWhat to check
Switch from Wi-Fi to cellularKeep mobile data on, turn off Wi-Fi, and wait for the network switchDoes the system reconnect, and does Home show a usable connection?
Switch from cellular to a specified Wi-Fi networkConnect to an SSID with a configured exceptionDoes the specified action run, rather than the cellular condition remaining in effect?
Restore service after Airplane ModeTurn Airplane Mode on briefly, then restore network accessAre conditions reevaluated once the network is available? Don’t expect a connection while offline.
Switch cellular data between SIMsChange the mobile data line in system settingsConfirm that data works before testing On Demand. Cellular conditions don’t identify a particular SIM.

Switching networks can interrupt existing TCP connections, and a video or download may not resume seamlessly. Test with a newly opened webpage rather than relying on a connection established before the switch. Don’t change several On Demand conditions just to prevent one brief interruption.

Domain triggers: Not the same as DOMAIN-SUFFIX

Domain-based On Demand conditions belong to the system’s connection evaluation logic; they don’t use the same syntax as domain routing rules in Config. If the current Settings → On Demand editor offers a domain condition, follow its instructions and check whether it depends on DNS resolution. Don’t paste a full webpage URL, path, or port into a domain field.

For example, a domain field typically takes example.com, not https://example.com:443/account. Here, 443 is a common HTTPS port and /account is a path; neither belongs in an SSID or domain name. A domain condition also doesn’t mean the VPN will disconnect and reconnect every time you visit that website.

The following example shows Config routing syntax. Don’t paste it into an On Demand domain field. It uses DIRECT and REJECT to show how rule matching works; replacing your everyday configuration with the whole example would cause the final line to reject all traffic that doesn’t match an earlier rule.

[Rule]
DOMAIN-SUFFIX,example.com,DIRECT
IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
GEOIP,CN,DIRECT
FINAL,REJECT

DOMAIN-SUFFIX matches domain suffixes, IP-CIDR matches destination IP ranges, GEOIP checks the destination IP against a location database, and FINAL catches requests that haven’t matched an earlier rule. These rules determine how connections already being processed by the routing rules are handled; they don’t establish a VPN connection for the system.

Diagnose conflicts: Check triggers before routing

If the VPN connects automatically but traffic doesn’t behave as expected, first confirm that the intended condition triggered the connection, then check Global Routing. A website going direct doesn’t necessarily mean On Demand failed. The options below describe Shadowrocket’s routing modes and can help narrow down the issue.

Config

Recommended

Handles requests according to the active configuration. The matched rules and policies determine where traffic goes; unmatched traffic continues through the remaining rules in the configuration.

Use it to test whether On Demand works with your everyday routing rules.

Proxy

Routes traffic in proxy mode, which can help temporarily rule out the effects of standard routing rules. Check that the selected server is working; this mode doesn’t guarantee that every request will succeed.

Use it briefly to determine whether a problem comes from the server connection or rule selection.

Direct

Uses direct routing. Even if the system shows that the VPN is connected, that doesn’t prove requests are being carried by a remote proxy server.

Use it to compare results with a direct connection on the local network and distinguish local network issues from proxy path issues.

Global Routing also offers Scene. If you select it, check the settings for the relevant scene; it isn’t simply another name for Config. This guide uses Config to reduce variables during testing. Restore your previous routing mode when you’re done.

  1. System layer: Check whether another VPN connection is active and whether the system still allows Shadowrocket to use its VPN configuration.
  2. Trigger layer: Check the network type, SSID, action, and rule order in Settings → On Demand. The system evaluates On Demand rules in order, and the first matching rule determines the action. Make sure a broader condition doesn’t override a specific exception earlier in the list.
  3. Connection layer: Confirm that the server selected in Home connects manually. Changing the SSID rule order won’t fix authentication failures or an unreachable server.
  4. Routing layer: Confirm that Global Routing is set as expected. Under Config, check rule matching from top to bottom, put specific rules before broader ones, and keep FINAL as the fallback.

Troubleshooting order: Fix connection conditions before rules

Keep the same server and Config, then test three network changes: the specified Wi-Fi, another Wi-Fi network, and cellular. Only adjust domain routing after the connection actions work as expected. This makes it easier to identify whether an issue is in the trigger or routing layer.

Common questions and how to recover

Why does it reconnect after I turn it off manually?

First turn off On Demand in Settings → On Demand, then disconnect in Home. If it no longer reconnects automatically, an active trigger was still in place. Before enabling On Demand again, check the Wi-Fi and cellular actions one by one.

Why does the same Wi-Fi network work inconsistently?

Check the actual SSID on the system’s Wi-Fi screen to rule out an automatic switch to a similarly named access point. Reconnect to that network and check whether a broader condition earlier in the list is matching first. Don’t rely on the router’s physical location to identify the network name.

Why does the VPN indicator appear if websites still won’t load?

Pause On Demand and check that the current network works directly, then connect manually to the same server from Home. Next, check Global Routing and the policy matched in Config. Connection status, server reachability, and rule results must be tested separately.

Why doesn’t refreshing a page trigger the domain condition?

First confirm that you entered a domain condition actually supported by On Demand, not Config’s DOMAIN-SUFFIX rule. Close the old page and make a new request, then check DNS cache and the condition’s action. If the domain resolves normally, a condition that depends on failed resolution may not establish a connection.

Do I need to test again after restoring my configuration?

Yes. Restoring Config doesn’t necessarily restore system VPN permission, On Demand conditions, or the current SSID. Check Settings → On Demand, Home → Global Routing, and Config in that order, then repeat a network-switch test.

Keep a brief record of the network names tested, trigger actions, selected server, Global Routing option, and webpage results. Don’t include subscription URLs or authentication details. If the issue remains unclear, return to the baseline—On Demand off, manual connection working—then restore conditions one at a time. This is more useful for troubleshooting than repeatedly reinstalling the app.

Get and set up Shadowrocket

The iPhone and iPad version costs $2.99 as a one-time App Store purchase. The Mac (Apple Silicon and Intel), Windows, Android, and Linux versions are free. For iPhone and iPad system requirements, see the App Store listing. The developer is Shadow Launch Technology Limited. Choose the download option for your device, then follow the setup guide to make your first connection.

This page does not provide, sell, or recommend servers or subscriptions. The steps above assume you already have your own provider and subscription.

Download Shadowrocket