clash-rules
🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 等基于 Clash Premium 内核的客户端。
Top Related Projects
SSR 去广告ACL规则/SS完整GFWList规则/Clash规则碎片,Telegram频道订阅地址
搜集、整理、维护 Surge / Quantumult (X) / Shadowrocket / Surfboard / clash (Premium) 实用规则。
分流规则、重写写规则及脚本。
Quick Overview
Loyalsoldier/clash-rules is a GitHub repository that provides a collection of rule sets for the Clash proxy tool. It offers various pre-configured rule lists to enhance network traffic control and improve user experience when using Clash for network management and filtering.
Pros
- Comprehensive rule sets covering various categories like direct connections, proxy routing, and ad blocking
- Regular updates to maintain effectiveness against evolving network patterns
- Easy integration with Clash configuration files
- Community-driven project with contributions from multiple users
Cons
- May require manual updates to stay current with the latest rules
- Some rule sets might be too broad or restrictive for specific use cases
- Potential for false positives or negatives in traffic classification
- Requires basic understanding of Clash configuration to implement effectively
Getting Started
To use these rule sets with Clash:
- Add the desired rule set URLs to your Clash configuration file:
rule-providers:
reject:
type: http
behavior: domain
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/reject.txt"
path: ./ruleset/reject.yaml
interval: 86400
icloud:
type: http
behavior: domain
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/icloud.txt"
path: ./ruleset/icloud.yaml
interval: 86400
rules:
- RULE-SET,reject,REJECT
- RULE-SET,icloud,DIRECT
-
Restart Clash or reload the configuration to apply the new rules.
-
Monitor your network traffic to ensure the rules are working as expected.
Competitor Comparisons
SSR 去广告ACL规则/SS完整GFWList规则/Clash规则碎片,Telegram频道订阅地址
Pros of ACL4SSR
- More comprehensive rule sets, including specialized lists for different purposes
- Frequent updates and active community contributions
- Includes additional tools and scripts for rule management
Cons of ACL4SSR
- Larger file sizes due to more extensive rule sets
- May require more configuration and customization
- Potentially higher resource usage when processing rules
Code Comparison
ACL4SSR:
# 内容:Telegram
# 数量:14条
DOMAIN-SUFFIX,t.me
DOMAIN-SUFFIX,tdesktop.com
DOMAIN-SUFFIX,telegra.ph
DOMAIN-SUFFIX,telegram.me
DOMAIN-SUFFIX,telegram.org
clash-rules:
# Telegram
DOMAIN-SUFFIX,comments.app
DOMAIN-SUFFIX,contest.com
DOMAIN-SUFFIX,graph.org
DOMAIN-SUFFIX,quiz.directory
DOMAIN-SUFFIX,t.me
Both repositories provide rule sets for popular networking tools and services. ACL4SSR offers more extensive and detailed rules, while clash-rules focuses on a more streamlined approach. The code comparison shows that ACL4SSR includes additional domain suffixes for Telegram, potentially providing more comprehensive coverage. However, clash-rules' concise format may be easier to manage for some users.
搜集、整理、维护 Surge / Quantumult (X) / Shadowrocket / Surfboard / clash (Premium) 实用规则。
Pros of SS-Rule-Snippet
- More comprehensive rule sets, including specific rules for various streaming services and social media platforms
- Includes additional configuration files for different proxy tools (e.g., Surge, Quantumult)
- Provides more detailed documentation and usage instructions in multiple languages
Cons of SS-Rule-Snippet
- Less frequent updates compared to clash-rules
- Larger file sizes due to more extensive rule sets, which may impact performance on some devices
- Some rule sets may be overly specific, potentially leading to false positives or negatives
Code Comparison
SS-Rule-Snippet:
DOMAIN-SUFFIX,googleapis.cn,🍎 Only
DOMAIN-SUFFIX,mzstatic.com,🍎 Only
DOMAIN-SUFFIX,itunes.apple.com,🍎 Only
DOMAIN-SUFFIX,icloud.com,🍎 Only
DOMAIN-SUFFIX,icloud-content.com,🍎 Only
clash-rules:
DOMAIN-SUFFIX,apple.com
DOMAIN-SUFFIX,icloud.com
DOMAIN-SUFFIX,itunes.com
DOMAIN-SUFFIX,me.com
DOMAIN-SUFFIX,mzstatic.com
Both repositories provide rule sets for popular proxy tools, but they differ in their approach to rule organization and specificity. SS-Rule-Snippet offers more detailed rules and configurations for various services, while clash-rules focuses on a more streamlined and frequently updated set of rules.
分流规则、重写写规则及脚本。
Pros of ios_rule_script
- More comprehensive rule sets covering a wider range of applications and services
- Includes scripts for iOS automation and customization beyond just network rules
- Frequent updates and active community contributions
Cons of ios_rule_script
- Larger file sizes and potentially higher resource usage due to extensive rule sets
- May require more configuration and customization for optimal performance
- Some rules might be overly specific or redundant for general use cases
Code Comparison
clash-rules:
payload:
- DOMAIN-SUFFIX,google.com
- DOMAIN-SUFFIX,googleapis.com
- DOMAIN-SUFFIX,gstatic.com
ios_rule_script:
DOMAIN-SUFFIX,google.com
DOMAIN-SUFFIX,googleapis.com
DOMAIN-SUFFIX,gstatic.com
DOMAIN-SUFFIX,google-analytics.com
DOMAIN-SUFFIX,googletagmanager.com
Both repositories provide rule sets for network filtering and proxy configuration. clash-rules focuses primarily on Clash-compatible rules, offering a streamlined approach for users of Clash clients. ios_rule_script, on the other hand, provides a more extensive collection of rules and scripts, catering to a broader range of use cases and platforms, particularly iOS devices.
While clash-rules may be more straightforward to implement for Clash users, ios_rule_script offers greater flexibility and customization options. However, this increased versatility comes at the cost of potentially higher complexity and resource requirements.
Users should choose between the two based on their specific needs, device ecosystem, and desired level of customization.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
ç®ä»
æ¬é¡¹ç®çæéç¨äº Clash Premium å æ ¸çè§åéï¼RULE-SETï¼ï¼åæ¶éç¨äºææä½¿ç¨ Clash Premium å æ ¸ç Clash å¾å½¢ç¨æ·çé¢ï¼GUIï¼å®¢æ·ç«¯ãä½¿ç¨ GitHub Actions å京æ¶é´æ¯å¤©æ©ä¸ 6:30 èªå¨æ建ï¼ä¿è¯è§åææ°ã
说æ
æ¬é¡¹ç®è§åéï¼RULE-SETï¼çæ°æ®ä¸»è¦æ¥æºäºé¡¹ç® @Loyalsoldier/v2ray-rules-dat å @v2fly/domain-list-communityï¼Apple
å Google
å表éçååæ¥æºäºé¡¹ç® @felixonmars/dnsmasq-china-listï¼ä¸å½å¤§é IPv4 å°åæ°æ®ä½¿ç¨ @17mon/china_ip_listã
æ¬é¡¹ç®çè§åéï¼RULE-SETï¼åªéç¨äº Clash Premium çæ¬ãClash Premium ç¸å¯¹äºæ®éçï¼å¢å äº TUN å¢å¼ºæ¨¡å¼ï¼è½æ¥ç®¡è®¾å¤ææ TCP å UDP æµéã
Clash Premium åçæ¬ä¸è½½å°å
â ï¸ ç±äº Clash åå ¶é¨åå¨è¾¹çæ项ç®äº 2023 å¹´ 11 æä¸æ¬å åºè·è·¯ï¼ç°æä¾é¨åå®æ¹åçå®è£ å ãå¯æ§è¡æ件ï¼è¯¦æ è§ hidden åæ¯ã
- Clash Premium å½ä»¤è¡çï¼
- å®æ¹çï¼éç¨äº WindowsãmacOSãLinuxãOpenWRT çå¤ç§å¹³å°ï¼
- è¡çç Clash.Metaï¼éç¨äº WindowsãmacOSãLinuxãOpenWRT çå¤ç§å¹³å°ï¼
- Clash Premium **å¾å½¢ç¨æ·çé¢**çï¼
- ClashNï¼éç¨äº Windowsï¼
- ClashX Proï¼éç¨äº macOSï¼
- Clash-vergeï¼éç¨äº WindowsãmacOSãLinuxï¼
- Clash for Windowsï¼éç¨äº WindowsãmacOSãLinuxï¼
- Clash for Androidï¼éç¨äº Androidï¼
è§åæ件å°åå使ç¨æ¹å¼
å¨çº¿å°åï¼URLï¼
å¦ææ æ³è®¿é®åå
raw.githubusercontent.com
ï¼å¯ä»¥ä½¿ç¨ç¬¬äºä¸ªå°åï¼cdn.jsdelivr.net
ï¼ï¼ä½æ¯å 容æ´æ°ä¼æ 12 å°æ¶ç延è¿ã以ä¸å°åå¡«åå¨ Clash é ç½®æ件éçrule-providers
éçurl
é 置项ä¸ã
- ç´è¿ååå表 direct.txtï¼
- 代çååå表 proxy.txtï¼
- 广åååå表 reject.txtï¼
- ç§æç½ç»ä¸ç¨ååå表 private.txtï¼
- Apple å¨ä¸å½å¤§éå¯ç´è¿çååå表 apple.txtï¼
- iCloud ååå表 icloud.txtï¼
- [æ ç¨]Google å¨ä¸å½å¤§éå¯ç´è¿çååå表 google.txtï¼
- GFWList ååå表 gfw.txtï¼
- éä¸å½å¤§é使ç¨ç顶级ååå表 tld-not-cn.txtï¼
- Telegram 使ç¨ç IP å°åå表 telegramcidr.txtï¼
- å±åç½ IP åä¿ç IP å°åå表 lancidr.txtï¼
- ä¸å½å¤§é IP å°åå表 cncidr.txtï¼
- éè¦ç´è¿ç常è§è½¯ä»¶å表 applications.txtï¼
使ç¨æ¹å¼
è¦æ³ä½¿ç¨æ¬é¡¹ç®çè§åéï¼åªéè¦å¨ Clash é
ç½®æ件ä¸æ·»å å¦ä¸ rule-providers
å rules
ã
Rule Providers é ç½®æ¹å¼
rule-providers:
reject:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt"
path: ./ruleset/reject.yaml
interval: 86400
icloud:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/icloud.txt"
path: ./ruleset/icloud.yaml
interval: 86400
apple:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt"
path: ./ruleset/apple.yaml
interval: 86400
google:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/google.txt"
path: ./ruleset/google.yaml
interval: 86400
proxy:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/proxy.txt"
path: ./ruleset/proxy.yaml
interval: 86400
direct:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/direct.txt"
path: ./ruleset/direct.yaml
interval: 86400
private:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt"
path: ./ruleset/private.yaml
interval: 86400
gfw:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/gfw.txt"
path: ./ruleset/gfw.yaml
interval: 86400
tld-not-cn:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt"
path: ./ruleset/tld-not-cn.yaml
interval: 86400
telegramcidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/telegramcidr.txt"
path: ./ruleset/telegramcidr.yaml
interval: 86400
cncidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/cncidr.txt"
path: ./ruleset/cncidr.yaml
interval: 86400
lancidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt"
path: ./ruleset/lancidr.yaml
interval: 86400
applications:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/applications.txt"
path: ./ruleset/applications.yaml
interval: 86400
ç½ååæ¨¡å¼ Rules é ç½®æ¹å¼ï¼æ¨èï¼
- ç½åå模å¼ï¼æ为ã没æå½ä¸è§åçç½ç»æµéï¼ç»ç»ä½¿ç¨ä»£çãï¼éç¨äºæå¡å¨çº¿è·¯ç½ç»è´¨é稳å®ãå¿«éï¼ä¸ç¼ºæå¡å¨æµéçç¨æ·ã
- 以ä¸é
ç½®ä¸ï¼é¤äº
DIRECT
åREJECT
æ¯é»è®¤åå¨äº Clash ä¸ç policyï¼è·¯ç±çç¥/æµéå¤ççç¥ï¼ï¼å ¶ä½å为èªå®ä¹ policyï¼å¯¹åºé ç½®æ件ä¸proxies
æproxy-groups
ä¸çname
ãå¦ä½ ç´æ¥ä½¿ç¨ä¸é¢çrules
è§åï¼åéè¦å¨proxies
æproxy-groups
ä¸æå¨é ç½®ä¸ä¸ªname
为PROXY
ç policyã - å¦ä½ å¸æ AppleãiCloud å Google å表ä¸çåå使ç¨ä»£çï¼åæ policy ç±
DIRECT
æ¹ä¸ºPROXY
ï¼ä»¥æ¤ç±»æ¨ï¼ä¸¾ä¸åä¸ã - å¦ä½ ä¸å¸æè¿è¡ DNS 解æï¼å¯å¨
GEOIP
è§åçæåå ä¸,no-resolve
ï¼å¦GEOIP,CN,DIRECT,no-resolve
ã
rules:
- RULE-SET,applications,DIRECT
- DOMAIN,clash.razord.top,DIRECT
- DOMAIN,yacd.haishan.me,DIRECT
- RULE-SET,private,DIRECT
- RULE-SET,reject,REJECT
- RULE-SET,icloud,DIRECT
- RULE-SET,apple,DIRECT
- RULE-SET,google,PROXY
- RULE-SET,proxy,PROXY
- RULE-SET,direct,DIRECT
- RULE-SET,lancidr,DIRECT
- RULE-SET,cncidr,DIRECT
- RULE-SET,telegramcidr,PROXY
- GEOIP,LAN,DIRECT
- GEOIP,CN,DIRECT
- MATCH,PROXY
é»ååæ¨¡å¼ Rules é ç½®æ¹å¼
- é»åå模å¼ï¼æ为ãåªæå½ä¸è§åçç½ç»æµéï¼æ使ç¨ä»£çãï¼éç¨äºæå¡å¨çº¿è·¯ç½ç»è´¨éä¸ç¨³å®æä¸å¤å¿«ï¼ææå¡å¨æµé紧缺çç¨æ·ãé常ä¹æ¯è½¯è·¯ç±ç¨æ·ã家åºç½å ³ç¨æ·ç常ç¨æ¨¡å¼ã
- 以ä¸é
ç½®ä¸ï¼é¤äº
DIRECT
åREJECT
æ¯é»è®¤åå¨äº Clash ä¸ç policyï¼è·¯ç±çç¥/æµéå¤ççç¥ï¼ï¼å ¶ä½å为èªå®ä¹ policyï¼å¯¹åºé ç½®æ件ä¸proxies
æproxy-groups
ä¸çname
ãå¦ä½ ç´æ¥ä½¿ç¨ä¸é¢çrules
è§åï¼åéè¦å¨proxies
æproxy-groups
ä¸æå¨é ç½®ä¸ä¸ªname
为PROXY
ç policyã
rules:
- RULE-SET,applications,DIRECT
- DOMAIN,clash.razord.top,DIRECT
- DOMAIN,yacd.haishan.me,DIRECT
- RULE-SET,private,DIRECT
- RULE-SET,reject,REJECT
- RULE-SET,tld-not-cn,PROXY
- RULE-SET,gfw,PROXY
- RULE-SET,telegramcidr,PROXY
- MATCH,DIRECT
è´è°¢
- @Loyalsoldier/geoip
- @Loyalsoldier/v2ray-rules-dat
- @gfwlist/gfwlist
- @v2fly/domain-list-community
- @felixonmars/dnsmasq-china-list
- @17mon/china_ip_list
é¡¹ç® Star æ°å¢é¿è¶å¿
Top Related Projects
SSR 去广告ACL规则/SS完整GFWList规则/Clash规则碎片,Telegram频道订阅地址
搜集、整理、维护 Surge / Quantumult (X) / Shadowrocket / Surfboard / clash (Premium) 实用规则。
分流规则、重写写规则及脚本。
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot