Repository: ClashConnectRules/Clash Branch: main Commit: 7845933b6875 Files: 2 Total size: 11.1 KB Directory structure: gitextract_q9yvrqor/ ├── README.md └── rules.ini ================================================ FILE CONTENTS ================================================ ================================================ FILE: README.md ================================================ # Clash Rule Configuration An optimized Clash proxy rule configuration, providing precise traffic splitting and an efficient web access experience. ## 📋 Features - **🌐 Intelligent Splitting**: Automatically identifies and splits international and domestic traffic. - **🚫 Ad Blocking**: Built-in filtering rules for both domestic and international ads. - **🤖 AI Services Optimization**: Specialized routing rules for AI services like OpenAI, Claude, and Gemini. - **📱 App-Specific Rules**: Dedicated groups for services like YouTube, Microsoft, Google, and Apple. - **🇨🇳 Mainland China Optimization**: A comprehensive whitelist for domestic Chinese websites and IPs. - **🛡️ Privacy Protection**: Choose different regional nodes for WeChat to protect privacy. ## 🚀 Quick Start ### Supported Clients - ✅ Clash for Windows - ✅ ClashX (macOS) - ✅ Clash for Android - ✅ ClashX Pro - ✅ Other clients that support the Clash configuration format. ## 📊 Proxy Group Description ### General Groups - **🌐 International Traffic**: The default choice for all foreign websites and services. - **🎯 Domestic Traffic**: For domestic Chinese websites and services, set to DIRECT by default. ### Ad-Blocking Groups - **🚫 Domestic Ads**: Blocks domestic ads, supports REJECT/DIRECT options. - **🚫 International Ads**: Blocks international ads, supports REJECT/DIRECT options. ### Dedicated Service Groups - **🤖 AI Services**: OpenAI, Claude, Gemini, Anthropic, Copilot. - **📹 YouTube**: Dedicated to YouTube for an optimized video playback experience. - **Ⓜ️ Microsoft Services**: Microsoft, OneDrive, and other Microsoft services. - **🔍 Google Services**: Google Search, Gmail, Google FCM (does not include YouTube). - **🍎 Apple Services**: App Store, iCloud, Apple Music, etc. - **🌍 International Media**: Netflix, TikTok, Instagram, Threads, etc. - **🫧 WeChat**: Dedicated for WeChat, allowing selection of different regional nodes. ## 🎯 Rule Priority Rules are matched in the following order of priority (from highest to lowest): 1. **Ad-Blocking Rules** - Highest priority to block ads. 2. **Domestic Site Rules** - Identifies domestic Chinese websites and services. 3. **AI Services** - Various AI platforms and services. 4. **YouTube** - YouTube video services. 5. **Microsoft Services** - Microsoft-related services. 6. **Google Services** - Google-related services (excluding YouTube). 7. **Apple Services** - Apple ecosystem services. 8. **International Media** - Foreign streaming and social media. 9. **Other Rules** - WeChat, Telegram, etc. 10. **Geolocation Rules** - IP-based geographical location determination. 11. **Final Match** - Traffic that does not match any other rule. ## 🔧 Custom Configuration ### Modifying Proxy Groups All proxy groups include the following options: - 🚀 Proxy Selection - ♻️ Auto Select - Regional Nodes (Hong Kong, Taiwan, Singapore, Japan, USA, UK, etc.) - 🚀 Manual Select - DIRECT ### WeChat Region Selection WeChat supports selecting different regions: - **DIRECT** - Direct connection within Mainland China. - **🇭🇰 Hong Kong** - Access Hong Kong-specific features. - **🇨🇳 Taiwan** - Access Taiwan-specific features. - **Other Regions** - Select as needed. ## 📝 Rule Sources This configuration uses the following high-quality rule sources: - **ACL4SSR**: Base rules for traffic splitting. - **blackmatrix7/ios\_rule\_script**: App-specific rules. - **DivineEngine/Profiles**: Rules for the Mainland China whitelist. All rule sources are open-source projects and are regularly updated and maintained. ## 🤝 Contributing Issues and Pull Requests are welcome to improve this configuration\! ### How to Contribute 1. Fork this repository. 2. Create your feature branch (`git checkout -b feature/AmazingFeature`). 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`). 4. Push to the branch (`git push origin feature/AmazingFeature`). 5. Open a Pull Request. ## 📄 License This project is licensed under the MIT License - see the [LICENSE](https://www.google.com/search?q=LICENSE) file for details. ## ⚠️ Disclaimer - This configuration is for learning and research purposes only. - Please comply with local laws and regulations. - The author assumes no responsibility for any issues that may arise from the use of this configuration. ## 🙏 Acknowledgements Thanks to the following projects and contributors: - [ACL4SSR](https://github.com/ACL4SSR/ACL4SSR) - [blackmatrix7/ios\_rule\_script](https://github.com/blackmatrix7/ios_rule_script) - [DivineEngine/Profiles](https://github.com/DivineEngine/Profiles) ----- If this configuration is helpful to you, please give it a ⭐ Star to show your support! ================================================ FILE: rules.ini ================================================ [custom] ;设置规则标志位 ;基础规则 ruleset=🎯 国内流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list ruleset=🎯 国内流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list ;去广告规则 - 优先级最高 ruleset=🚫 国内广告,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/AdvertisingLite/AdvertisingLite.list ruleset=🚫 国外广告,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/AdGuardDNSFilter/AdGuardDNSFilter.list ;国内站点规则 ruleset=🎯 国内流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list ruleset=🎯 国内流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list ruleset=🎯 国内流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list ruleset=🎯 国内流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list ruleset=🎯 国内流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Download.list ruleset=🎯 国内流量,https://cdn.jsdelivr.net/gh/DivineEngine/Profiles@master/Clash/RuleSet/China.yaml ruleset=🎯 国内流量,https://cdn.jsdelivr.net/gh/DivineEngine/Profiles@master/Clash/RuleSet/Extra/ChinaIP.yaml ;AI服务规则 ruleset=🤖 AI服务,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/OpenAI/OpenAI.list ruleset=🤖 AI服务,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Gemini/Gemini.list ruleset=🤖 AI服务,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Claude/Claude.list ruleset=🤖 AI服务,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Anthropic/Anthropic.list ruleset=🤖 AI服务,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Copilot/Copilot.list ;YouTube规则 ruleset=📹 YouTube,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/YouTube/YouTube.list ;微软服务规则 ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Microsoft/Microsoft.list ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/OneDrive.list ;谷歌服务规则(不包含YouTube) ruleset=🔍 谷歌服务,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Google/Google.list ruleset=🔍 谷歌服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list ;Apple服务规则 ruleset=🍎 Apple服务,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Apple/Apple.list ;国外媒体规则 ruleset=🌍 国外媒体,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Netflix/Netflix.list ruleset=🌍 国外媒体,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/TikTok/TikTok.list ruleset=🌍 国外媒体,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Instagram/Instagram.list ruleset=🌍 国外媒体,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Threads/Threads.list ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list ;国内媒体规则 ruleset=🎯 国内流量,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/BiliBili/BiliBili.list ruleset=🎯 国内流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaMedia.list ruleset=🎯 国内流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/NetEaseMusic.list ;电报规则 ruleset=🌐 国际流量,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Telegram/Telegram.list ;其他服务 ruleset=🫧 WeChat,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/WeChat/WeChat.list ruleset=🌐 国际流量,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Speedtest/Speedtest.list ;代理规则 ruleset=🌐 国际流量,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyGFWlist.list ;地理位置规则 ;ruleset=🎯 国内流量,[]GEOIP,LAN ruleset=🎯 国内流量,[]GEOIP,CN ruleset=🌐 国际流量,[]FINAL ;设置规则标志位 ;设置分组标志位 ;通用组 custom_proxy_group=🌐 国际流量`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇬🇧 英国节点`[]🇹🇷 其他节点`[]🚀 手动切换`[]DIRECT custom_proxy_group=🎯 国内流量`select`[]DIRECT`[]🚀 节点选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点 ;去广告组 custom_proxy_group=🚫 国内广告`select`[]REJECT`[]DIRECT`[]🚀 节点选择 custom_proxy_group=🚫 国外广告`select`[]REJECT`[]DIRECT`[]🚀 节点选择 ;规则组 custom_proxy_group=🤖 AI服务`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇺🇲 美国节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇬🇧 英国节点`[]🇹🇷 其他节点`[]🚀 手动切换`[]DIRECT custom_proxy_group=📹 YouTube`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇸🇬 狮城节点`[]🇨🇳 台湾节点`[]🇬🇧 英国节点`[]🇹🇷 其他节点`[]🚀 手动切换`[]DIRECT custom_proxy_group=Ⓜ️ 微软服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇨🇳 台湾节点`[]🇬🇧 英国节点`[]🚀 手动切换 custom_proxy_group=🔍 谷歌服务`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇨🇳 台湾节点`[]🇬🇧 英国节点`[]🇹🇷 其他节点`[]🚀 手动切换`[]DIRECT custom_proxy_group=🍎 Apple服务`select`[]DIRECT`[]🚀 节点选择`[]🇺🇲 美国节点`[]🇭🇰 香港节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇨🇳 台湾节点`[]🇬🇧 英国节点`[]🚀 手动切换 custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇬🇧 英国节点`[]🇹🇷 其他节点`[]🚀 手动切换`[]DIRECT custom_proxy_group=🫧 WeChat`select`[]DIRECT`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇬🇧 英国节点`[]🚀 节点选择`[]🚀 手动切换 ;节点组 custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇨🇳 台湾节点`[]🇸🇬 狮城节点`[]🇯🇵 日本节点`[]🇺🇲 美国节点`[]🇬🇧 英国节点`[]🇹🇷 其他节点`[]🚀 手动切换`[]DIRECT custom_proxy_group=🚀 手动切换`select`.* custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50 custom_proxy_group=🇭🇰 香港节点`select`(港|HK|hk|Hong Kong|HongKong|hongkong)`http://www.gstatic.com/generate_204`300,,50 custom_proxy_group=🇯🇵 日本节点`select`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|[^-]日|JP|Japan)`http://www.gstatic.com/generate_204`300,,50 custom_proxy_group=🇺🇲 美国节点`select`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States|States)`http://www.gstatic.com/generate_204`300,,150 custom_proxy_group=🇨🇳 台湾节点`select`(台|新北|彰化|TW|Taiwan)`http://www.gstatic.com/generate_204`300,,50 custom_proxy_group=🇸🇬 狮城节点`select`(新加坡|坡|狮城|SG|Singapore)`http://www.gstatic.com/generate_204`300,,50 custom_proxy_group=🇬🇧 英国节点`select`(英国|英|英格兰|UK|United Kingdom)`http://www.gstatic.com/generate_204`300,,50 custom_proxy_group=🇹🇷 其他节点`select`^((?!🇭🇰|港|HK|Hong|🇹🇼|台|TW|Tai|🇯🇵|日|JP|Japan|🇸🇬|坡|狮城|SG|Singapore|🇰🇷|韩|KR|KOR|Korea|🇺🇸|美|US|States|American|🇬🇧|英国|英|英格兰|UK|United Kingdom).)*$`http://www.gstatic.com/generate_204`300,,50 ;设置分组标志位 enable_rule_generator=true overwrite_original_rules=true ;clash_rule_base=https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GeneralClashConfig.yml ;luck