explaingit

h2y/shadowrocket-adblock-rules

Analysis updated 2026-06-24

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

TLDR

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
Click or tap to explore — scroll the page freely

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

What do people build with it?

USE CASE 1

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

USE CASE 2

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

USE CASE 3

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

USE CASE 4

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

What is it built with?

PythonShadowrocketShell

How does it compare?

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 get it running?

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.

In plain English

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.

Copy-paste 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

What 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.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub h2y on gitmyhub

Verify against the repo before relying on details.