Shadowrocket Guide

Shadowrocket Ad Blocking: Rules, Checks and Risks

On this page
  1. What you want to do
  2. Where to set it: add a blocking rule
  3. Importing someone else’s ad-block list
  4. What to watch out for

What you want to do

Stop some ads from loading: requests from fixed ad domains, in apps or web pages, get blocked at the Shadowrocket level.

The App Store description lists several related features: blocking ads by domain and user agent rules (“Block ads by domain, user agent rules”), importing rule files from a URL or iCloud Drive, URL rewriting and HTTPS decryption.

Where to set it: add a blocking rule

Rules live in your config file; see Shadowrocket rules for the basics. The menu names come from the US App Store screenshots and may differ in your version (untested).

  1. On the Config tab, tap the config file in use (for example default.conf).
  2. Tap Add Rule.
  3. Set the type to domain suffix and enter the ad domain, for example ads.example.com (just an example, not a real ad domain).
  4. Choose the block action (exact option name untested) and save.
  5. Use Test Rule with that domain to confirm it matches the rule you just added.

Importing someone else’s ad-block list

Some people publish ad-block rule files you can import from a URL. They’re maintained by third parties, and we don’t recommend any particular source:

  • only import from sources you trust and that are actively maintained;
  • a list can block too much and break some apps or sites;
  • Back up your current config first. If you changed the default config, Restore Default Config puts it back to its original content; for any other config file, restore it from your backup.

What to watch out for

Warning

Some ad-blocking setups ask you to turn on HTTPS decryption and install and trust a certificate on your device. Once it’s on, Shadowrocket can see and rewrite HTTPS content passing through it. Only turn it on if you understand what you’re doing, and never install a certificate from an unknown source or one someone else gives you.

  • If it blocks the wrong thing: a broken page layout or an app feature that stops working usually means a rule caught a normal domain. Use Test Rule to find which one, then remove or change it.
  • Not every ad can be blocked: when ads and normal content come from the same domain, blocking the domain blocks both.
  • No cracks: we don’t cover scripts that unlock paid features or remove in-app purchases.

To recover from broken rules, see Shadowrocket config files.

Last updated · For Shadowrocket 2.2.93

Language

Appearance

Appearance