Rule-based routing: check order, then policy
On Home, set Global Routing to Config to match requests against the Rules in the active configuration, in order. Open Config and confirm which file is in use, then review the domain rules, IP range rules, and the position of FINAL. More specific rules usually belong before broader ones to prevent an earlier match from taking precedence. The example below shows rule syntax, not a complete configuration. Check the actual server selected for PROXY, then reconnect and test the target request after saving.
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
IP-CIDR,192.168.0.0/16,DIRECT
FINAL,PROXY
On Demand: establish a repeatable connection first
On Demand triggers connections based on system conditions. Enable it only after manual connections work normally. In Settings, review On Demand and confirm that Shadowrocket’s VPN configuration is present in the system settings. After changing conditions, test in each expected network environment to confirm that the connection starts and triggers again after disconnecting. If it keeps reconnecting, check the On Demand conditions first rather than repeatedly deleting the configuration. The rule snippet below illustrates traffic policies; it does not configure On Demand triggers.
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
FINAL,DIRECT
Multiple protocols: match the server parameters
Shadowrocket supports protocols including Shadowsocks, VMess, VLESS, Trojan, and Hysteria2. To add a server manually, choose the matching Type under Add Server, then enter the address, port, and authentication details from your existing information. Check TLS, SNI, and transport parameters one by one; matching ports do not mean two configurations are the same. After importing, confirm the protocol type. Rules determine how traffic is handled; they do not fix server authentication or transport settings. The snippet below shows how a request can be assigned a proxy policy.
[Rule]
DOMAIN,example.com,PROXY
FINAL,DIRECT
Subscribe: identify what you’re importing
Before importing an existing subscription, determine whether its link provides a server list or a configuration file; these use different import paths. In Config, find the relevant Subscribe option and import according to the link’s content. You can also add a single server through Add Server, a QR code, or clipboard recognition. After importing, check that the name, Type, and server count look right, then test an entry. If an update fails, first confirm that the original link is still accessible. Rule snippets do not contain subscription URLs or authentication details.
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
FINAL,PROXY
Configuration files: identify the active file
A Config file can include General, Rule, and Hosts sections. Having a file available does not mean it is selected. Before making changes, note the current filename and keep a copy of the original. Change one setting at a time. With iCloud sync, check that the file has arrived on both devices and that the same file is selected; completed sync does not guarantee identical connection parameters. After saving, return to Home and confirm that Global Routing is set to Config. The snippet below is partial. Check the original file before copying to avoid adding a duplicate section.
[General]
dns-server = system
[Rule]
FINAL,PROXY
Diagnostics: narrow down the cause by symptom
On Home, use Connectivity Test to check the server response, then compare it with actual access to identify the problem. A response in one test does not mean every destination is reachable. In Settings, review relevant information under Diagnostics and use Data to observe traffic changes, taking the measurement scope and time into account. If only one domain fails, check its DNS resolution and matching rule first. If all access fails, check the network, server, and authorization. The snippet below shows that domain exceptions should appear before FINAL; retest the same destination after making changes.
[Rule]
DOMAIN,example.com,DIRECT
FINAL,PROXY