gitwtfhub

wtf is shadowrocket-adblock-rules?

h2y/shadowrocket-adblock-rules — explained in plain English

Analysis updated 2026-06-24

16,551PythonAudience · ops devopsComplexity · 2/5Setup · easy

TL;DR

Ready-made routing and ad-blocking rule sets for the Shadowrocket iOS proxy app, auto-generated from community blocklists and shared as scannable QR codes.

Mindmap

mindmap
  root((Shadowrocket rules))
    Inputs
      GFWList
      EasyList
      China domain lists
    Outputs
      Rule config files
      QR codes
      Blacklist and whitelist variants
    Use Cases
      Selective proxy routing on iOS
      Block web and in-app ads
      Return to China mode
    Tech Stack
      Python
      Shadowrocket
      Shell

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Scan a QR code to load a curated Shadowrocket rule set on iOS without writing rules manually.

REASON 2

Use the blacklist mode to send only blocked sites through your proxy while leaving the rest direct.

REASON 3

Apply the China and overseas split rules to keep local sites fast while routing foreign sites through a proxy.

REASON 4

Enable the ad-blocking rule sets to block webpage, in-app, and video ads inside Shadowrocket.

What's in the stack?

PythonShadowrocketShell

How it stacks up

h2y/shadowrocket-adblock-rulescaronc/apprisealievk/avatarify-python
Stars16,55116,55616,521
LanguagePythonPythonPython
Setup difficultyeasyeasyhard
Complexity2/52/54/5
Audienceops devopsops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Requires the paid Shadowrocket iOS app and the README is in Chinese, the project is no longer actively updated.

Wtf does this do

Shadowrocket-ADBlock-Rules is a collection of routing rule files built specifically for Shadowrocket, an iOS proxy app (a tool that routes your internet traffic through a different server). The repository, written mostly in Python to automate rule generation, provides multiple rule sets that control which websites are accessed directly and which ones go through a proxy. The README, written in Chinese, explains that the rules are designed for iOS users who want selective proxy routing, meaning some sites connect directly and others route through a proxy server. The collection includes variants: a blacklist mode (only blocked sites use the proxy), a whitelist mode (only known-accessible sites connect directly), a China/overseas split (Chinese sites direct, foreign sites proxied), and a "return to China" mode for overseas users wanting access to Chinese services. Many rule sets also include ad-blocking derived from sources like GFWList (a community-maintained list of blocked domains) and EasyList, covering webpage ads, in-app ads, and video ads. The rules are generated automatically using Python scripts on a schedule, drawing from community-maintained blocklists. Each variant is distributed as a QR code you scan directly within the Shadowrocket app. The project maintainer noted it is no longer actively updated. You would use this if you have Shadowrocket installed and want a ready-made, detailed rule set rather than configuring routing rules manually.

Yoink these prompts

Prompt 1
Help me pick which Shadowrocket-ADBlock-Rules variant fits a user in mainland China who wants ad blocking and selective proxy.
Prompt 2
Walk me through scanning the Shadowrocket-ADBlock-Rules QR code and importing the rule set on iOS.
Prompt 3
Explain the difference between the blacklist, whitelist, and return-to-China rule sets in h2y Shadowrocket-ADBlock-Rules.
Prompt 4
Show me how the Python generator in h2y Shadowrocket-ADBlock-Rules pulls from GFWList and EasyList so I can fork it.
Prompt 5
Help me write my own custom Shadowrocket rule on top of h2y's base set to bypass a specific domain.

Frequently asked questions

wtf is shadowrocket-adblock-rules?

Ready-made routing and ad-blocking rule sets for the Shadowrocket iOS proxy app, auto-generated from community blocklists and shared as scannable QR codes.

What language is shadowrocket-adblock-rules written in?

Mainly Python. The stack also includes Python, Shadowrocket, Shell.

How hard is shadowrocket-adblock-rules to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is shadowrocket-adblock-rules for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.