Last active
April 29, 2025 09:14
-
-
Save dubiao/b2ef6ed9364c01c2c1a9a25488432fe8 to your computer and use it in GitHub Desktop.
自用的 clash 配置。把 25 行那里换成 自己的订阅地址。
This file contains hidden or 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
| mixed-port: 7890 | |
| #---------------------------------------------------# | |
| ## 配置文件需要放置在 $HOME/.config/clash/*.yaml | |
| allow-lan: false | |
| mode: Rule | |
| log-level: info | |
| external-controller: '127.0.0.1:9090' | |
| dns: | |
| enable: true | |
| ipv6: true | |
| default-nameserver: [223.5.5.5, 119.29.29.29] | |
| enhanced-mode: fake-ip | |
| fake-ip-range: 198.18.0.1/16 | |
| use-hosts: true | |
| nameserver: ['https://doh.pub/dns-query', 'https://dns.alidns.com/dns-query'] | |
| fallback: ['https://doh.dns.sb/dns-query', 'https://dns.cloudflare.com/dns-query', 'https://dns.twnic.tw/dns-query', 'tls://8.8.4.4:853'] | |
| fallback-filter: { geoip: true, ipcidr: [240.0.0.0/4, 0.0.0.0/32] } | |
| # 节点配置文件统一存放在 ./profiles/proxies/ 目录中 | |
| proxy-providers: | |
| # 从链接导入的配置文件 | |
| foo: | |
| type: http | |
| path: ./配置名称.yaml | |
| url: https://baidu.com/ | |
| interval: 3600 | |
| health-check: | |
| enable: true | |
| url: http://www.gstatic.com/generate_204 | |
| interval: 300 | |
| proxy-groups: | |
| - name: 🚀 节点选择 | |
| type: select | |
| use: | |
| - foo | |
| filter: "^(?!.*(流量|到期|官网)).*" | |
| proxies: | |
| - DIRECT | |
| - ♻️ 自动选择 | |
| - 🇺🇸🇯🇵🇰🇷 美日韩 | |
| - 🇺🇸 美国 | |
| - 🇸🇬 新加坡 | |
| - 🇯🇵 日本 | |
| - 🇰🇷 韩国 | |
| - 🇭🇰 香港 | |
| - name: ♻️ 自动选择 | |
| type: url-test | |
| url: http://www.gstatic.com/generate_204 | |
| interval: 300 | |
| tolerance: 50 | |
| use: | |
| - foo | |
| filter: "^(?!.*(朝鲜|流量|到期|官网)).*" | |
| - name: 🐟 漏网之鱼 | |
| type: select | |
| use: | |
| - foo | |
| proxies: | |
| - DIRECT | |
| - ♻️ 自动选择 | |
| - 🚀 节点选择 | |
| - name: 🇺🇸 美国 | |
| type: select | |
| use: | |
| - foo | |
| filter: "(🇺🇲|🇺🇸|美国)" | |
| proxies: | |
| - 🇺🇸 美国(自动) | |
| - name: 🇸🇬 新加坡 | |
| type: select | |
| use: | |
| - foo | |
| filter: "(🇸🇬|新加坡)" | |
| proxies: | |
| - 🇸🇬 新加坡(自动) | |
| - name: 🇯🇵 日本 | |
| type: select | |
| use: | |
| - foo | |
| filter: "(🇯🇵|日本)" | |
| proxies: | |
| - 🇯🇵 日本(自动) | |
| - name: 🇰🇷 韩国 | |
| type: select | |
| use: | |
| - foo | |
| filter: "(🇰🇷|韩国)" | |
| proxies: | |
| - 🇰🇷 韩国(自动) | |
| - name: 🇭🇰 香港 | |
| type: select | |
| use: | |
| - foo | |
| filter: "(🇭🇰|香港)" | |
| proxies: | |
| - 🇭🇰 香港(自动) | |
| - name: 🇺🇸 美国(自动) | |
| type: url-test | |
| url: http://www.gstatic.com/generate_204 | |
| interval: 300 | |
| tolerance: 50 | |
| use: | |
| - foo | |
| filter: "(🇺🇲|🇺🇸|美国)" | |
| - name: 🇸🇬 新加坡(自动) | |
| type: url-test | |
| url: http://www.gstatic.com/generate_204 | |
| interval: 300 | |
| tolerance: 50 | |
| use: | |
| - foo | |
| filter: "(🇸🇬|新加坡)" | |
| - name: 🇯🇵 日本(自动) | |
| type: url-test | |
| url: http://www.gstatic.com/generate_204 | |
| interval: 300 | |
| tolerance: 50 | |
| use: | |
| - foo | |
| filter: "(🇯🇵|日本)" | |
| - name: 🇰🇷 韩国(自动) | |
| type: url-test | |
| url: http://www.gstatic.com/generate_204 | |
| interval: 300 | |
| tolerance: 50 | |
| use: | |
| - foo | |
| filter: "(🇰🇷|韩国)" | |
| - name: 🇭🇰 香港(自动) | |
| type: url-test | |
| url: http://www.gstatic.com/generate_204 | |
| interval: 300 | |
| tolerance: 50 | |
| use: | |
| - foo | |
| filter: "(🇭🇰|香港)" | |
| - name: 🇺🇸🇯🇵🇰🇷 美日韩 | |
| type: select | |
| use: | |
| - foo | |
| filter: "(🇺🇲|🇺🇸|🇯🇵|🇰🇷)" | |
| proxies: | |
| - 🇯🇵 日本(自动) | |
| - 🇺🇸 美国(自动) | |
| # clash-rules项目提供的规则集 | |
| # 规则文件统一存放在 ./ruleset/ 目录中 | |
| 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 | |
| greatfire: | |
| type: http | |
| behavior: domain | |
| url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/greatfire.txt" | |
| path: ./ruleset/greatfire.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 | |
| BanAD: | |
| behavior: classical | |
| type: http | |
| url: "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/Providers/BanAD.yaml" | |
| interval: 86400 | |
| path: ./ruleset/BanAD.yaml | |
| tiktok: | |
| behavior: classical | |
| type: http | |
| url: "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/Providers/Ruleset/TikTok.yaml" | |
| interval: 86400 | |
| path: ./ruleset/TikTok.yaml | |
| discord: | |
| behavior: classical | |
| type: http | |
| url: "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/Providers/Ruleset/Discord.yaml" | |
| interval: 86400 | |
| path: ./ruleset/Discord.yaml | |
| OpenAI: | |
| type: http | |
| behavior: classical | |
| url: https://ghproxy.net/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/OpenAI/OpenAI.yaml | |
| path: ./ruleset/rule-provider_OpenAI.yaml | |
| interval: 86400 | |
| Claude: | |
| type: http | |
| behavior: classical | |
| url: https://ghproxy.net/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Claude/Claude.yaml | |
| path: ./ruleset/rule-provider_Claude.yaml | |
| interval: 86400 | |
| BardAI: | |
| type: http | |
| behavior: classical | |
| url: https://ghproxy.net/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/BardAI/BardAI.yaml | |
| path: ./ruleset/rule-provider_BardAI.yaml | |
| interval: 86400 | |
| cncompany: | |
| type: http | |
| behavior: ipcidr | |
| # url: "http://localhost:8000/Clash/Providers/ChinaCompanyIp.yaml" | |
| url: "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/Providers/ChinaCompanyIp.yaml" | |
| path: ./ruleset/ChinaCompanyIp.yaml | |
| interval: 86400 | |
| proxygwflist: | |
| type: http | |
| behavior: classical | |
| # url: "http://localhost:8000/Clash/Providers/ProxyGFWlist.yaml" | |
| url: "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/Providers/ProxyGFWlist.yaml" | |
| path: ./ruleset/ProxyGFWlist.yaml | |
| interval: 86400 | |
| proxylite: | |
| type: http | |
| behavior: classical | |
| # url: "http://localhost:8000/Clash/Providers/ProxyLite.yaml" | |
| url: "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/Providers/ProxyLite.yaml" | |
| path: ./ruleset/ProxyLite.yaml | |
| interval: 86400 | |
| my_proxy: | |
| type: file | |
| behavior: classical | |
| path: ./ruleset/my_proxy.yaml | |
| # 规则 | |
| rules: | |
| ## 这里写一些额外的配置。 | |
| - DOMAIN-SUFFIX,snapdrop.net,DIRECT | |
| - DOMAIN-SUFFIX,dropfile.at,DIRECT | |
| - DOMAIN-SUFFIX,pairdrop.net,DIRECT | |
| - DOMAIN-SUFFIX,jsdelivr.net,🚀 节点选择 | |
| - DOMAIN,clash.razord.top,DIRECT | |
| - DOMAIN,yacd.haishan.me,DIRECT | |
| ## 额外的配置也可以写到 my_proxy 里。 | |
| - RULE-SET,my_proxy,🚀 节点选择 | |
| ## 以下是个人使用的最佳实践 | |
| - RULE-SET,applications,DIRECT | |
| - RULE-SET,lancidr,DIRECT | |
| ## AI 相关的都走美日韩国 | |
| - RULE-SET,OpenAI,🇺🇸 美国 | |
| - RULE-SET,Claude,🇺🇸 美国 | |
| - RULE-SET,BardAI,🇺🇸 美国 | |
| - RULE-SET,private,DIRECT | |
| - RULE-SET,reject,REJECT | |
| - RULE-SET,BanAD,REJECT | |
| - RULE-SET,direct,DIRECT | |
| - RULE-SET,icloud,DIRECT | |
| - RULE-SET,apple,DIRECT | |
| - RULE-SET,google,DIRECT | |
| - RULE-SET,proxy,🚀 节点选择 | |
| - RULE-SET,proxylite,🚀 节点选择 | |
| - RULE-SET,proxygwflist,🚀 节点选择 | |
| - RULE-SET,telegramcidr,🚀 节点选择 | |
| - RULE-SET,tiktok,🚀 节点选择 | |
| - RULE-SET,discord,🚀 节点选择 | |
| - RULE-SET,telegramcidr,🚀 节点选择 | |
| - GEOIP,LAN,DIRECT | |
| - GEOIP,CN,DIRECT | |
| - MATCH,🐟 漏网之鱼 |
This file contains hidden or 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
| ## 这里写一些额外的需要走代理的配置。 | |
| payload: | |
| - DOMAIN-SUFFIX,bing.com |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://clashxpro.org/clashx-pro-download/
这个地址下载到的是 v1.97.0.4
此软件已不再更新。