This repository contains various rule sets for ShadowRocket and other proxy tools, designed to help bypass censorship and improve internet access on iOS devices. The rule sets are configured for services like Google Gemini, YouTube, and other commonly blocked resources.
To use the rules in ShadowRocket, you need to add the raw URL of the list files directly into the application settings. ShadowRocket requires raw URLs to correctly fetch and update rule sets from GitHub.
- Open ShadowRocket on your iOS device.
- Go to Configuration > Rule Sets.
- Add the raw URL of the rule file you want to use (such as the Gemini.list or YouTube.list) in the following format:
-
Gemini rule list:
https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/Gemini.list
-
YouTube rule list:
https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/YouTube.list
- Make sure the URL is in the raw format (it should start with https://raw.githubusercontent.com/ and end with .list).
- Important: In your ShadowRocket configuration, make sure the last rule is
DIRECT
. This rule ensures that all other domains that are not listed in the rule sets will bypass the proxy and go directly through your regular internet connection. Only domains included in the rule sets will be routed through the proxy.
Here's an example configuration for ShadowRocket:
RULE-SET, https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/Gemini.list, PROXY
RULE-SET, https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/YouTube.list, PROXY
FINAL, DIRECT
ShadowRocket requires raw URLs because they provide plain text files without the HTML formatting, which is necessary for the app to parse and use the rule lists properly. If you use the regular GitHub URL (e.g., https://github.com/rz6agx/iOS-Rule/blob/main/Gemini.list), ShadowRocket will not be able to correctly load the rules, as it will fetch an HTML page instead of the raw text file.
- Gemini.list: Rules for bypassing censorship for Google Gemini services.
- YouTube.list: Rules for bypassing restrictions on YouTube and related services.
- Other rule sets: Additional lists will be added over time.
We have prepared a complete configuration file (example.conf
) for ShadowRocket, which includes multiple rule sets and general settings. You can use this file as a template for your own configuration.
[General]
ipv6 = false
bypass-system = true
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local
dns-server = 77.88.8.8, 77.88.8.1
[Rule]
RULE-SET,https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/domain_custom.list,PROXY
RULE-SET,https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/Copilot.list,PROXY
RULE-SET,https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/Instagram.list,PROXY
RULE-SET,https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/OpenAI.list,PROXY
RULE-SET,https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/Youtube.list,PROXY
RULE-SET,https://raw.githubusercontent.com/rz6agx/iOS-Rule/main/Gemini.list,PROXY
FINAL,DIRECT
[Host]
localhost = 127.0.0.1
- Download the example.conf file from this repository.
- Import it into ShadowRocket:
- Open ShadowRocket.
- Go to Configuration > Import.
- Select the example.conf file.
- Activate the configuration and ensure all rules are loaded correctly.
-
General Settings:
- Disables IPv6 (ipv6 = false).
- Bypasses system proxy settings (bypass-system = true).
- Skips proxy for local networks and Apple services (skip-proxy and bypass-tun).
- Uses Yandex DNS servers (dns-server = 77.88.8.8, 77.88.8.1).
-
Rule Sets:
- Loads multiple rule sets from this repository (e.g., domain_custom.list, Copilot.list, Instagram.list, etc.).
- Routes traffic for specified domains through the proxy (PROXY).
- Ensures all other traffic goes directly (FINAL,DIRECT).
-
Host Settings:
- Maps localhost to 127.0.0.1.
We would like to extend our special thanks to GitHub user blackmatrix7 for their incredible work on the rule lists available at ios_rule_script. Their contributions have been invaluable in creating and maintaining high-quality rule sets for tools like ShadowRocket.
This repository is licensed under the MIT License. See the LICENSE file for details.