Shadowrocket Official Manual
Shadowrocket Features & Settings
To route traffic by rules, go to Home → Global Routing and select Config, then check which file is enabled under Config. Subscriptions, On Demand, and DNS are managed separately; you don’t need to change them all at once.
The examples below use the iPhone / iPad interface. Menu locations and available options on other platforms may vary; refer to the app.
Global Routing / ConfigRouting policiesDIRECT- Connect directly
PROXY- Connect through a proxy
REJECT- Reject matching connections
Feature index
Choose a feature based on what you need to do, then go to the relevant section for steps and settings.
Rule-based routing
Rule-based routing lets you choose how different connections are handled. Set Global Routing to Config on Home, and the app will match destinations against the active configuration. When writing rules, put exceptions for specific domains before broader rules, and check the fallback policy set by FINAL. If a site takes the wrong route, first confirm which configuration is active, then check the rule order—don’t rewrite the entire file as a first step.
DOMAIN-SUFFIX,example.com,PROXY
FINAL,DIRECT
On Demand
On Demand controls when the system requests a VPN connection; it doesn’t control how traffic is routed after the connection is established. Turn on On Demand in Settings and choose from the available network conditions. First confirm that a manual connection works, then enable On Demand and test what happens when switching between Wi-Fi and cellular. If the connection comes back after you disconnect manually, check whether the trigger conditions are still met; there’s no need to change server settings.
Settings → On Demand
Multiple protocols
To add a single server, select the same protocol as the existing server under Add Server, then enter the matching details. The same address and port don’t mean two protocols are interchangeable. Use the original source for authentication, transport, and encryption settings. If the connection test fails after saving, check the protocol and port first, then review the remaining settings. Don’t copy settings from another working server, and never post credentials in a public forum.
Shadowsocks / VMess / VLESS / Trojan
HTTP / SOCKS5 / WireGuard / Hysteria2
Import subscriptions
Use Subscribe for bulk imports and Add Server to enter a single server. Get subscription details from your provider. After saving the URL, check SERVER for the imported entries, then run Connectivity Test on one of them. Refreshing a subscription updates the server list; it doesn’t switch the rule file under Config. If a refresh removes the selected entry, choose another server and check that any name referenced in your configuration still exists.
Home → Add Server → Subscribe
Configuration files
Use Config to manage routing configurations. Before editing, keep a recoverable copy, add the rules you want to test to a separate configuration, and confirm it’s enabled after saving your changes. Change one type of setting at a time—for example, test domain rules before adjusting DNS. This makes it easier to switch back to the original configuration and identify whether the issue is caused by rule order, DNS settings, or the selected server, rather than troubleshooting everything at once.
[Rule]
DOMAIN,example.com,DIRECT
FINAL,PROXY
Diagnostic tools
Connectivity Test shows how a server performs on the current network using the selected test method. For further investigation, use Diagnostics in Settings. Keep the network and server constant, change only one setting at a time, and repeat the same test to compare results. A successful test doesn’t guarantee that rules, DNS resolution, or the destination website are working correctly. To document an issue, note the failing step and current mode, and remove credentials and private addresses before sharing.
Connectivity Test / Test Method / Diagnostics
01 Connection modes
The three Global Routing modes
Switch modes under Home → Global Routing. Use Config for rule-based routing; for diagnostics, compare Proxy and Direct against the same destination.
| Option | How it works | When to use it |
|---|---|---|
Config | Routes connections according to the rules in the active configuration. | When destinations need different handling, such as direct connections, proxy routing, or rejection. |
Proxy | All connections handled by the app use the proxy; individual routing rules don’t determine the route. | To temporarily check whether the destination is reachable through the selected server. |
Direct | All connections handled by the app connect directly; individual routing rules don’t determine the route. | To temporarily check how the destination behaves on the current network without a proxy. |
Config here is a Global Routing option; Config in the bottom navigation opens the configuration management screen. Selecting the first doesn’t switch files, and editing the second won’t switch Proxy or Direct back to Config. After changing rules, check both locations before reconnecting to the destination.
Direct doesn’t turn off the connection switch on Home. To compare using the app with a direct connection against disconnecting the app entirely, test each separately. Keep the network, destination, and server unchanged; don’t switch from Wi-Fi to cellular while changing modes. If Proxy works but Config doesn’t behave as expected, check which rule matched first. If neither mode works, check the selected server and DNS path. When you’re done, switch back to your usual mode.
02 Match conditions
Rule types, policies, and configuration files
Check the active file under Config. Rules select a policy for each connection only when Config is selected in Global Routing.
Rules are generally evaluated from top to bottom; the first match determines how a connection is handled. A condition answers “what matches?”; a policy answers “what happens next?” For example, DOMAIN,example.com,DIRECT matches the specified domain and connects directly. DOMAIN-SUFFIX,example.com,PROXY also covers its subdomains. If you put the exact-match rule after the suffix rule, the root domain may not be handled separately as intended.
| Keyword | What it matches | Notes |
|---|---|---|
DOMAIN | Exact domain | Enter the hostname without a scheme, port, or URL path. |
DOMAIN-SUFFIX | Domain suffix | Includes matching subdomains. Put full-domain exceptions first. |
DOMAIN-KEYWORD | Text contained in a domain | Short strings can match unrelated domains. Use DOMAIN when you can specify an exact match. |
IP-CIDR / IP-CIDR6 | IPv4 / IPv6 address range | Check the address family first, then use the correct prefix length to define the range. |
GEOIP | Geographic classification of the destination IP | Based on IP address data, not the domain suffix, interface language, or device region. |
USER-AGENT | Recognized User-Agent field | If the field isn’t visible, you can’t rely on it for matching. Don’t use it as a general-purpose way to identify apps. |
FINAL | Connections not matched by earlier rules | Place it at the end of the rules to define how unlisted destinations are handled. |
The snippet below matches example.com exactly and routes it DIRECT. Other hosts matching the suffix go through PROXY, while all remaining destinations use DIRECT. To reject a specific destination, add a separate REJECT rule for it. Don’t put broad conditions at the top until you’ve verified their scope.
[Rule]
DOMAIN,example.com,DIRECT
DOMAIN-SUFFIX,example.com,PROXY
FINAL,DIRECT
Test one destination that should match a rule and another that should fall through to FINAL. Websites often request content from multiple domains, so a page may load while its images fail because the requests matched different rules. Save a separate copy of the configuration before making changes, so you can revert if a rule matches unexpectedly. See the glossary for rule keywords.
03 Import & maintenance
Managing subscriptions and servers
Use subscriptions to manage a group of servers. To add or check a single connection, use a share link, QR code, or manual entry.
Subscribe and Add Server
Get subscription details from your provider. If you already have a subscription URL, open Add Server from Home, select Subscribe, and enter the complete URL. After saving and updating, go to Home → SERVER and check that the entries appear. If the list is empty, first check that the URL was copied in full and that the current network can reach the subscription source. Don’t split a subscription URL into separate server address and port fields.
If you have details for a single server, select its protocol under Add Server and enter the fields as provided. If you have the corresponding QR code, use Scan QR Code to read it, then review the entry before saving. Shadowsocks, VMess, VLESS, Trojan, HTTP, SOCKS5, WireGuard, and Hysteria2 use different fields. The app can’t determine the protocol from the port, and authentication fields from one protocol shouldn’t be reused for another.
Selecting and updating servers
After updating a subscription, check the selected server under SERVER—especially if an entry was renamed or removed. For testing, choose a server known to work and run Connectivity Test as an initial check, then try opening the destination app or website. If the list refreshes but the proxy connection fails, check the subscription update and proxy connection separately: retrieving entries doesn’t mean every server address in the list is reachable.
The app’s one-time purchase is not a service plan. This site does not provide, sell, or recommend proxy servers or subscriptions. Don’t show complete subscription URLs, QR codes, or server credentials in public screenshots.
04 Automatic connections
On Demand connections
On Demand controls when a connection is requested; Global Routing controls how traffic is handled after the connection is established.
Connect manually once from Home to confirm that the system has allowed the VPN configuration and that the selected server works on the current network. Then go to Settings → On Demand and choose from the available trigger conditions. If you only want automatic connections on a certain type of network, start with the narrowest applicable scope. If you don’t need automatic connections, turn off On Demand and connect manually.
After saving, check the connection status on Home over both Wi-Fi and cellular. If the connection drops and reconnects, check whether the network still meets the trigger conditions, then temporarily turn off On Demand to compare. If manual connection still fails with On Demand off, troubleshoot the server or network connectivity. A successful automatic trigger, a working server, and traffic matching the intended policy are three separate things to verify.
05 Traffic statistics
Data usage statistics
Data shows traffic recorded by the app; it isn’t a billing record from your carrier or service provider.
Open Data and check the statistics period and units, then review the upload and download values. To measure the change from a single action, note the starting values, load a specific webpage or make one app request, then check the difference in Data. You don’t need to clear history for a single test. If the interface offers a way to clear statistics, record any values you want to keep first.
Pause other downloads during testing where possible, so background requests aren’t mistaken for traffic from the destination. If the numbers don’t change, check the statistics period, the connection status on Home, and whether the destination loaded from cache. An increase alone doesn’t prove the destination used the proxy. To check the route, review Global Routing, the active configuration, and the available diagnostics.
06 Common settings
Common Settings options
Note the current values first, and change one setting at a time. The suggestions below are starting points for troubleshooting, not universal defaults for every device.
DNS: domain name resolution
Check the DNS-related options in Settings and see whether dns-server already has a value in the active Config. If you don’t have a specific need for custom DNS, keep the current settings if they’re working. To use a specified resolver, enter its address as required by the interface. For DNS over HTTPS, enter the complete endpoint provided by the chosen DNS service, not the URL of the website you want to visit. After changing the setting, revisit the same destination on the same network. Don’t also switch servers or change routing rules. If only some domains fail, check the DNS entries and rules in the configuration instead of assuming the entire proxy connection is down.
Test Method: connectivity test method
Check the current option under Settings → Test Method, then run Connectivity Test from Home. When comparing servers, keep the test method, destination, and network the same; different methods test different parts of the connection, so their results aren’t directly comparable. If a test only checks whether a port is reachable, success doesn’t confirm that authentication or webpage loading works. If browsing and the test results disagree, keep the current test result, then try reaching a specific destination using the same server.
Today Widget: quick access beyond the app
Today Widget lets you check status or use available quick actions in system widget areas that support it. Check the related option in Settings, then look for Shadowrocket in the system’s widget editor. If the system doesn’t show the widget, you can still use Home. Changing DNS or enabling On Demand won’t fix a missing widget. After using the widget, return to Home to confirm the connection status.
iCloud: sync across devices
To sync across your own devices, first check the iCloud options in Settings and confirm that the system allows the app to use iCloud. Before enabling sync, keep a copy of any configurations you want to preserve. Afterward, make a change that contains no credentials to confirm what gets synced. On the receiving device, check the active configuration, selected server, and VPN permissions separately; syncing a file doesn’t sync connection status. If you want each device to use its own configuration, leave the relevant sync option off.
Diagnostics: capture and investigate issues
Open Diagnostics from Settings, reproduce the issue once on a consistent network, and note the action that triggered it, the Global Routing mode, the configuration in use, and the test method. First identify whether the failure occurs while establishing the connection, resolving the domain, or reaching the destination. If only specific domains fail, check the rule order and DNS. If you increased logging during troubleshooting, restore the original setting afterward. Before sharing diagnostic information, remove subscription URLs, authentication fields, private domains, and other identifying details. See the settings manual for more options.