Official Manual · Rules Reference
Shadowrocket Rules & Configuration Reference
Check the active configuration and Global Routing first, then identify which rule matched the request. The config defines match conditions; the policy determines what happens next. Check them separately.
This is a reference manual for users who already have their own subscription or server details and need to adjust rules. If you’re new to Shadowrocket, follow the quick-start guide to import, connect, and run basic checks first. Return to the relevant section here for syntax; links below point back to the guide when import or connection steps are needed, without repeating the installation walkthrough.
Shadowrocket is available for iPhone, iPad, Mac (Apple silicon and Intel), Windows, Android, and Linux. Interface locations may vary by platform, so this guide focuses on configuration keywords and actual matching behavior. See the download guide for all platforms for acquisition options and installation steps.
Configuration Structure and Safe Editing
A configuration file is a collection of settings and rules. It is not a subscription link or a server list. Subscriptions typically provide server details maintained by a service provider; configuration files define how requests are resolved, matched, and handled. They can work together, but updating a subscription doesn’t confirm that your rules are correct, and changing rules won’t fix server settings. Before editing, check which file is active in Config—don’t rely on a same-named copy you just downloaded.
What each of the four sections does
[General] stores general settings, often including DNS and system traffic handling options. [Rule] contains match conditions and policies, typically one per line. [Host] defines static mappings for specified hostnames. [URL Rewrite] uses regular expressions to describe URL rewrites or redirects. Section names are syntax: don’t translate them into headings or append one section’s content to another while omitting its name.
The example below illustrates the structure; it is not a complete configuration to replace your own. The domains are for demonstration only, and PROXY still requires a usable server selection. Real configurations may contain other sections; don’t remove them just because they aren’t shown here. If you’re unsure what an entry does, check its source and purpose before changing it.
[General]
bypass-system = true
dns-server = system
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
IP-CIDR,192.168.0.0/16,DIRECT
FINAL,PROXY
[Host]
localhost = 127.0.0.1
[URL Rewrite]
^http://example\.com(?=/|$) https://example.com 302
Keys, fields, and line breaks
General settings and Host mappings often use an equals sign between values, while rule lines usually use English commas to separate the type, condition, and policy. Chinese commas, full-width spaces, or quotation marks copied along with the text can change how a line is parsed. Put each rule on its own line. An editor may visually wrap a line without adding a real line break, so don’t mistake a wrapped line for two separate rules.
Blank lines can group content, but they don’t create a new priority level. Section names determine where rules belong; their position within Rule determines their order. Put explanatory text on its own comment line beginning with #. Don’t append comments to rule fields or add natural-language explanations to a condition and expect the client to ignore the extra text.
Copy first, edit next, then select the active file
Make a copy of the working file to preserve the original and any information provided by your service provider. Make one change in the copy, save it, confirm that it’s selected as the active config, then send a new test request. If you’re editing a local copy of a remotely maintained file, keep track of the remote source and your local changes so a later update doesn’t overwrite temporary adjustments.
Files with the same name may have different contents, and saving a file doesn’t make it active. To troubleshoot, add an easy-to-identify test rule in a copy, then check the request log for a match. If the log still shows the old rule, check the active file and Global Routing before making more changes. To revert, switch back to the original file rather than trying to undo each edit from memory.
Examples are not complete, one-size-fits-all configsWhen merging rules, keep the existing sections and server details you need. Move or add only lines you understand. Don’t concatenate entire files from different sources.
Get your subscription from your own service provider. For import steps, see the guide to importing and making your first connection. If no servers are available after import, resolve the input details and import result before troubleshooting rules. A PROXY match can’t help if there’s no usable connection to send the request through. Correct configuration structure is only the first check; it doesn’t verify every network path.
The three Global Routing modes and three basic policies
Global Routing sets the overall routing mode; a rule’s policy determines how a matched request is handled. Config, Proxy, and Direct in the interface are not the same layer as PROXY, DIRECT, and REJECT in rules. When troubleshooting a rule that appears ineffective, first check that the mode is Config. Results in Proxy or Direct mode don’t prove that a Rule condition is working as intended.
How Config, Proxy, and Direct differ
Config routes traffic according to the active configuration and is the mode to use when testing custom rules. Proxy sends requests the client can handle toward the proxy, helping isolate rule-based routing. Direct lets you observe the direct connection path. These are overall behaviors within the scope of traffic handled by the client; they don’t mean every system packet follows the same process or that switching modes immediately rebuilds every existing connection.
| Mode | Primary use | What to check |
|---|---|---|
| Config | Route according to the active configuration | Rule order, match conditions, and final policy |
| Proxy | Check basic reachability through the proxy | Selected server and connection settings |
| Direct | Check direct connectivity on the current network | Local network, DNS resolution, and destination service |
For example, if a domain opens in Proxy mode but fails in Config, that shows the modes produce different results; it doesn’t prove DNS is at fault. In Config mode, check which policy was selected, whether an earlier DIRECT or REJECT rule matched, and whether the actual request uses the hostname you initially entered. A browser redirect may change the hostname.
What PROXY, DIRECT, and REJECT mean
PROXY sends a matching request to the current proxy selection. DIRECT sends it over the direct connection path. REJECT blocks it. A policy doesn’t guarantee connectivity: PROXY still depends on valid server details and reachability to the destination, while DIRECT depends on the current network. REJECT applies only within the scope of its match condition. Think of these as handling decisions, not as “fast,” “slow,” or “fix it” options.
[Rule]
DOMAIN,blocked.example.com,REJECT
DOMAIN,local.example.com,DIRECT
DOMAIN-SUFFIX,example.com,PROXY
FINAL,PROXY
This example rejects one specific host, sends another specific host directly, and routes other requests under the domain suffix through PROXY. If you move the suffix rule to the top, the two specific exceptions may never get a chance to match. Policies don’t have an inherent priority ranking—REJECT doesn’t automatically override PROXY. Match conditions and order determine which rule takes effect.
Check proxy selection and protocol settings separately
A rule set to PROXY doesn’t include a server address, port, or authentication details. With protocols such as Shadowsocks, VMess, VLESS, and Trojan, retain the corresponding settings supplied by your service provider. Don’t copy fields from another protocol just because their names look similar. Protocols belong to the connection layer; rules belong to the selection layer. Correct rules can’t make up for missing connection settings.
On Demand manages connection behavior when its conditions are met; it isn’t a Rule policy. If the connection status keeps changing during a test, check the trigger conditions too, so disconnects or reconnects aren’t mistaken for inconsistent rule behavior. Connectivity Test helps you observe the tested connection’s status, but a successful result doesn’t replace testing how a specific request is routed.
When testing a mode change, change one variable at a time: note the original setting, switch modes, send a new request and record the result, then switch back to your usual Config mode. For a fuller comparison, see Config / Proxy / Direct in Global Routing. Don’t change the server, DNS, and rules in the same test; otherwise, it’s hard to tell what caused the result.
DOMAIN, DOMAIN-SUFFIX, and DOMAIN-KEYWORD
Domain rules can target a specific host, a domain and its subdomains, or a string in a hostname. Start with the narrowest condition that meets your needs instead of reaching for a broad keyword rule. Wider matches are more likely to affect unrelated requests, such as sign-in, payments, or content delivery, and can make unexpected behavior harder to explain.
DOMAIN: Match one exact hostname
DOMAIN matches an exact hostname. A condition of example.com shouldn’t be treated as automatically including www.example.com. Use it when you need to change how a specific host or endpoint is handled. Enter just the hostname—not a protocol prefix, port, path, or query string—and don’t paste a full URL from the address bar.
[Rule]
DOMAIN,api.example.com,PROXY
DOMAIN,static.example.com,DIRECT
FINAL,PROXY
A single webpage often contacts several hosts: the document may come from one domain, while images, APIs, and authentication use others. If only part of a page loads, don’t immediately broaden the match to a keyword. Find the failing host in the request log first, then decide whether to add an exact rule. A successful connection to one domain doesn’t mean every request for the page uses the same policy.
DOMAIN-SUFFIX: Match a domain and its subdomains
DOMAIN-SUFFIX,example.com,PROXY matches the domain and its subdomains, such as www.example.com and hosts at deeper levels. It matches on domain boundaries, not by searching for an arbitrary string; notexample.com isn’t a subdomain just because its ending looks similar. You usually don’t need to add an asterisk or a protocol prefix to the condition.
If most services under a domain should use PROXY, but an internal endpoint should use DIRECT, put the endpoint’s DOMAIN exception first, followed by the general DOMAIN-SUFFIX rule. This makes the intent clear: the first rule handles the exception, and the second covers the domain. If a service later moves to another domain, the old suffix rule won’t follow it; update the rule based on actual requests.
| Type | Example condition | What it matches |
|---|---|---|
| DOMAIN | api.example.com | The specified full hostname |
| DOMAIN-SUFFIX | example.com | The domain and its subdomains |
| DOMAIN-KEYWORD | example | A specified string in the hostname |
DOMAIN-KEYWORD: Convenient, but broader in scope
DOMAIN-KEYWORD matches a string within a hostname. It doesn’t search webpage content or scan URL paths. A condition of example could match multiple unrelated domains. Use it only when you need a broad text match and have verified its scope. It’s not a good first rule for an unfamiliar service, and short, common letter combinations are especially risky with a blocking policy.
Be especially cautious with REJECT: start with a narrow match and broaden only if needed. Rejecting a shared domain can break images, verification, or account features; blocking a host that serves business content may affect more than the resources you intended to block. Domain rules can’t distinguish individual page elements within the same encrypted connection. For more, see What REJECT rules do and where their limits lie.
How to verify a domain condition matches
Start with one known hostname. Confirm that the request log shows the same hostname as the condition, then check the matched rule and policy. Don’t rely only on the browser’s address bar: redirects, cached content, and background APIs can change the actual set of requests. If the log shows only a destination IP, check whether hostname information is available rather than repeatedly adding rules for the same name.
Distinguish hostname aliases from service migrations. A destination resolving through other names doesn’t mean you need to add every name in the resolution chain to your rules. Use the client’s actual request log and new business requests as your guide. After editing, retest from the same entry point and compare the before-and-after logs. Confirm that only the intended hosts are affected before expanding the rule to an entire suffix.
When to use IP-CIDR, GEOIP, and USER-AGENT
Rules can also act on destination addresses or information available in a request. These conditions don’t replace domain rules: a domain identifies a service by name, an IP identifies the connection destination, and USER-AGENT matches a request field. Before choosing a condition, check what information is available to the client at that stage of the request. Otherwise, a syntactically valid rule may never get a chance to match.
IP-CIDR: Match an address range
IP-CIDR describes an IPv4 range using an address and prefix length. A longer prefix covers a smaller range; use /32 for a single IPv4 address. For example, 192.168.0.0/16 covers addresses in that range, while 192.168.10.0/24 is narrower. Use the network address for the range you intend to match; the number after the slash is not a port.
[Rule]
IP-CIDR,192.168.10.0/24,DIRECT,no-resolve
IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
IP-CIDR6,fc00::/7,DIRECT,no-resolve
GEOIP,CN,DIRECT
FINAL,PROXY
These lines demonstrate how to write rules for local network addresses, IPv6 local address ranges, and geographic routing. They’re not meant to be copied into every configuration. Corporate or remote networks may use the same private address ranges. If you need a private range to use a particular remote path, a broad DIRECT rule could send the connection to the wrong place. Choose a policy based on your network and the destination.
no-resolve does not turn off DNS
The no-resolve option prevents a DNS lookup solely to evaluate that IP rule. It doesn’t disable DNS throughout the app or stop all later rules from resolving names. Address conditions may still be evaluated when a request already uses an IP or usable address information is available. Adding this option without care can change results when a match depends on a resolved hostname.
If a domain request doesn’t match an address range, check whether the rule allows resolution for address matching, then see how later rules handle the request. Don’t add no-resolve to every address rule as a general performance setting. First decide which lookup you want to avoid, then check the behavior in the request log. Reducing lookups and getting the intended policy are not the same thing.
GEOIP: An IP database lookup, not a website identity check
GEOIP,CN,DIRECT checks the geographic classification of the destination IP in the database being used. It doesn’t identify a website’s language or where its operator is based, and it can’t guarantee that a domain will always match the same region across networks, times, or DNS results. Content delivery services may return different addresses, and a database’s classification doesn’t describe every location where a service operates.
For a domain with a clear business requirement, express the intent with a domain rule first, then use GEOIP afterward as a broader category match. If a website’s routing changes unexpectedly, check the resolved address and match log to distinguish an address change from a rule failure. Don’t move GEOIP around to mask a specific domain requirement; that changes routing for more requests at once.
USER-AGENT: Only useful when the request field is available
USER-AGENT,Example*,DIRECT shows a pattern match on User-Agent; the asterisk is a wildcard. It doesn’t identify software by app name, process, or icon. Apps may share a request library or change the field, and some requests may not expose a User-Agent for the rule to inspect at all.
For encrypted requests, don’t assume the client can automatically see every HTTP field. USER-AGENT isn’t a universal way to classify all app traffic. This guide doesn’t require enabling decryption to use this rule. If your goal is to route a specific service over a particular path, first see whether a clear domain or address condition will work, and test both field visibility and the resulting policy.
Check IPv4 and IPv6 separately. An IP-CIDR rule doesn’t automatically cover the corresponding IPv6 address, so a service using a different address family may match a different rule. If a domain behaves differently across networks, include the address family in your checks rather than immediately disabling a network feature. Find the actual destination address first to determine which condition is missing.
Top-down matching, exception rules, and FINAL
Rules in Rule are checked from top to bottom; the first match determines the policy for that request. A more specific rule doesn’t automatically get higher priority, and a rule at the end of the file doesn’t override one at the beginning. With this in mind, many cases where a rule seems ineffective become testable: did the request match an earlier condition before it reached this rule?
Put specific exceptions before broad rules
Suppose one host under a domain needs a direct connection while the others should use a proxy. Put that host’s DOMAIN rule first, followed by a DOMAIN-SUFFIX rule for the whole domain. If you reverse the order, the exact rule may remain in the file but never get a chance to match. Rule type defines scope; position defines order. Both must be correct.
[Rule]
# Check the exact exception first
DOMAIN,intranet.example.com,DIRECT
DOMAIN,blocked.example.com,REJECT
# Then check the broader domain range
DOMAIN-SUFFIX,example.com,PROXY
# Put address classification and the final policy afterward
IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
GEOIP,CN,DIRECT
FINAL,PROXY
Domain rules come before GEOIP here so that specific service intent takes precedence over a broader address classification. This isn’t a fixed ordering formula for every configuration: if a particular address range must take precedence, you can put a reviewed address exception earlier. Make the intended override clear, and test requests that match overlapping conditions.
FINAL is a fallback, not an override
FINAL,PROXY uses PROXY when none of the preceding rules match. It doesn’t carry a domain or network condition. In most cases, keep FINAL as the last active rule in the Rule section so later conditions aren’t bypassed. Moving FINAL into the middle doesn’t mean “try the proxy, then check the next rule if it fails.” Rules aren’t retried one by one based on connectivity.
Choose DIRECT or PROXY for FINAL based on your overall routing goals; there’s no universally correct choice. With PROXY, uncategorized requests depend on a usable proxy selection. With DIRECT, they depend on a working direct connection on the current network. Document the fallback choice and test a request not covered by earlier conditions to confirm it goes where expected.
Duplicate, conflicting, and unreachable rules
Exact duplicates usually make a file harder to read without adding value. If the same condition has different policies, the earlier rule can hide the later one. Less obvious conflicts occur when one condition includes another—for example, a keyword match may cover a suffix match, and a suffix match may cover an exact host. Look beyond identical lines for a broader condition that could match the request first.
When combining rules from different sources, organize them by intent and check for overlapping conditions rather than simply sorting them alphabetically. A sorting tool may move a top-level exception farther down. Comments can explain what a group of rules does, but they don’t change priority: labeling a rule “highest priority” won’t make it work if it’s after FINAL.
Check the scope with a set of comparison requests
When testing a suffix rule, check at least the domain itself, one subdomain, and a hostname outside that domain. For an exact exception, also test another host under the same domain. The goal isn’t just to prove that one page loads; confirm that intended requests are covered and unrelated requests are left alone. With REJECT, check that normal features still work.
If several rules could match the same request, temporarily narrow the test in a copy and eliminate earlier candidates one at a time. Change only the order or the condition in each test, not both the policy and the rule. Record the current match, expected match, and destination host; that usually explains the issue better than taking repeated screenshots of the entire config.
Rule matching is not a fallback queue for failed connectionsIf a PROXY match fails to connect, the client doesn’t continue to the next DIRECT rule. Check the selected path or explicitly change the routing decision rather than adding another line with the same condition.
How General, DNS, and Host affect rule matching
DNS maps names to addresses; rules decide how requests are handled. The two are related, but they aren’t interchangeable. A domain rule can express intent before an address is available, while an address rule needs destination IP information. When troubleshooting, distinguish between no address being returned, an unsuitable address being returned, and the wrong path being selected after resolution. Changing DNS may temporarily change what you see without explaining the actual cause.
Keep known-good General settings in place
dns-server = system uses the system DNS settings. It’s a straightforward baseline, but it doesn’t guarantee the same result on every network. bypass-system = true affects bypass handling for system-related traffic; it isn’t a domain allowlist and doesn’t mean all local traffic will always go direct. The scope of traffic handled also depends on the system and current settings.
[General]
bypass-system = true
dns-server = system
[Host]
localhost = 127.0.0.1
printer.example.com = 192.168.10.20
If your current config works, don’t copy unfamiliar General parameters just to make it look more complete. General settings can affect the entire configuration and are harder to scope than an exact domain rule. Before changing one, note its original value and identify whether you’re changing the resolver, system traffic handling, or another option. Avoid introducing several global variables at once.
System DNS, custom DNS, and DNS over HTTPS
System DNS inherits the resolver settings of the current network. Custom DNS requires a resolver you can actually reach and whose source you understand. DNS over HTTPS wraps DNS requests in HTTPS, but still depends on a reachable service address, a working connection, and a suitable route. A particular transport doesn’t guarantee more suitable answers for your use case or mean that the business request itself is routed through a proxy.
This guide doesn’t recommend external DNS services. If you need to change DNS, use a separate copy and change only the resolver settings, then test the same domain in the same routing mode. For a resolver endpoint identified by a hostname, consider how that hostname is resolved to avoid creating a circular dependency. For guidance, see System DNS, custom DNS, and DNS over HTTPS compared.
Host defines mappings, not routing policies
In Host, printer.example.com = 192.168.10.20 maps a specified name to an address; it doesn’t automatically send requests DIRECT. If the service needs a direct path, define it with an explicit rule and confirm the address is reachable on your current network. Mapping a name to a private address doesn’t give the device connectivity to a remote private network by itself.
Static mappings are appropriate for hosts with known addresses that you control, not for pinning a large service to an unverified address. Services may change addresses due to region, load, or outages; keeping an old mapping can bypass normal DNS updates. If a connection suddenly stops working, check manual Host entries as well as Rule.
An address mapping doesn’t change an encrypted service’s identity
If you map a domain to a different server, the browser may still use the original domain for the encrypted connection and certificate check. The connection can fail if the server doesn’t serve that name. Host isn’t a general fix for certificate errors or a URL redirect. Don’t hide a mapping mistake by ignoring identity checks; verify that the hostname, address, and destination service belong together.
DNS caching and connection reuse can delay the effect of a change. After saving the config, send a new request and consider whether the app is still reusing an old connection. If needed, close the app’s existing session before retesting. Don’t conclude that Host is ineffective based on a request that still used an old address, and don’t cycle through DNS settings without keeping a record.
A domain failing while direct access to its IP succeeds doesn’t immediately prove a DNS problem. Accessing an IP directly may use a different virtual host, certificate, or rule, so the two tests aren’t equivalent. For a meaningful comparison, keep the domain the same and check the resolved address, matched rule, and actual destination. Change one variable at a time so each test remains explainable.
URL Rewrite matching, redirects, and risk boundaries
URL Rewrite matches and modifies URLs; it isn’t another way to write Rule. Rule determines which policy handles a request, while a redirect may cause the app to request a different address. Both can affect the same visit in sequence. Before adding a rewrite, decide whether you need to change the connection path or the request URL. If you only want a domain to use a proxy, you usually don’t need URL Rewrite.
Understand the regular expression, replacement target, and status code
The example below redirects an HTTP URL for a specified host to the corresponding HTTPS URL. The destination server must actually support HTTPS. The match expression, replacement target, and status code each have a different role; don’t copy the comma-separated domain-rule syntax into this section. This example explains one rule only. Don’t add it to every config without first checking what’s already there.
[URL Rewrite]
^http://example\.com(?=/|$) https://example.com 302
The leading ^ anchors the match to the start of the URL. \. matches a literal period, rather than letting the period act as any character in a regular expression. (?=/|$) requires the hostname to be followed by a slash or the end of the string, so hosts with similar prefixes aren’t included. The replacement changes the matched prefix; test whether the rest of the path is preserved.
302 means a temporary redirect. After receiving it, the client may send another request. It isn’t a proxy policy or a fallback for failed connections. Test the new destination, number of redirects, and final matched rule—not just whether the first page appears. If the destination triggers a reverse rewrite, the request may loop until it fails.
Check paths, query parameters, and request methods
Replacing a URL prefix can affect multiple paths under the same host. Include paths and query parameters that need to be preserved in your tests; don’t test only the site’s home page. Sign-in callbacks and signed requests can be sensitive to URL changes. Even if the page loads, the server may reject a rewritten request if its parameters have changed meaning. Document the purpose of each complex capture group so it’s easy to review.
Browser navigation and app API requests are different scenarios. Some requests include a body, and an app may handle redirects differently from a browser. A single browser test doesn’t prove the same rule will work for every API. For account, authentication, or write operations, preserve the original behavior by default; experiment within a limited scope only when you understand what the destination service requires.
Visibility limits for encrypted traffic
The full path of an HTTPS request is generally encrypted, so don’t assume the client can freely read and rewrite it during ordinary forwarding. Whether a rewrite can be applied depends on traffic visibility and the active configuration. A domain rule matching a hostname doesn’t mean path rewriting will work; hostname information and full HTTP content belong to different layers.
This guide doesn’t require additional decryption settings for URL Rewrite or recommend installing a certificate as a routine troubleshooting step. If domain-based routing meets your needs, prefer a clearly scoped Rule. Take particular care with accounts and sensitive data: understand what each setting affects. Keep any rewrite you can’t explain in a copy for testing rather than using it in your everyday config.
Check how rewrites and subsequent rules interact
If the original URL redirects to a different domain, the new request needs its own routing decision. DIRECT for the original domain doesn’t mean the redirected domain will also connect directly. If a page’s first request succeeds but a later one fails, map out the redirect chain and check each host’s resolution, matched rule, and policy. Don’t keep changing the first domain rule.
When maintaining a rewrite, record the original URL pattern, destination, expected status code, and counterexamples. Include at least one similar hostname that should not match and one path that should be preserved. If something breaks, disable the new rewrite first while leaving other settings unchanged. If the problem disappears, narrow the expression one step at a time rather than changing DNS, servers, and every rule together.
Test domain routing and URL rewriting separatelyPROXY doesn’t change a URL, and a redirect doesn’t automatically select PROXY. Record the hostname and policy at each step to locate where the failure occurs.
Rule Validation, Common Issues, and Ongoing Maintenance
Validate rules in a closed loop: define the expected result, save a copy, make one change, send a new request, check the log, then keep or revert the change. Don’t treat one page loading as the full acceptance test or one failure as proof that the entire config is broken. Rules are only one part of a connection; check DNS, the selected server, the destination service, and the local network separately.
Create repeatable tests
For each change, identify a hostname that should match, the expected policy, and a comparison host that should be unaffected. Before testing, confirm that Global Routing is set to Config, the saved copy is active, and the server selection matches the previous test. Send a new request rather than relying on a cached page. Record the actual hostname, destination address, and policy; include the network conditions if relevant.
If Connectivity Test succeeds but the service fails, inspect that service’s requests rather than repeatedly testing the server. Conversely, a page loading doesn’t prove every rule matched correctly; the content may be cached or served by other hosts. Useful evidence should correspond to a new request in this test and show which rule handled it—not just a feeling that things are faster.
Narrow down the cause based on the symptoms
| Symptom | Check first | Next step |
|---|---|---|
| New rule doesn’t match | Active config, Config mode, earlier conditions | Check the actual hostname and any rule that matched earlier |
| PROXY matches, but the connection fails | Server selection and connection settings | Test the proxy path and destination service separately |
| Only some resources fail | APIs, static assets, and redirect hostnames | Check the policy for each host |
| Local changes disappear after an update | Remote source and local copy | Compare the relevant sections before and after the update |
If saving reports a syntax error, start with the most recent edits: check section names, English commas, equals signs, and trailing text, then reduce the test to a few lines. If every service fails after connecting, restore the last working file and distinguish global setting changes from local rule changes. If only one domain fails, check its DNS resolution, earlier matches, and rewrites first; there’s no need to rebuild all server details.
Track subscription updates separately from rule changes
Get subscriptions from your own service provider. Treat updating a subscription and updating a configuration as separate events. An update may change server entries or the selected server; a remote config update may replace local rules. After updating, identify which content changed before running the relevant tests again. For ways to import, see Importing with Subscribe, Add Server, QR code, and clipboard.
Keep a short note for each local exception: its purpose, match scope, expected policy, and how to test it. Periodically review retired hosts, duplicate lines, and exceptions hidden by earlier rules; don’t keep adding rules without cleaning them up. More rules don’t necessarily mean better coverage. A config that explains each group of conditions and is easy to roll back is easier to maintain as your needs change.
Protect personal information in saved logs
Request logs may include visited domains, paths, and query parameters; subscription links may contain access credentials. When describing an issue to someone else, share only the necessary rule type, an anonymized hostname, and the matched policy. Don’t send a full subscription link, authentication details, or an unchecked configuration file. You can use example.com in a sample, but preserve the condition relationships and rule order needed to reproduce the issue.
Getting the app and getting a proxy service are separate. The iPhone and iPad versions cost $2.99 as a one-time App Store purchase; the Mac, Windows, Android, and Linux versions are free. Buying the app once does not include a proxy service plan. Shadowrocket is closed-source commercial software; this manual explains configuration using service details you already have and does not provide proxy servers. Check the App Store listing for iPhone and iPad system requirements.
To get the app again, see the download page for the supported options. For iPhone and iPad, verify the developer is Shadow Launch Technology Limited and the app ID is 932747118. Installers for other platforms are available from this site at /dl/. See installation guidance for handling installation blocks. For rule issues, return to the relevant section of this page and troubleshoot one layer at a time; keep installation and routing problems separate.
If you’re making your first connection, follow the quick-start guide in order. To investigate a specific issue, start with the actual request and check the active file, Global Routing, matching conditions, final policy, DNS result, and connection path in turn. Address one observable problem at a time so you can connect each change to its result and keep a clear way to revert.