Shadowrocket
Rules and Configuration Reference
Look up fields by configuration section, choose rules based on the request target, and verify results in the matching logs.
This page is a reference for Shadowrocket configuration, intended for users who already have their own subscription or server details and want to adjust rules. For your first import, authorization, and connection, start with the Getting Started guide, then return here to learn what each setting does. The examples on this page are standalone reference snippets, not complete connection configurations containing server credentials.
01 / Configuration files
Sections and scope
First, distinguish servers, subscriptions, and configuration files
Server entries store connection destinations and authentication details. Subscribe manages existing subscriptions and the server entries they contain. Config files describe parsing, rules, and request handling. These are related, but they are not interchangeable. A successful subscription update does not tell you which rule file is currently in use; importing a rule file does not provide the server address, port, or authentication details. Before troubleshooting, check Home for an available server entry, then check Config to see which file is selected. This helps distinguish connection details from rule syntax issues.
Subscriptions and rule configurations may also update on different schedules. A subscription update generally applies to the content it contains; don't assume it also changes rules you've maintained manually. Conversely, a remote configuration update may change sections you've edited. Before making changes, keep a copy and note which content is remote and which you maintain yourself. Get subscription details from your service provider. Never include account credentials or private links in configuration screenshots or text shared publicly.
Square brackets define sections; fields are interpreted within their section
Shadowrocket configuration files organize content into sections. [General] contains general settings, [Rule] contains ordered matching entries, [Host] maps specified domains to addresses, and [URL Rewrite] describes how matching URLs are rewritten. Section names are not comments: don't translate them or paste rule entries into a section other than Rule. The examples below show the basic structure. Each section serves a different purpose, and not every configuration needs all of these fields.
[General]
dns-server = system
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
IP-CIDR,192.168.0.0/16,DIRECT
FINAL,PROXY
[Host]
printer.example.com = 192.168.1.20
[URL Rewrite]
^http://example\.com/ https://example.com/ 302
When reading the examples, distinguish section boundaries from rule order. General settings do not select a policy for each domain the way Rule entries do, and an address mapping in Host is not a DIRECT instruction. If a domain maps to a local network address, you still need to check which rule the request ultimately matches. Looking separately at the destination resolution, policy selection, and connection makes it easier to understand what is happening than simply checking whether a domain appears in the file.
Editing, saving, and selecting are separate steps
After editing in Config, save the changes and confirm that you saved the file you intend to use. If you keep both an original and a test copy, give the copy a descriptive name rather than relying on its position in the list. Then make sure Global Routing is set to Config. If it's set to Proxy or Direct, you can't validate Rule-based routing as expected. Start a new request to test; if needed, close the existing connection before reopening the target page. Saving a file does not make an established connection run through the matching process again.
For an existing configuration from a known source, make small, targeted changes rather than deleting every section and rebuilding it. Some general fields work together; removing one line may affect DNS, local network access, or connection setup. Keep fields you don't understand and check the corresponding in-app documentation. Change one verifiable condition at a time and test before continuing. If something goes wrong, restoring a copy is more useful than piling on exceptions.
02 / General settings
General, Global Routing, and DNS
Routing mode determines whether rules are used to select a policy
Check Global Routing before troubleshooting rules. Config uses the selected configuration file to choose a policy; Proxy sends requests handled by the client through the current proxy selection; Direct uses a direct connection. These are different routing modes, not three priority levels in the same rule file. If a request connects in Proxy but fails in Config, check which rule it matches instead of immediately assuming the server is down. Likewise, successful access in Direct does not prove the proxy route works.
| Interface option | What to check | Questions it can help answer |
|---|---|---|
| Config | Current configuration and first matching rule | Why a particular policy is used for a target |
| Proxy | Current proxy selection and connection settings | Whether the proxy route can complete the same request |
| Direct | Local network and target reachability | Whether the direct route can reach the target |
The phrase “requests handled by the client” sets an important boundary: system behavior outside the app, existing connections, and special configuration conditions can all affect what you observe. After switching modes, test the same target using the same type of request. Don't compare a webpage visit with a background connection from an app. For details on switching modes, see Config, Proxy, and Direct in Global Routing, then use the rule sections on this page to understand the match.
General sets shared conditions; it is not a rule-priority switch
Common fields in General use the key = value format. Check the in-app configuration editor and documentation for supported options. Don't copy fields with the same names from a different syntax system or assume similar field names mean the same thing. The minimal DNS example below uses system to rely on system-provided resolution settings; it does not specify a fixed DNS server address. Before changing DNS, determine whether the issue occurs during name resolution or connection setup.
[General]
dns-server = system
[Rule]
DOMAIN,api.example.org,DIRECT
FINAL,PROXY
DNS resolves names to addresses; policies determine how requests are handled. They work together, but they're not the same thing. A domain can match DIRECT and still fail to resolve. A domain can resolve successfully and still fail because of proxy authentication, the destination port, or a remote connection issue. When troubleshooting, first check whether the domain resolved to an address, then check the matched rule and connection error. A temporary improvement after changing DNS doesn't prove that all the existing rules are correct.
Address rules may require DNS resolution
When a request starts with a domain name but a later rule needs to check the destination IP or GEOIP, matching may require resolving the domain first. This can add latency and may cause related DNS entries to appear in the logs. If you put many address rules before domain rules, requests that could have been handled by domain alone may also trigger extra address checks. Placing specific domain exceptions first, followed by rules that need address information, usually makes the configuration easier to understand.
no-resolve in an address rule can prevent that rule from actively resolving a domain, but it does not turn off all DNS. A request that already has a destination IP can still match an address rule; a request with only a domain and no available address may continue to later rules. After enabling it, test requests made by domain and by IP separately. See the address section for syntax. Don't add this parameter to every IP rule just to reduce a log entry.
Also distinguish the actual IPv4 and IPv6 connection destinations. A domain may return multiple addresses, and the address selected by the app may differ from the first result in a manual lookup. A rule that covers IPv4 private ranges does not automatically cover every IPv6 case. If the same domain sometimes takes different routes, first check the actual destination address, DNS cache, and connection reuse. Then decide whether rules for the other address family are needed. Record these conditions to make the result reproducible.
03 / Domain matching
DOMAIN, DOMAIN-SUFFIX, and DOMAIN-KEYWORD
DOMAIN: match one exact hostname
DOMAIN matches a complete domain name, making it useful for setting a separate policy for an API, login endpoint, or service host. For example, DOMAIN,api.example.org,DIRECT applies to api.example.org. It does not also include example.org or a separate host named static.example.org. Enter only the hostname, without a scheme, port, path, or query parameters. If you need to handle a specific URL, first decide whether you want to route the entire host or use URL Rewrite as described later.
[Rule]
DOMAIN,api.example.org,DIRECT
DOMAIN,static.example.org,PROXY
FINAL,PROXY
The hostname in the browser's address bar may not cover every request made by a page. The page may load images, scripts, login services, and APIs from separate hosts. Routing the main document through DIRECT does not mean those requests will also use DIRECT. Base rule validation on the actual request domains shown in the logs. If the page loads but login or other resources fail, identify the failing host before widening the rule to a keyword that may include unrelated services.
DOMAIN-SUFFIX: cover a group of hosts by domain suffix
DOMAIN-SUFFIX matches a domain suffix. With example.com as the parameter, it typically covers example.com itself and subdomains such as www.example.com and img.example.com. This is a domain-hierarchy match, not an arbitrary substring match: notexample.com is not a subdomain of example.com. Use it when the main domain and its subdomains should share a policy, with a few specific hosts handled separately by earlier DOMAIN rules.
[Rule]
DOMAIN,local.example.com,DIRECT
DOMAIN-SUFFIX,example.com,PROXY
FINAL,DIRECT
In this snippet, local.example.com matches the exact entry first; the suffix entry handles the remaining hosts under example.com. If you reverse the two lines, the exact entry doesn't get priority simply because its name is more specific. Also, a service's content delivery domains may not be under its own main domain. Adding one suffix can't guarantee that every resource uses the same policy. Use actual request data to add rules instead of guessing domains from a brand name.
DOMAIN-KEYWORD: convenient, but harder to constrain
DOMAIN-KEYWORD checks whether a domain contains a specified keyword. It's useful when the same feature needs to be handled across multiple namespaces. Its scope is broader than a suffix match: the parameter example may match example.com and other domains containing that string. Avoid short, common, or ambiguous terms for broad routing rules. If you know the exact host or main domain, use DOMAIN or DOMAIN-SUFFIX instead. Their coverage is easier to explain and maintain.
| Type | Example parameter | What it covers |
|---|---|---|
| DOMAIN | api.example.org | Exact hostname |
| DOMAIN-SUFFIX | example.org | Main domain and its subdomains |
| DOMAIN-KEYWORD | example | Domains containing a keyword |
Domain rules depend on the client having the target name available when matching. If the app connects directly to an IP, or the request log contains an address but no usable domain, adding more domain entries may not help. Check what information is available in the logs before choosing a domain or address rule. Don't assume every underlying connection includes a full domain name just because the user says they're visiting a particular website.
When maintaining domain rules, watch for redirects and caching. A URL may first redirect to another host, and a browser may reuse an existing connection. After making a change, reopen the target and check the new requests; if needed, close old connections when it's safe to do so and test again. For internationalized domain names, check the name as recorded by the client. Don't confuse the displayed name, its encoded form, and a URL path as if they were the same matching parameter.
04 / Addresses and request attributes
IP-CIDR, GEOIP, USER-AGENT, and FINAL
IP-CIDR and IP-CIDR6: match destination address ranges
IP-CIDR uses an address and prefix length to specify an IPv4 network range. 192.168.0.0/16 covers the corresponding private address range, while 192.168.1.20/32 represents a single IPv4 address. A longer prefix means a smaller range, but “more specific” here describes the address set, not rule order. IP-CIDR6 is for IPv6; for example, fd00::/8 represents the corresponding local address range. An incorrect prefix can extend an exception far beyond its intended scope.
[Rule]
IP-CIDR,192.168.1.20/32,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,fd00::/8,DIRECT,no-resolve
FINAL,PROXY
These snippets show only a few address ranges; they are not a complete list of local network rules. DIRECT means the request is sent without a proxy server. It does not guarantee that the destination device is online, a route exists, or access is permitted. If a printer or local service is still unreachable, check whether its address has changed, whether the current network allows device-to-device communication, and whether the required system permissions are available. A matching rule alone doesn't mean every subsequent error is caused by the app.
no-resolve is an optional matching modifier that prevents actively resolving a domain just to evaluate that address rule. A request that already has a destination address may still match. A request with only a domain and no applicable address information may continue to later entries. If you access a local service by domain, a private address rule with this parameter may not be enough. You can handle known hosts explicitly with DOMAIN, then keep the address range rule if needed.
GEOIP: classify by location using an IP database
GEOIP,CN,DIRECT means use DIRECT when the target address is classified as CN by the database in use. It does not match a domain suffix or identify a webpage's language, account region, or service owner. A Chinese-language page may use infrastructure in another region, and the same domain may resolve to different addresses under different conditions. GEOIP is better suited to broad address classification than to replacing domain exceptions for specific services.
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
GEOIP,CN,DIRECT
FINAL,PROXY
An address database's location classification and the reachability of the actual route are separate questions. Matching a region doesn't guarantee a fast direct connection or a successful one; the target address may also vary across networks. When troubleshooting, record the actual destination IP, matched entry, and error type. If a known service needs a fixed policy, add a domain rule that clearly describes its scope instead of replacing all GEOIP rules because of one unexpected result.
USER-AGENT: useful only when the request attribute is visible
USER-AGENT matches an available User-Agent attribute. For example, USER-AGENT,ExampleApp*,DIRECT uses an asterisk as a wildcard. This does not identify traffic by app name or process, and you can't assume that every encrypted connection exposes this request header. In ordinary HTTPS connections, the header is inside encrypted content and may not be available to the client. Use this rule only as a supplement when the required attribute is available; it cannot guarantee consistent routing for every request from an app.
FINAL: handle requests with no earlier match
FINAL takes no domain or address parameter. Its format is FINAL,PROXY or FINAL,DIRECT. Put it at the end of the matching list to specify how to handle requests that match none of the preceding conditions. If it appears in the middle, later ordinary rules usually won't get a chance to match. Choose a fallback based on your configuration: PROXY requires a working proxy, while DIRECT relies on direct access through the local network. Neither guarantees a successful connection.
When combining these rules, start by asking what reliable information is available for the request. If the domain is known, express the intended behavior with domain rules. Use CIDR only for address ranges, place broader location classification later, and use FINAL to handle anything left over. For rules such as USER-AGENT that depend on visible request attributes, plan what happens when that information isn't available. A good configuration explains both what happens on a match and where unmatched requests go.
05 / Policy outcomes
PROXY, DIRECT, REJECT, and Proxy Group
A policy specifies how to handle a request; it doesn't guarantee reachability
The last major field in a rule usually specifies the handling policy. PROXY uses a proxy route, DIRECT sends the request directly, and REJECT denies the matching request. These names describe how the client handles a request, not whether the destination is available. A PROXY entry in the logs confirms that the request took that route, but it may still fail due to server authentication, a remote connection issue, or the destination service. DIRECT doesn't bypass all system network conditions; local network and destination status still matter.
| Policy | What it does | What to check next |
|---|---|---|
PROXY | Use the current proxy route | The server actually selected and its connection settings |
DIRECT | Send without a proxy server | Local network, DNS resolution, and destination reachability |
REJECT | Reject matching requests | Whether the rejected scope includes necessary dependencies |
Understanding this distinction helps you avoid changing the wrong part of a rule. For example, if the target correctly matches DOMAIN and uses PROXY but shows an authentication error, check the existing server details before changing DOMAIN to DOMAIN-SUFFIX. If the logs show that an earlier DIRECT rule took over, adjust the rule scope or order—even if the proxy itself works. First confirm that the policy selection is correct, then check whether the connection succeeds under that policy.
PROXY and custom groups
PROXY is a built-in policy term, not a server name you have to create manually. In a configuration that uses a custom Proxy Group, rules can also reference a defined group so different targets use different sets of choices. Before referencing a group, confirm that it exists and that the current configuration recognizes its members. Keep spelling, spaces, and names consistent with the group definition. Adding a new name at the end of a rule does not create a working group with servers in it.
[Rule]
DOMAIN,api.example.org,DIRECT
DOMAIN-SUFFIX,example.com,PROXY
DOMAIN,blocked.example.org,REJECT
FINAL,PROXY
The example above uses only built-in policies to avoid relying on an undefined group. If your configuration uses custom groups, check one additional layer when troubleshooting: first confirm which group the request enters, then confirm which member the group ultimately selects. A valid group name with unavailable members is a different issue from a rule that doesn't match. Groups that select automatically may choose different members as network conditions change, so record the server actually used when comparing tests, not just the group name shown.
Use DIRECT and REJECT only for the intended target scope
DIRECT is commonly used for requests that clearly need a local network route, such as access to a known local host. Don't use a broad direct rule just because a service seems local; check its actual domains and dependencies. REJECT is for requests that should be explicitly stopped, but a rule that's too broad may affect login, resource loading, or other essential functions. Restrict rejection to hosts you can identify and verify the result in the logs. This is usually more predictable than relying on an ambiguous keyword.
An app's behavior after a request is rejected can vary. A page may show an error immediately, an app may keep retrying, or the interface may appear to wait indefinitely. None of these necessarily indicate a proxy server problem. If a new REJECT rule causes an issue, restore the previous rule and retry the same action. Compare the related requests before deciding whether to narrow the scope. Don't add a DIRECT rule for the same target after a REJECT rule and expect it to override the earlier entry; with the same order, it won't get a chance to match.
App purchases and connection services are managed separately
Shadowrocket is a paid client for Apple platforms. A one-time purchase of the app does not include a connection service. Adding PROXY to a rule won't create a server or provide subscription details. Get existing subscription information from your service provider, who also manages authentication and expiration. To verify where to get the app, see the App Store authenticity check. Confirm the app purchase and connection details separately; a successful App Store purchase does not mean your connection is configured.
Keep group and policy configuration simple and easy to explain. First verify the route with built-in policies, then introduce groups. Test an individual member before evaluating automatic selection. This gives you a way to isolate problems one layer at a time instead of troubleshooting rules, group names, members, and connection settings all at once. If you haven't completed your first connection, follow the main steps in Getting Started rather than building a complex policy structure upfront.
06 / Rule priority
Rules are checked top to bottom; the first match wins
There is no automatic “more specific rules first” behavior
Rule entries are checked in the order they appear in the file. When a target matches an entry, that entry's policy applies, and later ordinary entries are not checked to select a different policy. DOMAIN does not automatically take precedence over DOMAIN-SUFFIX, a single-address rule does not automatically take precedence over a larger network range, and REJECT doesn't get priority just because of its meaning. Priority starts with position in the configuration. This explains many cases where a rule appears to have no effect: an earlier entry matched first.
[Rule]
DOMAIN,api.example.com,DIRECT
DOMAIN-SUFFIX,example.com,PROXY
GEOIP,CN,DIRECT
FINAL,PROXY
For api.example.com, the first line specifies DIRECT. For www.example.com, the first line doesn't match, so the second line specifies PROXY. Other domains continue to GEOIP and finally fall through to FINAL. This is a decision chain with a clear stopping point, not a scoring system for every matching rule. Even if www.example.com resolves to an address that matches the later GEOIP rule, it still uses the earlier suffix rule's policy.
Use a counterexample to explain rule order conflicts
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
DOMAIN,api.example.com,DIRECT
FINAL,PROXY
In this counterexample, the suffix rule matches api.example.com first, so the exact rule below it can't create the intended exception. Move the exact exception above the broader rule instead of copying it to the end of the file. When multiple entries have the same condition, the first one usually determines the result. Duplicate entries make a configuration harder to read and may lead someone to assume a later change overrides an earlier setting. When reviewing rules, check for duplicates and overlapping scopes.
Put local exceptions first, then service-wide rules, then broad classifications
One maintainable approach is to put explicit allow or reject exceptions first, followed by service domain rules, then address and location rules, and finally FINAL. The app doesn't require this exact template; it simply makes the intent easier to follow. You can use a different order when your needs call for it, but be ready to explain why each rule must come before the one above it. Don't alphabetize the entire Rule section just to make it look tidy; that could change the existing match order.
Exceptions may overlap too. If you want a main domain to use PROXY, one API host to use DIRECT, and another specific host to use REJECT, put both exact-host entries before the main domain suffix rule. If you also add a DOMAIN-KEYWORD that includes the same string, confirm that it won't take over those exceptions first. When reviewing a rule, don't just ask whether it works on its own. Check which broader conditions above it may match first, and which rules below it may no longer be reached.
Review the actual rule list after configuration updates
A remote configuration update may reorder entries, remove local changes, or add new broad rules. A successful update only confirms that the content was retrieved; it doesn't mean your custom rules were preserved. After updating, check key exceptions, FINAL at the end, and custom group references, then test common targets. If you need to maintain personal exceptions over time, use a configuration approach you can manage consistently and keep notes on your changes. Don't rely on memory to find every difference after each update.
To troubleshoot rule order, first write down the expected decision process for a request: its target name, whether an address is available, the earliest entry it might match, and the expected policy. Compare each step with the logs. If the result differs, first confirm that the correct file is selected, Global Routing is set to Config, and the log shows a new connection. Only after those basics are verified is it useful to examine the exact matching behavior of a keyword.
Balance performance with readability. Placing exact domain rules before address checks that require resolution can often avoid unnecessary lookup dependencies, but don't combine clearly defined targets into a broad keyword just to reduce the number of lines. Prioritize behavior you can explain and reproduce, then remove genuinely redundant entries. A shorter file with unclear boundaries isn't necessarily easier to maintain than a longer file with clearly defined responsibilities.
07 / Resolution and rewriting
What Host and URL Rewrite do—and don't do
Host maps names to addresses; it doesn't select a policy
Host explicitly maps a domain to an address, such as pointing printer.example.com to a device on the current network. It answers “Which address does this name use?” rather than “Which route should this request take?” You may need both Host and Rule: the former sets the destination address, while the latter determines how the request is handled. If you add a mapping but the request still uses a proxy route that can't reach the local address, it may still fail.
[Host]
printer.example.com = 192.168.1.20
[Rule]
DOMAIN,printer.example.com,DIRECT
FINAL,PROXY
This snippet clearly expresses two separate intentions: map the name to a specified device and use DIRECT for requests to that name. Before using it, confirm the device address is stable, the service port is correct, and the local network allows access. On another network, the same private address may point to a different device or not exist at all. Don't treat a local network mapping as a universal configuration. When changing devices or environments, review both the mapping and the rule.
A fixed mapping also overrides the dynamic DNS result the service might otherwise use. Public services may change their addresses or regions through DNS, so a hard-coded address can stop working over time. HTTPS still validates certificates against the requested hostname; specifying an address doesn't make a certificate valid for a different name. If you see a certificate error, adding more Host entries isn't a general fix. First confirm that the destination and hostname actually correspond.
URL Rewrite matches URLs; it does not route domains
URL Rewrite processes URLs that match an expression and can be used for an explicit redirect. Its syntax differs from Rule's comma-separated format and generally consists of a matching expression, a replacement target, and a handling method. The example below redirects an HTTP URL for a specific host to HTTPS with a 302 status code. It's a controlled example, not a pattern to apply to every website: the target may not offer the same HTTPS path or service.
[URL Rewrite]
^http://example\.com/ https://example.com/ 302
The ^ at the start of the expression anchors the match to the beginning of the URL. The dot in a domain is written as \. to match a literal period rather than any character in a regular expression. The slash after the domain also helps define the host boundary. Without the necessary constraints, an expression intended for example.com may match other strings by mistake. When writing one, test both URLs that should match and URLs that should not.
Use explicit capture groups to preserve the path
[URL Rewrite]
^http://example\.com/(.*)$ https://example.com/$1 302
This example uses a capture group to save the content after the slash, then inserts it into the replacement target with $1. This preserves the remaining path and matching query string. It's an alternative to the fixed-target example above; don't keep both without checking whether you need them. Take particular care with URLs containing login state, signatures, or sensitive query parameters. Rewriting may invalidate server-side checks or change the request's meaning. Test with a target you can verify before deciding how broadly to apply it.
Also check for redirect loops. If a URL redirects to a new address and another rule sends it back, the redirects may repeat. Avoid loops by restricting the match to the old scheme or path so that the replacement no longer meets the same condition. During testing, check each actual redirect target instead of looking only at whether the final page opens. Cached redirects may also affect results, so use a new request when needed.
Encryption determines whether URL rewriting can happen
The full URL path in a standard HTTPS connection is inside encrypted content. Seeing the domain doesn't mean the client can match any path within that URL. Features that inspect HTTPS content have additional requirements and trust implications; adding a URL Rewrite entry alone won't make them work. This page does not recommend changing system trust settings as a routine routing step. If you only need a host to use PROXY or DIRECT, use a domain rule in Rule instead of content rewriting.
Keep only entries with a clear purpose when maintaining these sections. Outdated temporary mappings, overly broad rewrite expressions, and obsolete redirects all make troubleshooting harder. Save a copy before removing anything, then retest affected targets. If a page won't open, start with evidence from the request, resolution, and policy. Avoid adding Host and rewrite rules at the same time; that makes the problem harder to isolate.
08 / Validation and maintenance
Use Logs to troubleshoot and a backup copy to restore configuration
Start with observations you can reproduce
Before testing, note the current network, Global Routing mode, selected configuration file, and proxy selection. Then choose one target and one action, such as opening a specific page or requesting an API, rather than saying the entire app doesn't work. Connectivity Test can help assess connection conditions, but a successful test doesn't replace a real request to the service. A proxy connection being established, a domain resolving, and a target API responding are three separate results to verify.
Keep other conditions the same during testing. Don't switch networks, change servers, and modify DNS and rules all at once. Even if things improve, you won't know which change made the difference. After saving a rule, start a new request and account for connection reuse and caching. If needed, re-establish the connection when it's safe to do so. For issues that occur only on certain networks, record the results for each one instead of letting a single success override an earlier failure.
Read the logs in three stages: request, match, connection
The exact fields shown in Logs depend on the app. Start by finding the request target and confirming that it's the host you tested. Then check the policy and any visible rule details, followed by connection errors or the response. If a log shows only an IP address, don't assume domain rules are failing; check whether the request provided a usable hostname. If the request clearly matched REJECT, review the rejected rule's scope before changing server ports.
| What you observe | Check first | Avoid changing these at the same time |
|---|---|---|
| No corresponding new request | Test action, existing connection, client handling scope | The entire rule list |
| Unexpected policy matched | Global Routing, selected file, rules above the match | Server authentication details |
| Correct policy, but connection fails | Resolution, authentication, destination address, and reachability | A match scope you've already verified |
| Behavior changed after an update | Configuration changes, group references, fallback rule | All network settings |
For a resolution failure, check whether the request obtained an address and review related settings in General and Host. For a connection timeout, determine whether the proxy route failed to connect or the destination service didn't respond. For an authentication failure, check that the existing server details are complete. Different errors don't have one universal fix. If a single log entry isn't enough, correlate nearby resolution and connection entries by time, but don't assume every background request at that moment belongs to your test.
Reduce the configuration to a minimum, then restore entries one at a time
You can isolate issues in a complex configuration by testing a reduced copy, but keep the existing details required to establish a connection. First remove temporary rewrites and mappings unrelated to the target, then use one exact domain rule and FINAL to make the outcome clear. If the minimal copy works as expected, restore the original entries in batches and test the same target after each batch. This helps identify which set of conditions changed the result instead of adding more patches to the full file.
[Rule]
DOMAIN,api.example.org,DIRECT
FINAL,PROXY
This snippet is only for testing rule selection; don't use it to overwrite your full configuration without a backup. The expected result is DIRECT for api.example.org and PROXY for other unmatched requests. If the result still differs, first check that the copy is selected, Global Routing is set to Config, and the log corresponds to a new request. If the result is correct but the target still fails, investigate the connection route instead of expanding the rule keywords.
Keep change notes and protect private information
For each change, keep a short note of the target, affected entries, expected result, actual result, and how to restore the previous configuration. Before exporting, check for server addresses, authentication details, private subscription links, or sensitive Host mappings. Share only a redacted minimum example when discussing an issue. Logs may also include destinations and query details, so retain only what's needed to explain the problem. For common import and connection issues, see the FAQ. For your first setup, return to Getting Started.
Before switching devices, check separately how to restore the app, server details, and configuration files. Getting the app again from the App Store doesn't necessarily restore all personal configuration. Check the App Store listing for system requirements and purchase availability. See configuration backup and device migration for guidance. After restoring, verify the file and credentials, then test key rules again. A matching filename doesn't guarantee matching contents.
Maintenance is complete not when you've stopped making changes, but when key targets match as expected, unmatched requests have a clear fallback, every exception has a clear purpose, and you can restore a working copy if something goes wrong. Verify rule selection separately from connection results, and keep remote content separate from personal changes. This gives you a consistent troubleshooting approach when network conditions change or configuration updates arrive.