Last active
September 13, 2022 04:36
-
-
Save xbot/26f540ae8fad51cf27152f2385caccee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example to show how to customize rules while using a subscription link in ClashX | |
# The following content is that of the file: ~/.config/clash/config.yaml | |
# Replace SUBSCRIPTION_NAME with your custom name for your subscription. | |
# Replace SUBSCRIPTION_LINK with your subscription link. | |
# (HTTP and SOCKS5 in one port) | |
mixed-port: 7890 | |
# RESTful API for clash | |
external-controller: 127.0.0.1:9090 | |
allow-lan: false | |
mode: rule | |
log-level: info | |
proxy-providers: | |
SUBSCRIPTION_NAME: | |
type: http | |
path: ./proxies/SUBSCRIPTION_NAME.yaml | |
url: SUBSCRIPTION_LINK | |
interval: 3600 | |
health-check: | |
enable: true | |
url: http://www.gstatic.com/generate_204 | |
interval: 300 | |
proxy-groups: | |
- name: PROXY | |
type: select | |
use: | |
- SUBSCRIPTION_NAME | |
proxies: | |
- DIRECT | |
# @see https://github.com/Loyalsoldier/clash-rules | |
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 | |
apple: | |
type: http | |
behavior: domain | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/apple.txt" | |
path: ./ruleset/apple.yaml | |
interval: 86400 | |
google: | |
type: http | |
behavior: domain | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/google.txt" | |
path: ./ruleset/google.yaml | |
interval: 86400 | |
proxy: | |
type: http | |
behavior: domain | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/proxy.txt" | |
path: ./ruleset/proxy.yaml | |
interval: 86400 | |
direct: | |
type: http | |
behavior: domain | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/direct.txt" | |
path: ./ruleset/direct.yaml | |
interval: 86400 | |
private: | |
type: http | |
behavior: domain | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/private.txt" | |
path: ./ruleset/private.yaml | |
interval: 86400 | |
gfw: | |
type: http | |
behavior: domain | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/gfw.txt" | |
path: ./ruleset/gfw.yaml | |
interval: 86400 | |
greatfire: | |
type: http | |
behavior: domain | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/greatfire.txt" | |
path: ./ruleset/greatfire.yaml | |
interval: 86400 | |
tld-not-cn: | |
type: http | |
behavior: domain | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/tld-not-cn.txt" | |
path: ./ruleset/tld-not-cn.yaml | |
interval: 86400 | |
telegramcidr: | |
type: http | |
behavior: ipcidr | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/telegramcidr.txt" | |
path: ./ruleset/telegramcidr.yaml | |
interval: 86400 | |
cncidr: | |
type: http | |
behavior: ipcidr | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/cncidr.txt" | |
path: ./ruleset/cncidr.yaml | |
interval: 86400 | |
lancidr: | |
type: http | |
behavior: ipcidr | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/lancidr.txt" | |
path: ./ruleset/lancidr.yaml | |
interval: 86400 | |
applications: | |
type: http | |
behavior: classical | |
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/applications.txt" | |
path: ./ruleset/applications.yaml | |
interval: 86400 | |
rules: | |
- DOMAIN-SUFFIX,local,DIRECT | |
- 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,greatfire,PROXY | |
- RULE-SET,telegramcidr,PROXY | |
- GEOIP,CN,DIRECT | |
- GEOIP,LAN,DIRECT | |
- MATCH,DIRECT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment