Rule-based routing
View or edit Rule in Config, then set Global Routing to Config to apply the selected configuration's rules. DOMAIN-SUFFIX matches domain suffixes; IP-CIDR matches IP ranges; DIRECT sends traffic directly, while PROXY applies the proxy policy. Rule order matters: place more specific conditions before broader ones, then use FINAL for remaining requests. After editing, save the file and confirm it is the active Config. Do not treat an example snippet as a complete configuration for every network.
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
IP-CIDR,192.168.0.0/16,DIRECT
FINAL,PROXY
Read about rules and features
On Demand
On Demand requests a connection when configured network conditions are met. Find it in Settings. First confirm that a manual connection works, then configure the trigger conditions one at a time and check the results on networks you use regularly. On Demand controls when to connect, not which policy applies to each request once connected, so it does not replace Rule or Global Routing. After changing the conditions, check the system VPN status and actual access results. To temporarily stop automatic connections, review the On Demand settings too; turning off the main switch alone may not prevent a condition from triggering them again.
Settings → On Demand
Read about On Demand
Protocols and Add Server
Shadowrocket supports protocols including Shadowsocks, VMess, VLESS, Trojan, and WireGuard. To add a server manually, choose the matching type under Add Server, then check the Host, Port, and the authentication, transport, and TLS parameters required by that protocol. Fields are not interchangeable between protocols, and similar names do not mean parameters can be omitted. If an imported server will not connect, first check that the link is complete and its fields were recognized correctly, then verify the server-side requirements. Do not keep switching types based only on the protocol name.
Shadowsocks · VMess · VLESS
Trojan · WireGuard · Hysteria2
Read about server fields
Subscribe import
If you already have a subscription URL, select Subscribe under Add Server, enter the address, save it, and check the update result. Get the link from your service provider and copy it in full, without extra spaces, line breaks, or explanatory text. A subscription maintains server entries; it does not decide all routing policies for you. If an update fails, check that the URL is valid, the returned content uses a format supported by the client, and your current network can reach the subscription address. Subscription URLs may contain access credentials; do not post them in screenshots, article comments, or diagnostic logs.
Add Server → Type → Subscribe
Read about subscription update options
Config files
Config manages configuration files, which commonly include General, Rule, and Hosts sections. Keep a working copy before editing, change one type of setting at a time, then save and confirm that the intended file is selected. In Global Routing, Config applies rules from the configuration, Proxy sends all traffic through the proxy policy, and Direct connects directly. Remember to restore your previous setting after temporary changes. If you use iCloud sync, check the sync scope and confirm which files are actually on each device. App purchases, Config files, and subscription contents are managed separately, so verify each one after switching devices.
[General]
dns-server = system
[Rule]
FINAL,PROXY
Understanding the three Global Routing modes
Diagnostics and latency tests
Connectivity Test on Home can help check server responses; Diagnostics in Settings can help investigate further. Results depend on the test method, current network, and target response. A latency reading does not guarantee that webpages will load. Consider connection status, request logs, and DNS results together, and check traffic changes in Data. Data shows client-side statistics, not the remaining allowance on a service provider account. When troubleshooting, keep the error message and check server parameters, routing mode, and DNS in order, changing one thing at a time.
Home → Connectivity Test
Settings → Diagnostics
Data
See the connection troubleshooting steps