diff --git a/config_yml.yaml b/config_yml.yaml index ee35328..d2bdc8d 100644 --- a/config_yml.yaml +++ b/config_yml.yaml @@ -19,15 +19,15 @@ sniffer: # =============================== 机场订阅 =============================== active-subs: &u_s - use: [机场01, 机场02] # 主力节点池 + use: [机场01, 机场02] all-nodes: &u - use: [机场01, 机场02, 机场03_备用] # 全部节点池 + use: [机场01, 机场02, 机场03_备用] backup-subs: &u_b - use: [机场03_备用] # 容灾备用池 + use: [机场03_备用] filter: "(?i)(香港|hk|🇭🇰|hong\\s?kong|台湾|tw|🇹🇼|taiwan|新北|台中|台北|新加坡|狮城|sg|singapore|日本|东京|大阪|jp|japan|美国|us|united\\s?states|america|usa|英国|uk|united\\s?kingdom|德国|de|germany|韩国|kr|korea|荷兰|nl|netherlands)" exclude-filter: "(?i)(DIRECT|Proxy|Traffic|Expire|Expired|过期|剩余|流量|官网|超时|timeout|失效|Invalid|Test|测速|本地|Local|重置|套餐|建议|地址|更新)" -# =============================== 订阅提供者 =============================== +# =============================== 订阅提供者(机场 URL 已填写)=============================== p-common: &p-common type: http udp: true @@ -36,27 +36,39 @@ p-common: &p-common health-check: { enable: true, url: "http://www.gstatic.com/generate_204", interval: 600 } proxy-providers: 机场01: - url: "https://au.qdvlqe.cn/NTIxMjc6NmVhZThjMmI5NDU5/NmZlNTI3NGExODU5NThlODhi/NGYxODdlZjFkNDVkMWVkMWFm/ZDlhZjFjYmJjM2MzZGZlMw" - path: ./proxy_provider/sub1.yaml - <<: *p-common + type: http + udp: true + interval: 86400 + proxy: DIRECT + health-check: { enable: true, url: "http://www.gstatic.com/generate_204", interval: 600 } filter: "^(?!(.*流量|.*10x|.*6x|.*重置|.*到期|.*建议|.*官网|.*Expire|.*套餐|.*备用|.*线路|.*软件|.*地址|.*更新)).*$" override: { additional-prefix: "p1 » " } + path: ./proxy_provider/sub1.yaml + url: "https://au.qdvlqe.cn/NTIxMjc6NmVhZThjMmI5NDU5/NmZlNTI3NGExODU5NThlODhi/NGYxODdlZjFkNDVkMWVkMWFm/ZDlhZjFjYmJjM2MzZGZlMw" # ←←←←← 订阅 URL 已填写 机场02: - url: "https://dy-2.xn--30rs3bu7r87f.com/csjc/api/v1/client/subscribe?token=a62ab7727142e1ff0320892c4628deda" - path: ./proxy_provider/sub2.yaml - <<: *p-common + type: http + udp: true + interval: 86400 + proxy: DIRECT + health-check: { enable: true, url: "http://www.gstatic.com/generate_204", interval: 600 } filter: "^(?!(.*流量|.*10x|.*6x|.*重置|.*到期|.*建议|.*官网|.*Expire|.*套餐|.*地址|.*更新)).*$" override: { additional-prefix: "p2 » " } + path: ./proxy_provider/sub2.yaml + url: "https://dy-2.xn--30rs3bu7r87f.com/csjc/api/v1/client/subscribe?token=a62ab7727142e1ff0320892c4628deda" # ←←←←← 订阅 URL 已填写 机场03_备用: - url: "https://sub.huxxxxx" - path: ./proxy_provider/sub3.yaml - <<: *p-common + type: http + udp: true + interval: 86400 + proxy: DIRECT + health-check: { enable: true, url: "http://www.gstatic.com/generate_204", interval: 600 } filter: "^(?!(.*流量|.*10x|.*6x|.*重置|.*到期|.*建议|.*官网|.*Expire|.*套餐|.*地址|.*更新)).*$" override: { additional-prefix: "p3_备用 » " } + path: ./proxy_provider/sub3.yaml + url: "https://sub.huxxxxx" # ←←←←← 订阅 URL 已填写 # =============================== 规则集(苹果直连)=============================== rule-providers: - apple_domain: { <<: *yaml, path: ./ruleset/apple_domain.mrs, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Apple/Apple_Domain.yaml", behavior: domain, format: mrs } + apple_domain: { type: http, interval: 86400, behavior: domain, format: mrs, path: ./ruleset/apple_domain.mrs, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Apple/Apple_Domain.yaml" } # =============================== 节点信息 =============================== proxies: [] @@ -67,10 +79,10 @@ dns: ipv6: true listen: 0.0.0.0:1053 prefer-h3: false - respect-rules: false # 关键!改为 false,让 DNS 直连优先 + respect-rules: false cache-algorithm: arc cache-size: 2048 - use-hosts: true # 推荐开启 + use-hosts: true use-system-hosts: true enhanced-mode: fake-ip fake-ip-range: 198.18.0.1/16 @@ -107,7 +119,6 @@ dns: # =============================== 代理组设置 =============================== proxy-groups: - # --- 1. 核心策略组 --- - name: 节点选择 type: select proxies: @@ -121,22 +132,19 @@ proxy-groups: - 全部节点 - 故障转移 - DIRECT - - 苹果直连 # 新增:手动选择也支持苹果直连 + - 苹果直连 icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Proxy.png" - name: 自动选择 - type: url-test - <<: *u_s - url: http://www.gstatic.com/generate_204 + type: url-test interval: 300 tolerance: 50 + url: http://www.gstatic.com/generate_204 icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/icon/color/urltest.png" - name: 故障转移 - type: fallback - <<: *u_b - url: http://www.gstatic.com/generate_204 + type: fallback interval: 300 + url: http://www.gstatic.com/generate_204 icon: "https://is1-ssl.mzstatic.com/image/thumb/Purple123/v4/77/7e/5a/777e5a23-cdcc-07e3-bac6-e691fa413307/AppIconok-0-0-1x_U007emarketing-0-0-0-10-0-85-220.png/400x400ia-75.webp" - # --- 2. AI 专项策略组 --- - name: AI type: select proxies: @@ -166,21 +174,18 @@ proxy-groups: type: select proxies: [节点选择, 自动选择, 美国自动, 新加坡自动, 香港自动] icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/YouTube.png" - # --- 4. 地区优选组 --- - - { name: 香港自动, type: url-test, <<: *u_s, tolerance: 50, interval: 300, filter: "(?i)(香港|hk|🇭🇰|hong\\s?kong)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/auto.png" } - - { name: 台湾自动, type: url-test, <<: *u_s, tolerance: 50, interval: 300, filter: "(?i)(台湾|tw|🇹🇼|taiwan|新北|台中|台北)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Taiwan.png" } - - { name: 新加坡自动, type: url-test, <<: *u_s, tolerance: 50, interval: 300, filter: "(?i)(🇸🇬|新加坡|狮城|SG|Singapore)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/auto.png" } - - { name: 日本自动, type: url-test, <<: *u_s, tolerance: 50, interval: 300, filter: "(?i)(🇯🇵|日本|东京|大阪|JP|Japan)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/auto.png" } - - { name: 美国自动, type: url-test, <<: *u_s, tolerance: 50, interval: 300, filter: "(?i)(🇺🇸|美国|US|united\\s?states|america|usa)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/auto.png" } - # --- 5. 地区节点组 --- - - { name: 香港节点, type: select, <<: *u, include-all: true, filter: "(?i)(香港|hk|🇭🇰|hong\\s?kong)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Hong_Kong.png" } - - { name: 台湾节点, type: select, <<: *u, include-all: true, filter: "(?i)(台湾|tw|🇹🇼|taiwan)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Taiwan.png" } - - { name: 新加坡节点, type: select, <<: *u, include-all: true, filter: "(?i)(🇸🇬|新加坡|狮城|SG|Singapore)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Singapore.png" } - - { name: 日本节点, type: select, <<: *u, include-all: true, filter: "(?i)(🇯🇵|日本|东京|JP|japan)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Japan.png" } - - { name: 美国节点, type: select, <<: *u, include-all: true, filter: "(?i)(🇺🇸|美国|US|united\\s?states|america|usa)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/United_States.png" } - - { name: 全部节点, type: select, <<: *u, include-all: true, filter: "(?i)^((?!(DIRECT|Proxy|Traffic|Expire|Expired|过期|剩余|流量|官网|超时|timeout|失效|Invalid|Test|测速|本地|Local)).)*$", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/World_Map.png" } + - { name: 香港自动, type: url-test, interval: 300, tolerance: 50, filter: "(?i)(香港|hk|🇭🇰|hong\\s?kong)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/auto.png" } + - { name: 台湾自动, type: url-test, interval: 300, tolerance: 50, filter: "(?i)(台湾|tw|🇹🇼|taiwan|新北|台中|台北)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Taiwan.png" } + - { name: 新加坡自动, type: url-test, interval: 300, tolerance: 50, filter: "(?i)(🇸🇬|新加坡|狮城|SG|Singapore)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/auto.png" } + - { name: 日本自动, type: url-test, interval: 300, tolerance: 50, filter: "(?i)(🇯🇵|日本|东京|大阪|JP|Japan)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/auto.png" } + - { name: 美国自动, type: url-test, interval: 300, tolerance: 50, filter: "(?i)(🇺🇸|美国|US|united\\s?states|america|usa)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/auto.png" } + - { name: 香港节点, type: select, include-all: true, filter: "(?i)(香港|hk|🇭🇰|hong\\s?kong)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Hong_Kong.png" } + - { name: 台湾节点, type: select, include-all: true, filter: "(?i)(台湾|tw|🇹🇼|taiwan)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Taiwan.png" } + - { name: 新加坡节点, type: select, include-all: true, filter: "(?i)(🇸🇬|新加坡|狮城|SG|Singapore)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Singapore.png" } + - { name: 日本节点, type: select, include-all: true, filter: "(?i)(🇯🇵|日本|东京|JP|japan)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Japan.png" } + - { name: 美国节点, type: select, include-all: true, filter: "(?i)(🇺🇸|美国|US|united\\s?states|america|usa)", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/United_States.png" } + - { name: 全部节点, type: select, include-all: true, filter: "(?i)^((?!(DIRECT|Proxy|Traffic|Expire|Expired|过期|剩余|流量|官网|超时|timeout|失效|Invalid|Test|测速|本地|Local)).)*$", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/World_Map.png" } - { name: 漏网之鱼, type: select, proxies: [节点选择, 自动选择, DIRECT], icon: "https://testingcf.jsdelivr.net/gh/aihdde/Rules@master/icon/fish.png" } - # --- 苹果直连组(新增)--- - name: 苹果直连 type: select proxies: @@ -192,15 +197,10 @@ proxy-groups: # =============================== 规则设置 =============================== rules: - # --- 苹果直连(已存在)--- - RULE-SET,apple_domain,苹果直连,no-resolve - - # --- 优化规则(新增,提前拦截常见直连/广告,提升匹配速度)--- - DOMAIN-SUFFIX,baidu.com,DIRECT - RULE-SET,AWAvenue_Ads_Rule,REJECT - - DOMAIN-SUFFIX,apple.com,苹果直连 # 额外加强苹果直连 - - # --- 1. 自定义新增与广告规则 --- + - DOMAIN-SUFFIX,apple.com,苹果直连 - DOMAIN-SUFFIX,lilililwan.xyz,DIRECT - DOMAIN-SUFFIX,opencode.ai,DIRECT - DOMAIN-SUFFIX,sky1818.com,新加坡节点 @@ -208,13 +208,11 @@ rules: - DOMAIN-SUFFIX,51688.qzz.io,美国节点 - DOMAIN-SUFFIX,hybgzs.com,DIRECT - DOMAIN-SUFFIX,baidu.com,DIRECT - - DOMAIN-SUFFIX,krill-ai.net,DIRECT  + - DOMAIN-SUFFIX,krill-ai.net,DIRECT - RULE-SET,AWAvenue_Ads_Rule,REJECT - # --- 2. Google AISTudio 规则 --- - DOMAIN-SUFFIX,aistudio.google.com,AISTudio - DOMAIN-KEYWORD,aistudio,AISTudio - DOMAIN-KEYWORD,generativeai,AISTudio - # --- 3. OpenAI 规则 --- - DOMAIN-SUFFIX,chat.openai.com,OpenAI - DOMAIN-SUFFIX,openai.com,OpenAI - DOMAIN-SUFFIX,chatgpt.com,OpenAI @@ -222,40 +220,31 @@ rules: - DOMAIN-SUFFIX,oaiusercontent.com,OpenAI - DOMAIN-KEYWORD,openai,OpenAI - DOMAIN-KEYWORD,chatgpt,OpenAI - # --- 4. AI 通用兜底 --- - RULE-SET,ai,AI - # --- 5. 媒体专项 --- - RULE-SET,youtube_domain,YouTube - RULE-SET,disney_domain,节点选择 - # --- 6. Google 专项规则 --- - RULE-SET,google_domain,美国自动 - # --- 7. IP 专项与直连规则 --- - RULE-SET,telegram_ip,自动选择,no-resolve - RULE-SET,geoip_cloudflare,节点选择,no-resolve - RULE-SET,cn_domain,DIRECT - RULE-SET,GeositeCN_Domain,DIRECT - GEOIP,cn,DIRECT - # --- 8. 通用兜底规则 --- - RULE-SET,gfw_domain,节点选择 - RULE-SET,proxy,节点选择 - MATCH,漏网之鱼 # =============================== 规则提供者 =============================== -rule-anchor: - ip: &ip { type: http, interval: 86400, behavior: ipcidr, format: mrs } - domain: &domain { type: http, interval: 86400, behavior: domain, format: mrs } - yaml: &yaml { type: http, interval: 86400, behavior: domain, format: yaml } rule-providers: - AWAvenue_Ads_Rule: { <<: *yaml, path: ./ruleset/ads.yaml, url: "https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main//Filters/AWAvenue-Ads-Rule-Clash.yaml" } - GeositeCN_Domain: { type: 'http', behavior: 'domain', format: 'yaml', url: 'https://cdn.jsdelivr.net/gh/Accademia/Additional_Rule_For_Clash@latest/GeositeCN/GeositeCN_Domain.yaml', path: './ruleset/GeositeCN_Domain.yaml' } - cn_domain: { type: 'http', behavior: 'domain', format: 'yaml', url: 'https://cdn.jsdelivr.net/gh/Accademia/Additional_Rule_For_Clash@latest/ChinaMax/ChinaMax_Domain.yaml', path: './ruleset/ChinaMax_Domain.yaml' }  - fake_ip_filter_DustinWin: { <<: *domain, path: ./ruleset/fake_ip_filter_DustinWin.mrs, url: "https://github.com/DustinWin/ruleset_geodata/releases/download/mihomo-ruleset/fakeip-filter.mrs" }   - private_domain: { <<: *domain, path: ./ruleset/private_domain.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/private.mrs" } - gfw_domain: { <<: *domain, path: ./ruleset/gfw_domain.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/gfw.mrs" } - ai: { <<: *domain, path: ./ruleset/ai.mrs, url: "https://github.com/DustinWin/ruleset_geodata/releases/download/mihomo-ruleset/ai.mrs" } - youtube_domain: { <<: *domain, path: ./ruleset/youtube.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/youtube.mrs" } - disney_domain: { <<: *domain, path: ./ruleset/disney.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/disney.mrs" } - telegram_ip: { <<: *ip, path: ./ruleset/tg_ip.mrs, url: "https://github.com/DustinWin/ruleset_geodata/raw/refs/heads/mihomo-ruleset/telegramip.mrs" } - proxy: { <<: *domain, path: ./ruleset/proxy.mrs, url: "https://github.com/DustinWin/ruleset_geodata/releases/download/mihomo-ruleset/proxy.mrs" } - geoip_cloudflare: { <<: *ip, path: ./ruleset/cf_ip.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/raw/refs/heads/meta/geo/geoip/cloudflare.mrs" } - google_domain: { <<: *domain, path: ./ruleset/google.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/google.mrs" } \ No newline at end of file + AWAvenue_Ads_Rule: { type: http, interval: 86400, behavior: domain, format: yaml, path: ./ruleset/ads.yaml, url: "https://raw.githubusercontent.com/TG-Twilight/AWAvenue-Ads-Rule/main//Filters/AWAvenue-Ads-Rule-Clash.yaml" } + GeositeCN_Domain: { type: http, behavior: domain, format: yaml, url: 'https://cdn.jsdelivr.net/gh/Accademia/Additional_Rule_For_Clash@latest/GeositeCN/GeositeCN_Domain.yaml', path: './ruleset/GeositeCN_Domain.yaml' } + cn_domain: { type: http, behavior: domain, format: yaml, url: 'https://cdn.jsdelivr.net/gh/Accademia/Additional_Rule_For_Clash@latest/ChinaMax/ChinaMax_Domain.yaml', path: './ruleset/ChinaMax_Domain.yaml' } + fake_ip_filter_DustinWin: { type: http, behavior: domain, format: mrs, path: ./ruleset/fake_ip_filter_DustinWin.mrs, url: "https://github.com/DustinWin/ruleset_geodata/releases/download/mihomo-ruleset/fakeip-filter.mrs" } + private_domain: { type: http, behavior: domain, format: mrs, path: ./ruleset/private_domain.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/private.mrs" } + gfw_domain: { type: http, behavior: domain, format: mrs, path: ./ruleset/gfw_domain.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/gfw.mrs" } + ai: { type: http, behavior: domain, format: mrs, path: ./ruleset/ai.mrs, url: "https://github.com/DustinWin/ruleset_geodata/releases/download/mihomo-ruleset/ai.mrs" } + youtube_domain: { type: http, behavior: domain, format: mrs, path: ./ruleset/youtube.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/youtube.mrs" } + disney_domain: { type: http, behavior: domain, format: mrs, path: ./ruleset/disney.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/disney.mrs" } + telegram_ip: { type: http, behavior: ipcidr, format: mrs, path: ./ruleset/tg_ip.mrs, url: "https://github.com/DustinWin/ruleset_geodata/raw/refs/heads/mihomo-ruleset/telegramip.mrs" } + proxy: { type: http, behavior: domain, format: mrs, path: ./ruleset/proxy.mrs, url: "https://github.com/DustinWin/ruleset_geodata/releases/download/mihomo-ruleset/proxy.mrs" } + geoip_cloudflare: { type: http, behavior: ipcidr, format: mrs, path: ./ruleset/cf_ip.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/raw/refs/heads/meta/geo/geoip/cloudflare.mrs" } + google_domain: { type: http, behavior: domain, format: mrs, path: ./ruleset/google.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/google.mrs" } \ No newline at end of file