Shadowrocket Config Files: Import and Switch Configs
On this page
What a config file is
Shadowrocket is a rule-based proxy utility. Its config file holds the rules that decide whether each connection goes through the proxy, connects directly or is blocked. The App Store description lists what you can set there, including rule-based routing, Hosts (local DNS mapping), URL rewriting, HTTPS decryption and blocking ads by domain.
Servers decide where your traffic exits; the config file decides which traffic uses a server at all. The two are managed separately.
What’s on the Config tab
The labels below come from the US App Store screenshots and may differ in your version. The “What it does” column is our reading of the label and the App Store description, and hasn’t been tested. The Config tab (titled Config Files) has:
| Item | What it does |
|---|---|
| Restore Default Config | Resets the default config to its original content |
| Import From Cloud… | Imports a config file from iCloud |
| Wi-Fi Upload | Uploads a config file from a computer’s browser on the same Wi-Fi |
| Test Rule | Enter a URL to see which rule it matches |
| Local Files | Configs stored on the device; default.conf by default |
| Remote Files › Add Configuration | Imports a remote config from a URL |
The note on that screen reads: the dot means the default config, the checkmark means the config being used.
Open a config file to see its sections (General, Rule, Hosts, URL Rewrite, HTTPS Decryption, Filter) and actions such as Add Rule, Add Hosts, Add URL Rewrite and Test Rule. How rules work is covered in Shadowrocket rules.
Import a remote config from a URL
If your provider or another source you trust gives you a config URL:
- Open the Config tab.
- Under Remote Files, tap Add Configuration.
- Paste the config URL and confirm to download it (prompt wording untested).
- Tap the config and choose to use it (exact steps untested). The config in use has a checkmark.
Global Routing on the Home tab
The Home tab has a Global Routing row below the switch. In the App Store screenshots it shows Config, meaning traffic follows the rules in the current config file. When we tested on an iPhone set to Chinese, it showed Proxy instead. We haven’t confirmed exactly what each option does yet. Normally, leave it on Config.
Before you import a config
Warning
A config file controls where your traffic goes and can turn on HTTPS decryption. Only import configs from sources you trust. For a config you’re unsure about, use Test Rule on a few sites you use often before relying on it.
- If things get messed up, Restore Default Config puts the default config back to its original state.
- Before importing a remote config, consider backing up your current one with Duplicate (untested).