Official Manual · Settings Guide
Shadowrocket Settings Guide
If you’re importing an existing subscription or server details for the first time, start with Getting Started and follow the steps to import, configure routing and verify the connection. This page is a reference for settings once a connection is established. Each section explains what a setting affects, which values to leave unchanged initially, and how to verify or roll back a change.
The steps below use iPhone and iPad as examples. The app costs $2.99 as a one-time purchase on the App Store; check the App Store listing for system requirements. The Mac (Apple silicon and Intel), Windows, Android and Linux versions are free to download from this site. See Getting the App for All Platforms for download links, authenticity checks and FAQs. A one-time app purchase is not a service plan. Get subscriptions from your service provider; this site does not provide, sell or recommend proxy servers or subscriptions.
DNS: resolvers, caching and troubleshooting
First, determine whether name resolution is failing
When you visit a website, the domain name is usually resolved to an address before a connection is made. Either step can fail. A latency result for a server only shows that the path used for that test received a response; it does not prove that the domain your browser is visiting can be resolved. When troubleshooting, note the full hostname that failed and distinguish between the main site, its sign-in page and its static asset domains. Different pages on the same site often use different hostnames, so testing only the homepage does not cover the whole site. Use a normally accessible site as a reference, not one that is routinely offline or requires authentication.
If the problem occurs only on one network, first check whether it requires you to sign in through a captive portal and whether other apps can connect on that network. If only one domain fails, check for a typo and whether it is visible only on a corporate or home network. If several domains fail while latency tests still return results, check the DNS settings in the active Config. Replacing a hostname with its IP address is not an equivalent test. Many sites use the hostname to select a certificate and virtual host, so the site may still fail to load even if the address is correct.
Choose a DNS method and starting values
If you do not have a specific DNS requirement, keep the system resolver that works on your current network, unless the active configuration requires a particular resolver. If you see custom DNS settings in Config, first check whether they serve internal domains or specific rules; do not overwrite them simply because they are blank on another device. Before switching to a manually specified resolver, confirm that it is reachable on this network and can resolve the domains you need. Replacing an organization’s internal resolver with a public one will not provide internal domain records. If your work device is managed, ask the administrator to confirm the resolver’s scope.
| Method | When to keep or choose it | What to verify |
|---|---|---|
| System DNS | The current network works, and there is no need to specify a resolver. | Test separately on Wi-Fi and Cellular; the two networks may return different results. |
| Manual DNS | There is a specific requirement for internal domains or network management. | Check the address, reachability and whether the resolver handles the target domain. |
| Encrypted DNS | The active configuration explicitly uses it, and the device and network support it. | Check the configured endpoint, system time and certificate. Encryption does not determine routing. |
Before entering a custom value, confirm whether the field expects an address or an encrypted DNS endpoint. Do not mix up a full web URL and a server address. If an encrypted DNS endpoint is a hostname, consider how the device will resolve that hostname in the first place. A wrong endpoint can make other domains that previously worked fail as well. Change one set of DNS settings at a time, especially if you are also changing routing rules, so you can identify what fixed the issue. Do not replace the resolver on a managed network to bypass its existing settings.
Retest while accounting for cache and routing rules
After making a change, retry the request on the same network and with the same Global Routing mode. Note the time, then check Log for entries around that request. Browsers and apps may cache DNS results or reuse existing connections, so an old page remaining visible does not prove that the new setting is active. Close the test page, wait for the original request to finish, then reopen it to trigger a fresh request. If the log already shows the target address, investigate the connection stage rather than repeatedly changing the resolver.
If the difference appears only with address-based rules, check whether the target returns IPv4, IPv6 or both, and whether the active rule covers the address family actually in use. A domain can have multiple addresses, so two requests hitting different addresses are not necessarily a sign of a problem. If the change does not restore access to the failing domain, revert it and check the rule match separately. If the original value fails only after switching networks and works again on the original network, investigate the differences between those networks first. See Troubleshooting notes: websites fail to load, but latency tests work for an example.
On Demand: connect based on network conditions
Connection triggers are not access rules
On Demand controls the conditions under which the system attempts to establish a connection. Once connected, whether a site uses PROXY or DIRECT is still determined by the Global Routing mode and active Config. For example, connecting to a Wi-Fi network that meets an allowed trigger means only that the system can initiate a connection under that condition. It does not mean every request will use the same policy. Troubleshooting starts with two separate questions: “Was a connection established?” and “Which path did this request actually use?” Check Home for the first and request logs for the second.
If you do not need automatic connection triggers, use manual connection as your starting point. If On Demand is already enabled on the device, note the active conditions before deciding whether to change them. Do not add several network conditions and exceptions at once. Start with one frequently used condition, verify that the system connects when expected and stays in the expected state when the condition is not met, then add another. “Start by turning it off” is not a universal default: conditions may already be present after restoring settings or reusing an existing configuration.
Test Wi-Fi and Cellular separately
Before setting a Wi-Fi condition, note the name of the network you are currently connected to. If the interface lets you match by name, use the name exactly as it appears on the device, not the router model or a custom label. For testing, disconnect from other Wi-Fi networks, join the target network, wait for the system to confirm it is available, then check the connection status in Home. Networks with the same name may be different networks, so the name alone does not verify identity. Test only on networks you can identify. If the network requires sign-in, complete it before comparing trigger results.
To test a Cellular condition, make sure Wi-Fi is disconnected, mobile data is available and, on a dual-SIM device, note which line is being used for data. Brief reconnects may occur during a switch, so do not assume the rule is wrong based on the first second of a status change. If the connection still does not start, try connecting manually on the same network. If manual connection also fails, check reachability or server settings first. If manual connection works but automatic connection does not, focus on the network conditions in On Demand. When testing is complete, restore the device’s original network selection to avoid unknowingly continuing to use mobile data.
A brief log is more useful than repeatedly toggling settings. Note the status after joining the target Wi-Fi, leaving it, switching to mobile data and returning from the lock screen; mark which connections were started manually. If only one direction of a network switch fails, retest that transition on its own rather than combining both directions into one result. On devices that stay connected, distinguish an existing connection from a new one established by the system. Compare the transition time with logs for new requests.
Fix unwanted triggers, repeated connections and deactivation
If the connection comes back after you turn it off manually, first check whether the current network still meets an automatic trigger condition. To disable it temporarily, turn off the relevant On Demand condition, disconnect from Home, then make a new request to confirm the state. Avoid deleting the entire network configuration as a first step. That brings connection permissions and current settings into the investigation and removes your baseline for comparison. To restore the setup, re-add the conditions you noted earlier, one at a time.
If the connection keeps changing between two networks, keep the device on one network while testing. A brief interruption during a network switch is different from recurring failures on a stable network. For the former, recheck the trigger scope and whether the network finished connecting. For the latter, check the regular network connection, server reachability or other managed connection settings that may be taking control. If the device is managed by an organization, do not disable its policies without approval. Tell the administrator which conditions trigger the issue, when it occurs and whether manual connection works.
Ping: results, test conditions and settings
Each result applies to one specific test
Shadowrocket’s latency test helps answer this question: “Can this server entry get a response using the selected method on the current network?” First, confirm which entry is being tested in Home, then run Connectivity Test. The displayed time is not bandwidth and does not represent how fast every webpage will load. A webpage also depends on DNS, establishing an encrypted connection, the site’s response and downloading its resources. Even if the same server reports similar latency twice, a complex page may take noticeably longer to load. A failed test also has more than one possible cause; the failure may occur during name resolution, connection setup or the test target’s response.
Do not assume that Ping means one specific underlying probe. If Settings offers a choice of test methods, check which one is actually selected. Establishing a connection to a server and receiving a response from a test address over that path are different endpoints. Compare results only when the method, target and network are the same. Some targets do not respond to probes but can still serve normal app requests, so verify with a real-world use case instead of relying on a single column of numbers.
Adjust the test target and timeout separately
For an initial check, keep the current test method and target. If you already have a target you use for comparison, run it unchanged first, then decide whether to switch. If you must change the target, choose an address you are authorized to access that does not require sign-in and responds consistently without frequent redirects. Keep the target consistent when monitoring over time. Reaching a sign-in page, network authentication page or redirect does not mean the original test address was reached. Confirm the actual destination before interpreting the response time.
If the interface provides a timeout setting, keep its current value on a stable network. Consider extending the wait slightly only when real requests succeed on a slow network but tests consistently fail as soon as the timeout expires. A longer timeout changes only when the test is considered finished; it does not make the path faster, and it can make failed entries slow down batch tests. A shorter timeout can mark a temporarily slow connection as failed. If the app does not offer this setting, there is no need to change DNS or delete servers to work around the test timeout.
For a group of existing servers, use a known working entry as a reference, then retest only the entry that fails intermittently. Use the same network, test method and target, and run a few tests with pauses between them. Do not delete an entry based on a single result. Record both the number of successes and failures, not just the fastest result. If failures occur only in weak-signal areas or during heavy data transfers, retest under the same conditions once the network is stable before investigating the server side.
Choose the next step based on the test results
If every entry times out at the same time, first check the device’s network and whether the test target is also unavailable, then verify against a known working entry. If only one entry fails, compare it with the original server details from your service provider and check that the address, port and transport settings are complete. Do not overwrite an entry that still works while comparing. If switching networks restores all entries, investigate the network differences before blaming the subscription. If the subscription itself has not refreshed, follow the subscription update guide.
If the test succeeds but an app fails, note when it happened, the app or target domain and the active Global Routing mode, then check the actual request in Log. Also distinguish between “the server entry passed its test” and “that entry handled the target request.” The active policy may have selected a different entry or matched DIRECT. To verify the latter, check the log for the request itself, not the latency color of the selected entry.
Log: find the failure stage by request time
Start with a request you can compare
Log records some events during connection and request handling. When you open it, do not draw conclusions from colors or the number of errors. First, identify the specific request you are looking for. Note the current time and target domain, reduce background activity, reproduce the issue on the same network, then inspect only the entries around that time. A webpage may contact multiple domains in parallel, and background refreshes can also add requests. The first error in the log may have nothing to do with the page you are viewing; compare the time, hostname and action you just took.
If Settings offers log levels, keep the current standard level for everyday use. Temporarily increase the detail only when reproducing a specific issue, and only enough to distinguish DNS, rule matches and connection errors. There is no need to keep detailed logging enabled. An overly broad scope can bury relevant entries in background requests. If the target event still does not appear after increasing detail, that does not prove the request never happened: the app may have reused an existing connection, or the request may not have followed a loggable path.
Interpret events by stage, not by label
If a name resolution failure appears first, check the domain and current DNS conditions. If you see a rule result, check whether the resulting action is expected. DIRECT in the log indicates the action selected for that match; it does not mean a direct connection to the destination succeeded. Likewise, PROXY means the request selected a proxy policy, not that the destination returned a webpage. If the match is correct but the request still fails, continue to the connection stage instead of repeatedly moving the same rule.
Different connection failures should also be distinguished. Timing out after repeated waits and being refused immediately are different symptoms, but neither alone identifies the cause on the remote end. For a certificate error, check the device time, target domain and service associated with the certificate. Do not disable verification just to remove the warning. If the app received a response but the page asks you to sign in or reports insufficient permissions, check the target service’s session and access rights. Changing servers or DNS usually will not fix an application-level issue.
If the target domain does not appear, first confirm that the request was sent again. Exit and reopen the test page, or trigger a single action in the target app when the device is idle. Apps may use their own cache, existing long-lived connections or a literal IP address; the log may show a dependency domain rather than the page title. If you can find a comparable request on a working network but not on the failing one, compare the Home status and network connection process at the time instead of changing settings unrelated to logging.
Retest one variable at a time, then prepare information to share
To compare the effect of a fix, keep two records: one failed request with the original settings and one similar request after changing a single setting. If you change the resolver, keep the network the same. If you change the routing mode, keep the server the same. The target, network and action must match for the difference to be meaningful. When testing is complete, restore the log level and clear diagnostic records if needed, so an old failure is not mistaken for a current one.
Before sharing diagnostic details, remove subscription URLs and query parameters, account details, authentication fields, private domains, internal network addresses and unrelated historical requests. A summary such as “the domain resolved, the expected policy matched, and the connection timed out” is usually enough to identify the failure stage. If you need help from your service provider, include the relevant time range and comparisons you have already made; do not send your full configuration. Keep separate records for separate failures rather than combining an error from an hour ago with a successful request from just now.
Widget: add, refresh and check its status
Treat the Widget as a shortcut, not a copy of your configuration
The Widget on an iPhone or iPad can show brief information provided by the app or offer shortcuts supported by the system and the widget. It does not replace the connection status in Home or store a separate Config. If the widget includes an action, whether tapping it opens the app or performs the action directly depends on the widget’s capabilities. Do not infer functionality from its size; a larger widget may simply have more room to display information. For first-time use, establish and verify a connection in the app before adding the widget.
You do not need a Widget if you have no need for a shortcut. It is not required for a connection to work, and there is no universal size to use on every device. Choose one of the sizes offered by the system that clearly shows the information you need. If you only want a quick way to open the app, choose a layout that is easy to recognize and does not cover content you use often. If you use the device for screen sharing or presentations, check whether the preview reveals server names or other private labels before choosing where to place it.
Add it, then verify what it actually does
Enter edit mode on the system Home Screen, search for Shadowrocket in the available widgets, review the options and previews provided by the system, then add one where you want it. If Shadowrocket does not appear in the list, open the app normally and confirm that it runs, then check the widget list again. Do not change DNS or Proxy ports just because the widget is missing. Available widgets may vary by system, placement and device, so use the options shown on that device.
After adding the widget, note the current connection status in Home. Go to the widget, perform one of its available actions, then return to Home and check the result. If the widget only opens the app, change the connection in the app. If it actually offers a connection action, confirm the result in the app and verify it with a normal request. Do not keep tapping to see what happens; a second action may undo the first and make the result harder to interpret.
Keep the network unchanged during testing, and do not enable a new On Demand condition at the same time. An automatic trigger may coincide with the widget action. To tell them apart, first test the widget on a network known not to trigger an automatic connection, then test the network switch separately. If both the widget and automatic connection work, note when you started the action. The final status alone cannot tell you whether the widget succeeded or the system later met an automatic connection condition.
Fix delayed, blank or unresponsive widgets
The system schedules widget refreshes, so when the widget and app briefly show different states, check the status again in the app. First determine whether “old information is still showing” or “the action did not run.” For stale information, open the app and return to the Home Screen, then wait for a refresh. If the action did not run, check whether the device needs to be unlocked or the system is still waiting for confirmation on the first connection. If the app itself cannot establish a connection, follow the verification steps in Getting Started rather than repeatedly removing the widget.
If the app works but the widget stays blank, remove the widget and add it again from the system’s widget list. Check whether the issue is limited to its current placement. Removing a Home Screen widget does not remove Shadowrocket or disconnect an active connection. To stop a connection, use the app to manage the connection and automatic triggers. If you want to restore the widget to its original position, note the page and size before removing it; there is no need to export the full configuration. Check widgets on each device separately; one device’s display does not determine what another device should show.
iCloud Sync: scope, conflicts and recovery
Decide what should appear on another device
iCloud features can sync supported data between eligible devices or import content saved to the cloud earlier. Sync, manual import and purchase history are three different things. Finding the app in your purchase history does not mean the current configuration is available on another device. Opening a cloud file does not mean changes will keep syncing automatically. Before you start, decide whether you need server entries, subscription sources or the selected Config. Verify each item on the receiving device; do not assume that Settings, connection status or system permissions transfer with it.
If you use the app on only one device and do not need cross-device sync, keep your current local settings. If you do want to sync between your devices, first check the iCloud status, the app’s data access and network connectivity on each device. Make sure the receiving device has enough storage. On work accounts or managed devices, sync may also depend on organizational policies. Do not sign out of your system account to fix a sync error without understanding the impact. First check whether the problem is limited to this app or affects other iCloud content too.
Start with one device and check each step in order
Use a device that is currently working as the baseline. Note the active Config and server entries, and keep a recoverable copy if the app offers a backup or export option. Avoid renaming or editing the same item on both devices while sync is in progress. Keep the baseline device online and wait for syncing or uploading to finish, then check the content on the other device. On the receiving device, check the name and contents, confirm it is the intended copy, then select it. Do not overwrite your existing local settings just because the name looks right.
If you use Import from Cloud JSON, first confirm that you selected a JSON file you saved and that is intended for this import option. Importing a file does not set up ongoing sync. Do not rename a .conf file with a JSON extension and import it as JSON; handle rule configurations through the appropriate Config action. After importing, review the relevant entries and check for duplicates. Then select the server you need in Home and verify the connection as usual. A new device may still require you to confirm the connection in the system.
A common mistake when using multiple devices is treating “the entries synced” and “the selected state moved over” as the same thing. On the receiving device, check the selected entry, Global Routing mode and active configuration. If the devices have different uses, check automatic connection conditions on each one as well. For iPad layouts and migration scenarios, see the iPad usage guide. There is no need to sync repeatedly just to make the interface look the same.
Preserve existing data before resolving stale, duplicate or missing items
If a new device shows old content, first determine whether you are looking at a live synced list or a file saved manually earlier. Compare the iCloud status and network connection on both devices, as well as the actual changes made on the baseline device. If each device has a different version, keep both until you decide which one to use. Do not delete local entries while waiting for a cloud refresh; deletion can affect what you can recover and make the issue harder to review. If duplicates appear, check which entry is still referenced by the active configuration, then organize them using the app’s available options.
Backups and synced data may contain subscription links and server authentication details, so treat them as sensitively as the original information. Do not put files in public shared folders, chat groups or support ticket attachments, and do not use a public sharing link to “test whether sync works.” After verifying the transfer, decide whether to keep using the old device. If you plan to clear it, first confirm that the new device’s content and connection both work. If you have only one working copy left, protect it; do not start by disabling sync or clearing data.
Proxy ports: listener, protocol and access scope
Keep the three kinds of Proxy information separate
Proxy appears in different contexts in this guide. Proxy under Global Routing is a routing mode. The remote address and port in a server entry specify the service the client connects to. The local Proxy port covered in this section is an endpoint on the device that other apps or managed devices can connect to, if the setting is supported. Changing the local port does not change remote server details or automatically change how regular traffic is routed. First identify which screen you are editing, then check the device or app that uses that port.
If you only use the connection in Home and no app needs a separately specified proxy, do not enable an additional listener for this purpose. If a local connection is already working, keep the current port and note it instead of copying a number from another device. If you must change it, choose a port that is unused on the current device and accepted by the app that will connect to it. Update that app as well. This guide does not specify a universal default port; use the actual value shown on your device.
Check the access scope first, then the protocol and address
| Check | Recommended starting point | Common symptom if incorrect |
|---|---|---|
| Listener scope | For use on the same device, limit access to the local device if the interface allows it. | A device elsewhere cannot reach an endpoint listening only on the local device. This is expected. |
| Connection protocol | Use the endpoint type shown in the app, and configure the connecting app to use the matching HTTP or SOCKS5 type. | The port is reachable, but requests fail. |
| Address and port | Check the device providing the endpoint and its current port separately. Do not use the remote server’s port. | The connection goes to the wrong device or service, or cannot be established. |
Use 127.0.0.1 only when the connecting app is on the same device as Shadowrocket and the endpoint supports the local loopback address. From another device, this address points back to that device, not to the one running Shadowrocket. Expand the listener scope only if devices on a controlled local network genuinely need access and the app explicitly offers that option. Do not enable a shared listener on public Wi-Fi or expose the port to the internet through a router to access it from another network.
Even two devices connected to Wi-Fi with the same name may not be able to reach each other because of guest network isolation, system permissions or network segmentation. Check how the network is designed; do not disable isolation or other security settings just to force a connection. If the use case genuinely requires access within a managed local network, ask the network administrator to confirm the permitted method. The local network address may also change when a device switches Wi-Fi. If the connecting app still uses a saved, outdated address, the problem can look like a port failure.
Test reachability and request handling separately
Before making changes, note the endpoint type, access scope, port and apps that depend on it. After changing it, use one app to send a normal request. First confirm that it can reach the endpoint, then check whether the request completes. If the endpoint cannot be reached at all, check whether the listener is still enabled, whether the port is in use and whether the app still has the old address. If the endpoint is reachable but the request fails, check the protocol type first, then routing or the remote connection. Reachability of the endpoint does not prove that the upstream service is available.
When you no longer need a temporary endpoint, restore the connecting app’s original network settings and turn off the listener if it is no longer needed. Otherwise, the app may keep trying to reach an endpoint that no longer exists, making it look like the entire device has lost connectivity. If the change causes multiple dependent apps to fail, restore the recorded port and scope first, then retest one request. Do not change Config and DNS at the same time. If the endpoint must stay enabled, note its purpose and the apps that use it so you can assess later whether it is still needed.
Global Routing: modes, rule order and rollback
Choose a mode before interpreting request results
Global Routing offers three common modes: Config, Proxy and Direct. When requests need different handling based on their destination, use Config after verifying the connection and checking the configuration. Temporarily switch to either of the other modes for a brief comparison on the same network, then restore your usual mode. The mode shown after an installation is not a universal default. After importing a configuration or restoring a device, check which option is actually selected before diagnosing why a rule did not take effect.
| Mode | Meaning | What to check when retesting |
|---|---|---|
| Config | Selects an action for applicable requests based on the active configuration’s rules. | Check the active configuration, the rule that actually matched and the resulting action. |
| Proxy | Applicable requests use the proxy mode rather than being routed individually by the rule list. | Confirm that the current server works so you do not mistake a server problem for a rule issue. |
| Direct | Applicable requests use the direct mode. | Direct mode does not mean the connection is off. Check connection status in Home. |
For example, compare Config and Proxy for the same destination on the same network. If only Config fails, first check which action the active configuration actually matches and the policy for that destination. If both fail, consider shared causes such as DNS or remote network access. This comparison narrows down what to investigate, but one test cannot prove that a particular rule is the sole cause. Enabling On Demand does not change what the three modes mean; it only affects when the system establishes a connection.
Read a rule snippet: from specific matches to the fallback
This [Rule] excerpt from a .conf file uses example domains to illustrate syntax; it is not a complete configuration. Back up your configuration and test on a copy. In this example, DOMAIN matches a specific hostname, DOMAIN-SUFFIX matches a domain suffix, and GEOIP matches based on the destination address’s geographic classification, not the website’s country of registration or language. FINAL determines how traffic that did not match earlier rules is handled and should be placed at the end.
[Rule]
DOMAIN,help.example.com,DIRECT
DOMAIN-SUFFIX,example.com,PROXY
GEOIP,CN,DIRECT
FINAL,PROXY
Rule order is the key point in this snippet. For requests that can be matched by domain, help.example.com matches the first rule and therefore does not fall through to the suffix rule. Requests that match the suffix but not the first rule are handled by the second rule. If the suffix rule comes first, it may override the exception for a specific hostname. Put exceptions first, then broader rules. When reading a configuration, also check for earlier rules that already match the same request. A more specific new rule is not automatically moved ahead of existing rules.
When a request uses an address rather than a domain, a domain rule may not have a hostname to match. Check Log to see what was actually requested. If you use IP-CIDR or IP-CIDR6, distinguish between the corresponding address families and limit the range to the addresses you actually want to handle. A domain can resolve to multiple addresses, and results can change with the network, so do not copy an address from a single lookup into a permanent rule. GEOIP also matches by geographic classification, not by domain suffix, and cannot replace a specific domain exception.
Test exceptions and fallback rules on a copy before keeping changes
Keep the last working configuration in Config, apply changes to a copy and explicitly select that copy. Retest at least one destination that should match a specific rule and one control destination that should use the fallback. Record the action for each request; a webpage loading is not, by itself, proof that the rule is correct. If the copy includes address-based rules, verify domain-rule results first, then check address rules. If a request fails, investigate in this order: rule match, selected route, remote response.
If the change affects requests that previously worked, reselect the known working configuration, restore the recorded Global Routing mode, then make a new request to confirm rollback. Do not reset all Settings to troubleshoot a rule; that would also change DNS, automatic connections and local ports. To recheck the connection from the beginning, follow the Global Routing steps in Getting Started. If the change did not send the request along the expected path, use the Log comparison method on this page to locate the stage.