[Rule]
Policies follow rule order
Rule-based routing lets different requests take different paths. In Home, set Global Routing to Config. The client then checks rules in the active configuration in order, and the first match determines the policy. DOMAIN-SUFFIX matches domain suffixes, IP-CIDR matches IP ranges, and FINAL handles requests not matched by earlier rules. Before editing, save a copy of the original file. Place more specific entries before broader ones, then check matches against real requests. The following is a syntax example, not a usable server configuration.
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
IP-CIDR,192.168.0.0/16,DIRECT
FINAL,PROXY
See explanations of rule keywords →
[General]
Trigger connections by condition
On Demand lets the system trigger a connection when specified conditions are met; it does not select an exit for each request. First connect manually and confirm your existing configuration works. Then open On Demand in Settings and set conditions for the networks you actually use. After saving, test Wi-Fi, cellular and network transitions separately to check the results. If the connection comes back after you disconnect manually, check these conditions first. On Demand and Global Routing address different layers: the former determines when to connect, while the latter determines how requests are routed after a connection is established.
SettingsOn DemandGlobal Routing
Read the On Demand settings guide →
[Proxy]
Check parameters against your existing service
Shadowrocket supports protocols including Shadowsocks, VMess, VLESS, Trojan, HTTP, SOCKS5, WireGuard and Hysteria2. The protocol type is determined by your existing server configuration; choosing a name at random will not make protocols interoperable. In Add Server, select Type first, then check Host, Port and the relevant authentication fields. When using TLS, also check details such as SNI. After importing a share link, verify key parameters, especially that the transport method matches the server requirements. Do not disable certificate verification as a substitute for correcting the domain, certificate or time settings.
ShadowsocksVMessVLESSTrojanWireGuardHysteria2
Identify protocols and import parameters →
[Subscribe]
Import and update an existing subscription
A subscription manages a server list you already have. Get the complete link from your own service provider, choose Subscribe in Add Server, enter the link and save, then update it and check that the expected entries appear. Subscription links often contain credentials; do not share them on public pages or in screenshots. If an update fails, first confirm the link is complete, the service is active and the current network can reach it. Then check that the response uses the expected subscription format. Updating a subscription mainly changes the server entries it manages; it does not switch the active Config or enable a connection.
Add ServerSubscribeSERVER
Import an existing subscription step by step →
[Config]
Manage servers and rules separately
Config files organize content such as General and Rule, while the server list stores the information required to connect. After importing a file, check which configuration is currently selected; editing a file does not mean it is active. Export a copy before editing, change one category of settings at a time, and record why you made each change. Before using iCloud sync, check your system account, iCloud permissions and related in-app options. After migrating, check servers, subscriptions and the active policy. Sync and backup serve different purposes; seeing a filename on another device does not confirm that all connection parameters have been restored.
[General]
dns-server = system
[Rule]
FINAL,PROXY
See configuration backup and device migration →
[Diagnostics]
Separate reachability from request results
Start connection troubleshooting with Connectivity Test in Home, then use Test Method, Diagnostics and Log in Settings to identify the problem layer. A test result only indicates reachability using the specified method and target; it cannot prove that every app can access its destinations. Data can help show whether traffic passes through the client, but increased traffic does not mean the request succeeded. Keep the network, server and target fixed while troubleshooting, change one condition at a time, and note when the error occurs. Before sharing logs, remove subscription links, passwords and personal request details; keep only the necessary error information.
Connectivity TestTest MethodLogData
Troubleshoot connection issues →