# ============================================================ # Clash YAML 配置文件 (版本 6) # ============================================================ # ======================== # 代理订阅提供者 (Proxy Providers) # ======================== proxy-providers: MainSubscription: type: http url: "https://dy.47010070.xyz:8443/T3B9dgzBzdRbBF8Aqx7P/download/collection/juhe" # <--- 在这里替换您的订阅链接 interval: 86400 path: ./main_subscription.yaml health-check: enable: true url: http://www.gstatic.com/generate_204 interval: 300 # ======================== # (Proxies) # ======================== proxies: - {name: 直连, type: direct} - {name: 拒绝, type: reject} # 新增的回家 SS 节点 - name: 回家-SS type: ss server: istoreos.nanshanya.art port: 12320 cipher: aes-256-gcm password: 20010722Tqs # <-- 已移除密码的双引号 udp: true # 开启 UDP 转发,有助于内网服务发现 # ======================== # (General Settings) # ======================== port: 7890 socks-port: 7891 mixed-port: 7893 allow-lan: true mode: rule log-level: info external-controller: 0.0.0.0:9090 # ======================== # (DNS Settings) # ======================== dns: enable: true listen: 0.0.0.0:5353 ipv6: false enhanced-mode: fake-ip fake-ip-range: 198.18.0.1/16 nameserver: - 223.5.5.5 - 119.29.29.29 - 114.114.114.114 fallback: - tls://dns.google:853 - https://doh.pub/dns-query fallback-filter: geoip: true geoip-code: CN ipcidr: - 240.0.0.0/4 domain: - +.google.com # ======================== # 策略组 (Proxy Groups) # ======================== default-select-policies: &default-select-policies - 故障转移-香港 - 故障转移-台湾 - 故障转移-日本 - 故障转移-新加坡 - 故障转移-韩国 - 故障转移-美国 - 故障转移-其他地区 - 自动选择-所有节点 - 自动选择-港台日新韩 - 自动选择-台日新韩 - 直连 - 拒绝 proxy-groups: # 新增回家策略组 - name: 🏡 回家 type: select proxies: - 回家-SS - 直连 - name: 👽 AI1 # MODIFIED type: select proxies: - 住宅故障 # ADDED - 故障转移-香港 - 故障转移-台湾 - 故障转移-日本 - 故障转移-新加坡 - 故障转移-韩国 - 故障转移-美国 - 故障转移-其他地区 - 自动选择-所有节点 - 自动选择-港台日新韩 - 自动选择-台日新韩 - 直连 - 拒绝 - name: 👽 AI2 # MODIFIED type: select proxies: - 住宅故障 # ADDED - 故障转移-香港 - 故障转移-台湾 - 故障转移-日本 - 故障转移-新加坡 - 故障转移-韩国 - 故障转移-美国 - 故障转移-其他地区 - 自动选择-所有节点 - 自动选择-港台日新韩 - 自动选择-台日新韩 - 直连 - 拒绝 - name: 📘 GitHub访问 type: select proxies: *default-select-policies - name: 👯‍♂️ TikTok专用 type: select proxies: - 自动选择-TikTok优化 - 故障转移-香港 - 故障转移-台湾 - 故障转移-日本 - 故障转移-新加坡 - 故障转移-韩国 - 故障转移-美国 - 故障转移-其他地区 - 自动选择-所有节点 - 自动选择-港台日新韩 - 自动选择-台日新韩 - 直连 - 拒绝 - name: 🙋 Telegram通讯 type: select proxies: *default-select-policies - name: 📀 流媒体服务 # MODIFIED type: select proxies: - 视频故转 # ADDED - 故障转移-香港 - 故障转移-台湾 - 故障转移-日本 - 故障转移-新加坡 - 故障转移-韩国 - 故障转移-美国 - 故障转移-其他地区 - 自动选择-所有节点 - 自动选择-港台日新韩 - 自动选择-台日新韩 - 直连 - 拒绝 - name: 🎬 Emby专用 type: select use: [MainSubscription] filter: "(专线)" # 筛选出所有名称以 "专线" 开头的节点 include-all-providers: true - name: 🌍 国外网站 type: select proxies: *default-select-policies - name: ➡️ 国内直连 type: select proxies: [直连, 故障转移-香港] # --- 新增住宅节点故障转移 --- - name: 住宅故障 type: fallback proxies: - 手动选择-住宅 - 自动选择-住宅 url: http://www.gstatic.com/generate_204 interval: 300 lazy: false - name: 手动选择-住宅 type: select use: [MainSubscription] filter: "(住宅|家宽)" include-all-providers: true - name: 自动选择-住宅 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 filter: "(住宅|家宽)" # --- 新增视频节点故障转移 --- - name: 视频故转 type: fallback proxies: - 手动选择-视频 - 自动选择-视频 url: http://www.gstatic.com/generate_204 interval: 300 lazy: false - name: 手动选择-视频 type: select use: [MainSubscription] filter: "(流媒体|广告)" include-all-providers: true - name: 自动选择-视频 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 filter: "(流媒体|广告)" - name: 故障转移-香港 type: fallback proxies: - 手动选择-香港 - 自动选择-香港 url: http://www.gstatic.com/generate_204 interval: 300 lazy: false - name: 手动选择-香港 type: select use: [MainSubscription] filter: "(广港|香港|HK|Hong Kong|🇭🇰|HongKong)" include-all-providers: true - name: 自动选择-香港 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 filter: "(广港|香港|HK|Hong Kong|🇭🇰|HongKong)" - name: 故障转移-台湾 type: fallback proxies: - 手动选择-台湾 - 自动选择-台湾 - 自动选择-牛逼台湾 url: http://www.gstatic.com/generate_204 interval: 300 lazy: false - name: 手动选择-台湾 type: select use: [MainSubscription] filter: "(广台|台湾|台灣|TW|Tai Wan|🇹🇼|🇨🇳|TaiWan|Taiwan)" include-all-providers: true - name: 自动选择-台湾 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 filter: "(广台|台湾|台灣|TW|Tai Wan|🇹🇼|🇨🇳|TaiWan|Taiwan)" - name: 故障转移-日本 type: fallback proxies: - 手动选择-日本 - 自动选择-日本 url: http://www.gstatic.com/generate_204 interval: 300 lazy: false - name: 手动选择-日本 type: select use: [MainSubscription] filter: "(广日|日本|JP|川日|东京|大阪|泉日|埼玉|沪日|深日|🇯🇵|Japan)" include-all-providers: true - name: 自动选择-日本 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 filter: "(广日|日本|JP|川日|东京|大阪|泉日|埼玉|沪日|深日|🇯🇵|Japan)" - name: 故障转移-新加坡 type: fallback proxies: - 手动选择-新加坡 - 自动选择-新加坡 url: http://www.gstatic.com/generate_204 interval: 300 lazy: false - name: 手动选择-新加坡 type: select use: [MainSubscription] filter: "(广新|新加坡|SG|坡|狮城|🇸🇬|Singapore)" include-all-providers: true - name: 自动选择-新加坡 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 filter: "(广新|新加坡|SG|坡|狮城|🇸🇬|Singapore)" - name: 故障转移-韩国 type: fallback proxies: - 手动选择-韩国 - 自动选择-韩国 url: http://www.gstatic.com/generate_204 interval: 300 lazy: false - name: 手动选择-韩国 type: select use: [MainSubscription] filter: "(广韩|韩国|韓國|KR|首尔|春川|🇰🇷|Korea)" include-all-providers: true - name: 自动选择-韩国 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 filter: "(广韩|韩国|韓國|KR|首尔|春川|🇰🇷|Korea)" - name: 故障转移-美国 type: fallback proxies: - 手动选择-美国 - 自动选择-美国 url: http://www.gstatic.com/generate_204 interval: 300 lazy: false - name: 手动选择-美国 type: select use: [MainSubscription] filter: "(广美|美|US|纽约|波特兰|达拉斯|俄勒|凤凰城|费利蒙|硅谷|拉斯|洛杉|圣何塞|圣克拉|西雅|芝加|🇺🇸|United States)" include-all-providers: true - name: 自动选择-美国 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 filter: "(广美|美|US|纽约|波特兰|达拉斯|俄勒|凤凰城|费利蒙|硅谷|拉斯|洛杉|圣何塞|圣克拉|西雅|芝加|🇺🇸|United States)" - name: 故障转移-其他地区 type: fallback proxies: - 手动选择-其他地区 - 自动选择-其他地区 url: http://www.gstatic.com/generate_204 interval: 300 lazy: false - name: 手动选择-其他地区 type: select use: [MainSubscription] filter: "(波|柬|尼|也|克|比|尔|立|冰|秘|耳|利|埃|希|孟|芬|愛|澳|英|德|南|意|法|拿|墨|印|越|俄|瑞|智|荷|比|巴|沙|班|泰|德|烏|以|Australia|Konghwaguk)" include-all-providers: true - name: 自动选择-其他地区 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 filter: "(波|柬|尼|也|克|比|尔|立|冰|秘|耳|利|埃|希|孟|芬|愛|澳|英|德|南|意|法|拿|墨|印|越|俄|瑞|智|荷|比|巴|沙|班|泰|德|烏|以|Australia|Konghwagguk)" - name: 自动选择-所有节点 type: url-test use: [MainSubscription] url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 include-all-providers: true - name: 自动选择-港台日新韩 type: url-test use: [MainSubscription] filter: "(广港|广台|广日|广新|广韩|香港|HK|Hong Kong|🇭🇰|HongKong|台湾|TW|Tai Wan|🇹🇼|🇨🇳|TaiWan|Taiwan|日本|JP|川日|东京|大阪|泉日|埼玉|沪日|深日|🇯🇵|Japan|新加坡|SG|坡|狮城|🇸🇬|Singapore|韩国|KR|首尔|春川|🇰🇷|Korea)" url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 include-all-providers: true - name: 自动选择-台日新韩 type: url-test use: [MainSubscription] filter: "(广台|广日|广新|广韩|台湾|TW|Tai Wan|🇹🇼|🇨🇳|TaiWan|Taiwan|日本|JP|川日|东京|大阪|泉日|埼玉|沪日|深日|🇯🇵|Japan|新加坡|SG|坡|狮城|🇸🇬|Singapore|韩国|KR|首尔|春川|🇰🇷|Korea)" url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 include-all-providers: true - name: 自动选择-牛逼台湾 type: url-test use: [MainSubscription] filter: "牛逼 \\| 台湾 0[1-6]" url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 include-all-providers: true - name: 自动选择-TikTok优化 type: url-test use: [MainSubscription] filter: "(TikTok|抖音|US TikTok)" url: http://www.gstatic.com/generate_204 interval: 600 tolerance: 150 include-all-providers: true # ======================== # (Rule Providers) # ======================== rule-provider-types: text-classical: &text-classical type: http behavior: classical format: text interval: 86400 rule-providers: RuleAI1: {<<: *text-classical, url: "https://raw.githubusercontent.com/1664666655/clash/refs/heads/main/list/AI.list"} RuleAI2: {<<: *text-classical, url: "https://raw.githubusercontent.com/1664666655/clash/refs/heads/main/list/AI2.list"} RuleGitHub: {<<: *text-classical, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/GitHub/GitHub.list"} RuleTikTok: {<<: *text-classical, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/TikTok/TikTok.list"} RuleTelegram: {<<: *text-classical, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Telegram/Telegram.list"} RuleStreamingGeneral: {<<: *text-classical, url: "https://raw.githubusercontent.com/liandu2024/clash/refs/heads/main/list/YouTube.list"} RuleYouTube: {<<: *text-classical, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/YouTube/YouTube.list"} RuleHBO: {<<: *text-classical, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/HBO/HBO.list"} RuleDisney: {<<: *text-classical, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Disney/Disney.list"} RuleNetflix: {<<: *text-classical, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Netflix/Netflix.list"} RuleSpotify: {<<: *text-classical, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Spotify/Spotify.list"} RuleSpringLoading: {<<: *text-classical, url: "https://raw.githubusercontent.com/1664666655/clash/refs/heads/main/list/sping.list"} RuleForeignCheck: {<<: *text-classical, url: "https://raw.githubusercontent.com/liandu2024/clash/refs/heads/main/list/Check.list"} RuleForeignProxy: {<<: *text-classical, url: "https://raw.githubusercontent.com/liandu2024/clash/refs/heads/main/list/Proxy.list"} RuleForeignGlobal: {<<: *text-classical, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/rule/Clash/Global/Global.list"} RuleGeositeCN: {type: http, behavior: domain, format: text, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cn.txt", interval: 86400} RuleGeoIPCN: {type: http, behavior: ipcidr, format: text, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/cn.txt", interval: 86400} RulePrivateNetwork: {type: http, behavior: domain, format: text, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/private.txt", interval: 86400} # ======================== # 规则引擎 (Rules Engine) # ======================== rules: # 新增回家规则,确保这条在最前面 - IP-CIDR,192.168.9.0/24,🏡 回家 - DOMAIN,nanshanya.xyz,➡️ 国内直连 - DOMAIN,nanshanya.art,➡️ 国内直连 - DOMAIN,47010070.xyz,➡️ 国内直连 - DOMAIN,sunpanel.nanshanya.art,➡️ 国内直连 - DOMAIN-SUFFIX,cf.yunti.online,🎬 Emby专用 - RULE-SET,RuleAI1,👽 AI1 - RULE-SET,RuleAI2,👽 AI2 - RULE-SET,RuleGitHub,📘 GitHub访问 - RULE-SET,RuleTikTok,👯‍♂️ TikTok专用 - RULE-SET,RuleTelegram,🙋 Telegram通讯 - RULE-SET,RuleStreamingGeneral,📀 流媒体服务 - RULE-SET,RuleYouTube,📀 流媒体服务 - RULE-SET,RuleHBO,📀 流媒体服务 - RULE-SET,RuleDisney,📀 流媒体服务 - RULE-SET,RuleNetflix,📀 流媒体服务 - RULE-SET,RuleSpotify,📀 流媒体服务 - RULE-SET,RuleSpringLoading,📀 流媒体服务 - RULE-SET,RuleForeignCheck,🌍 国外网站 - RULE-SET,RuleForeignProxy,🌍 国外网站 - RULE-SET,RuleForeignGlobal,🌍 国外网站 - RULE-SET,RuleGeositeCN,➡️ 国内直连 - RULE-SET,RuleGeoIPCN,➡️ 国内直连,no-resolve - RULE-SET,RulePrivateNetwork,➡️ 国内直连 - DOMAIN-SUFFIX,local,➡️ 国内直连 - IP-CIDR,192.168.0.0/16,➡️ 国内直连,no-resolve - IP-CIDR,10.0.0.0/8,➡️ 国内直连,no-resolve - IP-CIDR,172.16.0.0/12,➡️ 国内直连,no-resolve - IP-CIDR,127.0.0.0/8,➡️ 国内直连,no-resolve - IP-CIDR,198.18.0.0/16,➡️ 国内直连,no-resolve - GEOIP,CN,➡️ 国内直连 - MATCH,🌍 国外网站