Official Manual · Settings Reference
Shadowrocket Settings Guide
First find out what controls each setting. Then learn what each option does, when to change it and how to restore it.
Haven’t finished importing your configuration or making your first connection? Follow the Getting Started guide to complete the setup. If you can already connect or are checking DNS, automatic connections, logs or sync behavior, jump to the relevant section below. This guide assumes you already have your own subscription or server details.
The interface paths in this guide refer to iPhone and iPad; menus and available options on other platforms depend on the client you’re using. Get Shadowrocket for iPhone and iPad from the App Store product page for a one-time payment of $2.99; check the App Store listing for system requirements. The Mac (Apple Silicon and Intel), Windows, Android and Linux versions are free; download installers only from this site’s /dl/ directory. See the Download & Install guide for links. Buying the client once does not include a network service. This site does not provide, sell or recommend subscriptions or servers.
01 / Routing Basics
Initial State & Global Routing
Three different meanings of “default”
Initial settings can differ after a fresh install, device migration or configuration import. System-granted permissions, client settings restored from an account and values specified in the active configuration come from different sources. A blank field doesn’t always mean the option is off: some fields inherit system behavior, while others depend on whether the configuration already defines a related parameter. If you can’t confirm the original value, record the current one as your rollback point. Don’t copy a value from another device and assume it’s the factory default.
Before making changes, note four things: the connection status on Home, the current Global Routing option, the selected server and the file currently in use under Config. Don’t infer which file is active from its position in the list, or assume a subscription update switches the active configuration. When troubleshooting, choose a target you can reliably test. Change one variable at a time, using the same network and test steps. Before editing a file, save a separate copy that you can enable independently.
Choosing among the three routing modes
| Option | Traffic routing | When to use it |
|---|---|---|
| Config | Routes traffic according to the rules in the current configuration. | Check whether a specific domain and other traffic are handled separately. |
| Proxy | Routes traffic handled by the client through the current proxy path. | Temporarily check whether the server path is available. |
| Direct | Routes traffic handled by the client directly. | Temporarily check whether the local network can reach the target. |
If you have a tested configuration with routing rules, Config is the recommended everyday choice. If a site opens under Proxy but not Config, check which rule matched and where it routes before switching servers. If the same site also fails under Direct, check whether it requires a proxy or whether you still need to sign in to the current network. Direct changes the routing mode; it doesn’t turn off the connection on Home. To compare with traffic that isn’t handled by the client, test once more with the connection turned off.
Use a minimal rule set to check matching order
[Rule]
DOMAIN-SUFFIX,example.com,PROXY
GEOIP,CN,DIRECT
FINAL,PROXY
This snippet belongs in the [Rule] section of a .conf file. It isn’t a complete configuration and won’t establish a server connection. It first sends example.com and its subdomains to PROXY, then applies GEOIP based on whether the destination address belongs to the relevant region, and finally sends traffic not matched earlier to FINAL. In this example, removing the first rule doesn’t make the domain go DIRECT; it may still match FINAL. To test a rule, choose a target that would route differently under each matching branch. Otherwise, you can’t tell which rule took effect.
Use DOMAIN for an exact hostname match and DOMAIN-SUFFIX for a domain and its subdomains. DOMAIN-KEYWORD matches if the name contains the specified text; a short keyword can match unrelated sites. IP-CIDR checks whether the destination address falls within a network range; it doesn’t look for a sequence of digits in a URL. Some address-based rules need the destination address first, so an apparent rule failure may actually happen during resolution. If a request already matches an earlier rule, rearranging later entries usually won’t change its outcome.
After enabling the rule file, test at least three requests: one that should match a specific rule, one that should take a different branch and one that should be handled by FINAL. The first two verify the intended matches; the third checks whether the fallback is right. Testing only one page can miss static assets or sign-in requests served from different domains. A page loading its main content doesn’t mean every resource took the expected route.
To reverse the approach and proxy only selected sites, see Rules for proxying only specific websites. Before saving, note the old filename and what you changed. After testing, restore Global Routing to its previous mode. If the problem persists after switching back to the old file, check whether the server or network has also changed rather than continuing to edit the same rule section.
02 / Domain Resolution
DNS sources, responses and fallbacks
Identify what resolves each request
When you visit a domain, its name must be resolved to an address. When Shadowrocket handles traffic, the component that performs resolution may depend on the active configuration, system network and proxy route. You can’t tell which DNS server the client used just from selecting Direct or Proxy in Global Routing, or infer who resolved a particular request from the address shown in network settings. Check the behavior using the domain that’s failing, and limit your conclusion to that specific path.
When checking DNS-related items in Settings, also check whether the active file under Config includes resolution parameters. If you see a custom address, record its value and order. If the field is blank or set to automatic, leave it as is rather than adding a value and calling that a reset. If you don’t have a specific DNS requirement, start with the current working settings. Change DNS only for internal domains, a specific network requirement or a reproducible resolution problem, and make sure you can restore the previous settings.
Break the failure into three stages
Stage one: no address is returned, often shown as a name resolution error or a resolution timeout. Stage two: an address is returned, but access fails; check whether the address works on the current network and whether the connection can reach it. Stage three: a connection is established, but the page doesn’t respond as expected; check the secure handshake or application response. Opening a bare IP address in a browser isn’t an equivalent domain test: the certificate and site selection may depend on the domain, introducing a different kind of error.
| Symptom | Check first | Don’t change yet |
|---|---|---|
| Multiple domains fail | Check whether the current network is connected and whether resolution is timing out repeatedly. | Don’t reorder the entire rule set yet. |
| Fails only on the local network | Check whether you’re connected to a network that can resolve the name. | Don’t switch to a public DNS resolver yet. |
| Destination address is available | Check the subsequent connection, address family and proxy route. | Don’t assume DNS caused the failure yet. |
A domain can return both IPv4 and IPv6 addresses. The device may not be able to reach both address types equally, so a connection can keep timing out on one even after resolution succeeds. If your records identify the address family, compare the actual destination when the failure occurs. If you see only one address, don’t assume the other wasn’t returned. Disabling an entire address family as a first step changes many otherwise normal requests and can hide the fact that the problem affects only one network or route.
Check internal domains, encrypted DNS and caching
Names on a company or home network may be resolvable only by a designated DNS service. If you switch to public DNS, working public domains don’t prove the change is right; also retest internal services that used to work. Conversely, an internal name that won’t resolve when you’re off its network doesn’t mean the device’s DNS settings are broken. First distinguish “this name shouldn’t resolve here” from “it should resolve, but no answer was returned.” Don’t copy internal domains or addresses into public records.
If the current configuration uses encrypted DNS, test the connection to the resolver and the answers it returns separately. Encryption protects queries in transit to the resolver; it doesn’t make every returned address reachable or replace routing rules. If the resolver is specified by domain, check whether that name can be resolved first. Keep this additional dependency only if the current network supports it and you need it. If a test fails, restore the settings that just worked.
After a change, an immediate retry may still use a cached result or an existing connection from the app. Close the test page and start a new request; if needed, reconnect the client, test the same domain again and note whether the network changed. If you can’t confirm the system cache was cleared, mark the result for retesting rather than claiming all domains have switched based on one success or failure. You can also test a similar domain you haven’t opened before to avoid relying on an old session.
03 / Automatic Connections
On Demand triggers and pauses
Keep connection triggers separate from traffic routing
On Demand determines whether the system tries to establish a connection when its conditions are met. Global Routing determines where traffic goes once the connection handles it. Check the two settings separately: connecting automatically but failing to access a site doesn’t mean the On Demand conditions are wrong, and a page loading once doesn’t mean the device will connect on demand after a network change. First check whether the system initiated a connection, then check whether the client used the expected server and rules.
When getting started, leave manual connection enabled until you’ve confirmed system connection permissions are in place, your current server works and you can reliably connect and disconnect. Then consider enabling On Demand. This is a recommended baseline, not a factory default for every device. If settings were migrated, check whether On Demand is currently enabled in Settings. Before troubleshooting manually, record the current conditions and toggle state so you can restore your usual behavior afterward.
Start with one reproducible condition
First define the result you want—for example, have the system initiate a connection when you leave a familiar network, but stay manual on a specific network. Configure only conditions that are actually available in your current interface; don’t assume another device’s options are available on yours. Start by enabling just one condition you can trigger on demand. Avoid combining multiple network types and exceptions at first, or you may not know which one caused the connection. If your device frequently switches or shares networks, remember that networks with the same name may not be the same environment.
To test, disconnect on the current network, switch to the target network, wait until it can actually access the internet, then make a new request and check the status on Home. The status bar can help, but record connection state and access results separately. Then switch back to a network that shouldn’t trigger a connection and repeat the test with a new request. Don’t conclude that an exception failed because an existing connection stayed active after switching networks; start from a known disconnected state.
Campus, hotel and guest networks may require you to sign in on a system page first. If On Demand keeps trying to connect before the network allows access, temporarily disable On Demand, disconnect and complete the network sign-in, then test the connection manually. If manual connection also fails, check network access or whether your own server is reachable. Don’t change DNS and trigger conditions at the same time; otherwise, you won’t know which change mattered once sign-in works.
Troubleshoot immediate reconnections after disconnecting
If the connection quickly comes back after you turn it off manually on Home, first check whether On Demand is still enabled and whether a new request met its conditions after the disconnect. Manually disconnecting ends the current connection; it doesn’t necessarily pause future system triggers. To stay disconnected briefly, disable On Demand first, disconnect, then make a new request on the same network to check that the status remains unchanged. Restore your original settings when you’re done.
If a connection doesn’t start when expected, first check whether its conditions match the network you’re currently using. Don’t draw a conclusion from a single status change while the screen is locked, the network is switching or the system hasn’t finished connecting. Use a clear new request as your starting point and note whether no connection was initiated or one was initiated but failed. If none was initiated, check the conditions and system permissions. If it was initiated, investigate the current server and the connection failure stage.
For everyday use, keep only the triggers you need. If your device connects to different managed networks, follow their usage requirements. Where either manual or automatic connection would work, choose whichever is easier to explain and retest. If automatic connection fails in just one place, keep other tested conditions and record that place as a possible exception instead of changing the whole setup. That way, you can compare the same network and behavior if the issue comes back.
04 / Connectivity Tests
Ping & Connectivity Test
Results apply only to the test method used
Ping is an entry point for test results or related settings; don’t assume every result measures a network-layer echo just from its name. Depending on the test method, the result may reflect the time needed to establish a connection, reach a test target or receive a response. Whether DNS resolution, the handshake and remote processing are included depends on the method. Before comparing results, record the method and target. If the interface doesn’t show a detail, don’t break the result down into unsupported timing estimates.
If you don’t have a reproducible problem, keep the current test method and target. Change editable options only if the target is unreachable on your network, its response is unstable or you need to test a specific real-world path. Choose a target you’re authorized to access and can retest reliably. Don’t enter a business address that requires a sign-in or a link containing access credentials. A consistent test setup is more useful than switching targets until the result looks good.
Compare latency and timeouts under the same conditions
On Home, note the current server and Global Routing mode. Stay on the same network and run Connectivity Test several times. A single high result may be caused by temporary queuing, retries or a recent network connection. Repeatedly low results with occasional timeouts still aren’t stable. Record the number of successes, whether timeouts are consecutive and whether they coincide with a network change. To compare two existing servers, change only the server, keep the method and target the same, and repeat the same set of tests.
If the interface offers a timeout setting, start with its current value. It controls how long the test waits before stopping; it doesn’t speed up the connection. Too short a timeout marks requests that would eventually complete as failures. Too long a timeout delays detection and lets network conditions change during the comparison. Adjust it only when you see consistent false results, then retest both a path known to work and the path that was failing.
When a test fails, first identify where it failed. If all your existing servers fail at the same time, check the local network, test target and resolution first. If only one server repeatedly fails, check its address and whether your existing configuration is still valid. If the test succeeds but a real page won’t open, compare the rules, address and connection used by that domain. A successful test confirms only that the test request completed. Don’t replace other servers or change the whole configuration based on one passing test.
Use real tasks to check throughput and stability
Low latency means one test returned a quick response. It doesn’t mean large transfers will be faster or that a longer connection won’t drop. If a page loads slowly, first determine whether the initial response or resource downloads are slow. If the connection drops mid-session, observe it over time on the same network instead of relying on a single Ping result. Keep the device, target and observation period consistent when retesting, and avoid large background transfers during the test.
After setting a default server, follow the steps in First Connection & Connectivity Test: check that the expected server is selected on Home, confirm the connection is on, then run the test. If real requests and test results differ, note the target each one used. If you can’t confirm they took the same route, don’t use one result to invalidate the other. For speed issues, use a layered check of your local network, protocol, route and server to gather comparable results.
After resolving the issue, restore the original test target and timeout unless the new settings have become your standard for routine checks. Record conclusions as testable statements, such as “After switching networks, this target no longer times out repeatedly.” Don’t infer that a server will always be faster from a limited sample. Keep test notes without access credentials so you can check whether the same failure has returned.
05 / Request Logs
Reading, sampling and organizing logs
Use a short observation window to find the first anomaly
Log helps you inspect the connection process; Data traffic figures are useful for checking usage over the recorded period. They aren’t interchangeable: a change in usage may come from another app transferring data, and a connection entry doesn’t mean every page resource loaded. When troubleshooting, minimize unrelated requests, note which action starts the test, then inspect entries around that time. Don’t mistake a large number of subsequent retries for separate failures.
Before you start, check the current log settings in Settings. If the interface offers more detailed logging, enable it only for the period needed to reproduce the issue. For everyday use, keep the current level; don’t leave detailed logging on when you’re not diagnosing a problem. Don’t assume a fixed log level is the default after importing another configuration. Before changing anything, record the old value and the time of the change so you can restore it after testing. If you see similar logs on multiple devices, note which device you tested.
Read logs in sequence; don’t guess from word frequency
- Keep the network, configuration file and server fixed, and note when the issue occurs.
- In the test app, repeat just one action, such as reopening a specific page.
- Return to the log, find the relevant target and check the earliest failure or unexpected route first.
- Change one relevant setting, then run a new comparison starting with a fresh request.
If the log shows that a destination was selected but the connection timed out, check its route and server path first. If the name wasn’t resolved, don’t start by rewriting routing rules. If the failure occurred after the connection was established, check the response or handshake. Some logs show only what the client can observe; a missing entry doesn’t mean that stage never happened. The same timeout message can also occur at different stages, so read it in context with the steps that already completed.
A single visit usually involves more than one domain. If a page loads slowly, first note what you actually see—for example, the main content works but the sign-in area is blank—and distinguish the main request from subsequent resource requests. If only a secondary domain matched a different policy, the current server may still be working normally. Check the rules in Config and the FINAL route before blaming the entire page on a single destination. For pages with dynamic content, follow the same steps to reproduce the issue and avoid refreshing other tabs.
Before comparing traffic totals, confirm the time range and what you’re observing. A short recording can show changes around a single action, but it may include app background traffic, retries and connection overhead. The client’s counting boundaries may differ from those used by the system or network; different figures don’t mean extra charges or lost data. Record the start and end times and connection status. That’s more informative than copying down a total by itself.
Prepare a useful diagnostic record without exposing credentials
When sharing details to investigate a problem, keep only what’s necessary: approximate time, network type, control states, expected and actual routes, and the failure stage. Remove complete subscription links, access credentials, personal domains, account identifiers, internal addresses and unrelated requests. Check neighboring lines and the edges of screenshots, not just the current line. To preserve comparisons, replace sensitive fields with labels such as “same domain” or “same server,” and use the same label in both records.
If you can’t reproduce the issue, there’s no need to keep increasing log detail. First note the conditions most likely to trigger it—for example, switching from Wi-Fi to cellular and refreshing immediately—then capture logs the next time it happens. Restore the original logging level after testing. Before clearing history, make sure you’ve recorded the results you need to compare. For connection permissions, subscription imports and common issues, browse the Troubleshooting questions by symptom.
06 / System Access
Widget status, actions and refreshes
Establish a working baseline on Home first
A widget is an entry point in the system interface. The information it displays and actions it can perform depend on the components provided by the client and supported by the system. First select an existing server on Home, confirm that you can turn the connection on and off as expected, and verify which file is active under Config. If the main interface isn’t working yet, adding a widget only gives you another place to check; it can’t provide system permissions, a configuration file or server details.
Whether a widget is already on the system depends on the device layout and whether that layout was restored. It doesn’t tell you the client’s default connection policy. Keep the current layout if you don’t need a shortcut. If you do, choose Shadowrocket in the system’s supported widget picker and select from the styles actually listed. Start with one widget so that differences in refresh timing between two placements aren’t mistaken for different configurations.
Tell a stale status from an action that didn’t run
Start with a known state on Home, such as the connection being off. If the widget offers an action, use it once when the system allows, then return to Home to see whether the state actually changed and make a new access request. If only the widget shows stale information while Home and your test confirm a change, treat it as a refresh delay first. If neither Home nor the access test changes, check whether that widget style supports actions and whether you need to unlock the device.
Don’t tap repeatedly to compensate for slow feedback. Some system interfaces update later than the client, and repeated taps may unexpectedly toggle the connection back, making it hard to tell whether the first tap worked. Make one change at a time and wait for an observable result. Don’t also switch servers or start the connection from another entry point, or you won’t know which action caused the result.
If the connection turns off and then comes back, check On Demand to see whether the system reconnected based on its conditions. A widget is another place to control the client; it doesn’t change active automatic connection rules. For a clean comparison, temporarily disable On Demand, confirm on Home that the connection is off, then test the widget independently. Restore the original policy afterward. Deleting the widget won’t stop automatic connections; they’re separate things.
Troubleshoot missing widgets, device changes and visibility
If Shadowrocket isn’t in the system’s widget list, first check that the app opens on the current device, that the system allows widgets to be added in this location and which widget category is currently displayed. Some system locations support different styles; a missing size or placement doesn’t mean widgets are unavailable everywhere. If a device migration leaves an empty slot for an old widget, remove the slot in the system interface and add one of the available widgets. There’s no need to delete the client configuration.
If you use a widget in a shared environment, check what it displays before deciding whether it’s suitable. Visible information may include connection status, a name or other details. The conditions for viewing a lock screen and home screen differ. To limit exposure, move the widget to a location visible only after unlocking, or use Home as your check. Even if the widget shows only status, don’t rely on it as your only diagnostic source; verify connectivity with an actual request.
After changing the system layout, check it in two steps: first confirm the widget opens the right place, then confirm its connection status matches Home. If they differ briefly but eventually update, don’t change DNS or rules to compensate. If the widget stays stale, keep Home as your control and note the system location and action that triggered the issue. Only remove and add the widget again if the issue is reproducible.
07 / Cross-Device Data
iCloud sync scope and conflict handling
Check what sync includes before enabling it
iCloud sync keeps client-supported items available across eligible devices. Being signed in to iCloud doesn’t mean sync is enabled in the current client. Enabling sync doesn’t mean the live connection status on Home, Global Routing or all local permissions are shared. Check the sync status in Settings, the app’s iCloud permissions in the system and the actual state of the target item in Config. Verify with an item you can see rather than assuming sync works because you’re signed in.
Before enabling sync for the first time, choose a device with complete, currently working data as your reference. Note the configuration in use, selected server and important settings, and keep a copy you can restore. If you’re using only one device, keep the current setup if it meets your needs. When syncing to a second device for the first time, don’t delete items with duplicate names right away. Different accounts, system permissions or device management policies can all affect sync; missing data doesn’t automatically mean the client is misconfigured.
Start with a configuration that can be synced and contains no subscription URLs or server credentials. Give it a recognizable name, then sync it using an option available in the current interface. On the other device, check whether it appears and compare its contents before deciding whether to make it active. File visibility, matching contents and active use are three different things. Even if the copy syncs successfully, Home may still be using an older configuration or a different server; check these separately.
For items with duplicate names, compare contents before choosing which to keep
Files with the same name aren’t necessarily the same configuration. If a conflict occurs, stop editing on multiple devices at once. Save what you can currently see on both sides, then compare key sections such as custom resolution settings, rule order and the FINAL route. Modified time can help, but doesn’t determine which copy is authoritative: the newer file may simply have been saved again, or it may be missing rules unique to the other device. Use clear copy names to identify each source, then decide based on the contents.
Deletions may also propagate through sync, so don’t use them to force a refresh. If an item disappears from one device, stop deleting things and check whether another device or backup still has a usable copy. To restore it, choose one device, save a reliable copy separately and verify it works before checking other devices one at a time. Don’t restore the same item independently on multiple devices before checking; that can create new conflicts and make it hard to trace the source.
Distinguish cloud import, ongoing sync and subscription updates
Treat Import from Cloud JSON and ongoing iCloud sync as separate features. Import passes data from a selected source to the client. Whether it continues tracking changes depends on the sync capabilities available in Settings. Subscribe updates retrieve data again from your existing subscription source. Sync can transfer items already on your device without confirming that the subscription source works. A subscription update can succeed without the updated item appearing on another device.
If a list is empty, first check whether it has any content on the device where the subscription was imported. If the source device is empty too, follow these checks for subscription parsing failures or an empty list to inspect the original link and update result. Don’t use repeated iCloud toggling as a substitute. If the source device is fine but items are missing from another device, focus on the account, permissions, sync scope and network access to the cloud. Don’t share subscription contents publicly to investigate.
When setting up a replacement device, check in order that all items have arrived, the right items are selected and the required permissions have been granted; then test an actual connection. Don’t clear the old device’s data until you’ve confirmed all three. If you plan to turn off sync, first determine whether you’re stopping further sync on this device or deleting items stored in the cloud. Follow the system prompts rather than guessing from the toggle’s name which copies will remain.
08 / Local Proxy
Proxy ports, listening scope and connection tests
First identify which end the port belongs to
The port in a server entry is where the remote service accepts connections; it corresponds to your existing server details. The local Proxy listening port in Settings is where the client on your device accepts proxy requests. Another app’s proxy form may also ask for the address and port it should connect to. These three can show the same number but have different meanings. Changing a remote entry affects the destination for connections to the server. Changing the local listener affects how apps that use it connect.
Decide whether you need a local Proxy based on how you use the client. If you normally connect through Home and your apps don’t need a manually configured proxy, keep the current setting rather than enabling another listener just to test. If you do need one, note the visible port, supported protocols, listening scope and enabled state. Platform and device settings may differ, so there’s no universal factory-default port. Use the value shown as active on your device.
Match the protocol, address and port
The proxy type configured in a local app must match the local listener. If the app requires an HTTP proxy, enter the actual HTTP port provided by the client. If it requires SOCKS5, check whether a SOCKS5 listener is available instead of copying the HTTP port. The two methods may differ in how they establish connections and pass domain names, so the same website may produce different resolution records. Test one explicitly supported type first, then configure other apps.
| Symptom | Check first |
|---|---|
| Connection refused | Is the listener enabled? Do the address, port and listening scope match? |
| Error after connecting | Do both ends use the same proxy type? Does the app require other parameters? |
| Timeout after connecting | Did the request reach the client, and which rule handles it next? |
If the listener is for local use only and the interface lets you restrict its scope, use the local loopback address. 127.0.0.1 points to the device where you enter it; entering the same address on another device won’t connect to the device running Shadowrocket. Expand the listening scope only if you need local network access, the platform supports it and network policies allow it. For a listener available to other devices on the same network, be clear about who can access it. Don’t widen the scope unnecessarily just to make a connection work.
If a port is in use, first check whether another process on this device or an old instance is already using it. Don’t stop an unfamiliar system process to free the port. If the interface allows it, choose another port that isn’t in use and update every app that depends on the listener. If you change only the listener, the apps using it will keep contacting the old port. The setup may look correct even though requests never reach the client.
Test local access separately from subsequent routing
First check whether the client app can connect to the local listener. Then check whether a request that reaches it can reach its destination through the expected rules. When testing from another device, also check whether the two devices can communicate; some guest networks block device-to-device traffic. If the client has no corresponding request, check the address, port, system permissions and listening scope. If the request is logged but gets no response, check Global Routing, DNS or your existing server rather than repeatedly changing the local port.
When disabling the listener, first restore proxy settings in the apps that use it, then turn off the temporary listener and confirm those apps can connect normally. This prevents an app from sending requests to an inactive address after the client stops. If you’re only undoing a temporary test, restore the port, scope and enabled state from your notes. There’s no need to reimport a subscription or change the remote server entry. To read the failure stage, return to Logs and compare the steps.