添加 config_yml.yaml

This commit is contained in:
yml
2026-08-04 10:21:10 +08:00
commit ecefebfcf2
+389
View File
@@ -0,0 +1,389 @@
# =============================== 基础设置 ===============================
port: 7890
socks-port: 7891
mixed-port: 7893
redir-port: 7892
tproxy-port: 7894
allow-lan: true
mode: rule
log-level: info
ipv6: true
unified-delay: true
tcp-concurrent: true
#external-controller: 0.0.0.0:9090
#secret: "123465."
#可以加sniffer和tun规则
# =============================== 机场订阅 ===============================
active-subs: &u_s
use: [机场01, 机场02] # 主力节点池:p1 和新的 p2
all-nodes: &u
use: [机场01, 机场02, 机场03_备用] # 全部节点池:包含主力与备用
backup-subs: &u_b
use: [机场03_备用] # 容灾备用池:原来的旧 p2,仅在主力全挂时启用
rtt-lb-template: &rtt-lb
type: url-test
<<: *u_s
lazy: false
interval: 180
tolerance: 15
pg-template: &pg #proxy-groups
type: select
proxies:
- ♻️ 自动选择
- 🚀 节点选择
- 🆘 故障转移
- 自动选择
- 台湾均衡加速
- 台湾故转
- 香港均衡加速
- 日本均衡加速
- 美国均衡加速
- 新加坡均衡加速
- 台湾节点
- 香港节点
- 美国节点
- 日本节点
- DIRECT
# =============================== 订阅提供者 ===============================
p-common: &p-common
type: http
udp: true
interval: 86400
proxy: DIRECT
health-check: { enable: true, url: http://www.gstatic.com/generate_204, interval: 600 }
proxy-providers:
机场01:
url: "https://uu.xflashtoto.com/NTIxMjc6NmVhZThjMmI5NDU5/NmZlNTI3NGExODU5NThlODhi/NGYxODdlZjFkNDVkMWVkMWFm/ZDlhZjFjYmJjM2MzZGZlMw"
path: ./proxy_provider/sub1.yaml
<<: *p-common
filter: "^(?!(.*流量|.*10x|.*6x|.*重置|.*到期|.*建议|.*官网|.*Expire|.*套餐|.*备用|.*线路|.*软件|.*地址|.*更新)).*$"
override: { additional-prefix: "p1 » " }
机场02:
url: "https://dy-2.xn--30rs3bu7r87f.com/csjc/api/v1/client/subscribe?token=a62ab7727142e1ff0320892c4628deda" # <--- 注意:请替换为你新买的订阅链接
path: ./proxy_provider/sub2.yaml
<<: *p-common
filter: "^(?!(.*流量|.*10x|.*6x|.*重置|.*到期|.*建议|.*官网|.*Expire|.*套餐|.*地址|.*更新)).*$"
override: { additional-prefix: "p2 » " }
机场03_备用:
url: "https://sub.huluma.dpdns.org/base64?token=4ad6c5809974691835305f3f4b2b1b1d" # 原来的旧 p2,现已降级为纯备用
path: ./proxy_provider/sub3.yaml
<<: *p-common
filter: "^(?!(.*流量|.*10x|.*6x|.*重置|.*到期|.*建议|.*官网|.*Expire|.*套餐|.*地址|.*更新)).*$"
override: { additional-prefix: "p3_备用 » " }
# =============================== 节点信息 ===============================
proxies: [] # ⚠️ 必须保留一个空的中括号,防止被解析为 null 报错
# =============================== DNS 配置 ===============================
dns:
enable: true
ipv6: true
listen: 0.0.0.0:1053
prefer-h3: false
respect-rules: true
cache-algorithm: arc
cache-size: 2048
use-hosts: false
use-system-hosts: false
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
fake-ip-filter-mode: blacklist
fake-ip-filter:
- "rule-set:private_domain,cn_domain"
- "geosite:connectivity-check"
- "geosite:private"
- "rule-set:fake_ip_filter_DustinWin"
# 必须使用国内 DNS 才能正常解析机场的节点域名
default-nameserver:
- 223.5.5.5
- 119.29.29.29
nameserver:
- https://1.1.1.1/dns-query
- https://dns.google/dns-query
- 1.1.1.1
- 8.8.8.8
nameserver-policy:
# 将 geosite:cn 和 private 拆开写,兼容性更好
"geosite:cn":
- https://223.5.5.5/dns-query
- https://doh.pub/dns-query
- 223.5.5.5
- 119.29.29.29
"geosite:private":
- https://223.5.5.5/dns-query
- https://doh.pub/dns-query
- 223.5.5.5
- 119.29.29.29
"geo:cn":
- https://223.5.5.5/dns-query
- https://doh.pub/dns-query
- 223.5.5.5
- 119.29.29.29
"geosite:gfw":
- https://1.1.1.1/dns-query
- https://dns.google/dns-query
- 1.1.1.1
- 8.8.8.8
"geosite:geolocation-!cn":
- https://1.1.1.1/dns-query
- https://dns.google/dns-query
- 1.1.1.1
- 8.8.8.8
"RULE-SET:cn_domain":
- 'https://223.5.5.5/dns-query'
- 'https://doh.pub/dns-query'
"RULE-SET:GeositeCN_Domain":
- 'https://223.5.5.5/dns-query'
- 'https://doh.pub/dns-query'
"full-nameserver":
- https://1.1.1.1/dns-query
- https://dns.google/dns-query
- 1.1.1.1
- 8.8.8.8
fallback:
- 1.1.1.1
- 8.8.8.8
proxy-server-nameserver:
- https://1.1.1.1/dns-query
- https://dns.google/dns-query
- 1.1.1.1
- 8.8.8.8
# =============================== 代理组设置 ===============================
proxy-groups:
- name: ♻️ 自动选择
type: fallback
proxies:
- 自动选择 # 优先级 1:p1 和 新 p2 的优选节点,只要还有一个活着就用这里
- 🆘 故障转移 # 优先级 2:仅当 p1 和 新 p2 全部彻底失效时,才会切换到这里(旧 p2)
url: http://www.gstatic.com/generate_204
interval: 300
tolerance: 50
lazy: false
icon: "https://raw.githubusercontent.com/Mithcell-Ma/icon/refs/heads/main/ai_backup.png"
- name: 🚀 节点选择
type: select
proxies:
- 自动选择
- AI
- 台湾均衡加速
- 香港均衡加速
- 日本均衡加速
- 美国均衡加速
- 新加坡均衡加速
- 台湾节点
- 香港节点
- 美国节点
- 日本节点
- 全部节点
- 🆘 故障转移
- DIRECT
- name: 🆘 故障转移
type: url-test
<<: *u_b # 仅使用备用订阅列表(旧 p2
url: http://www.gstatic.com/generate_204
interval: 3600
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"
# --- AI 主策略组 ---
- name: AI
type: select
proxies:
- AI_稳定节点
- AI_自动优选
- 美国自动
- 日本自动
- 新加坡自动
- 台湾自动
- 美国均衡加速
- 日本均衡加速
- 新加坡均衡加速
icon: "https://github.com/DustinWin/ruleset_geodata/releases/download/icons/ai.png"
- name: AI_稳定节点
type: fallback
<<: *u_s # 只用主力(p1和新p2
url: http://www.gstatic.com/generate_204
interval: 7200
strategy: consistent-hashing
max-failed-times: 1
tolerance: 100
lazy: true
filter: "(?i)美国|US|United States|日本|JP|Japan|Singapore|新加坡|台湾|TW"
exclude-filter: "(?i)香港|HK|HongKong|CN|中国"
icon: "https://testingcf.jsdelivr.net/gh/aihdde/Rules@master/icon/ai.png"
- name: AI_自动优选
type: url-test
<<: *u_s # 只用主力(p1和新p2
url: http://www.gstatic.com/generate_204
interval: 3600
tolerance: 50
lazy: false
filter: "(?i)^((?!(DIRECT|Proxy|Traffic|Expire|Expired|过期|剩余|流量|官网|超时|timeout|失效|Invalid|Test|测速|本地|Local)).)*$"
exclude-filter: "(?i)香港|HK|HongKong|CN|中国"
icon: "https://raw.githubusercontent.com/Mithcell-Ma/icon/refs/heads/main/ai_backup.png"
# --- 🧪 智能均衡测速组 (仅主力参与) ---
- { name: 台湾均衡加速, <<: *rtt-lb, filter: "(?i)(台湾|tw|🇹🇼|taiwan|新北|台中|台北)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/available.png" }
- { name: 香港均衡加速, <<: *rtt-lb, filter: "(?i)(香港|hk|🇭🇰|hong\\s?kong)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/available.png" }
- { name: 美国均衡加速, <<: *rtt-lb, filter: "(?i)(🇺🇸|美国|US|united\\s?states|america|usa)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/available.png" }
- { name: 新加坡均衡加速, <<: *rtt-lb, filter: "(?i)(🇸🇬|新加坡|狮城|SG|Singapore)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/available.png" }
- { name: 日本均衡加速, <<: *rtt-lb, filter: "(?i)(🇯🇵|日本|東京|东京|大阪|JP|Japan)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/available.png" }
# --- 🛠️ 故障转移/手动选择组 (仅主力参与) ---
- { name: 台湾故转, type: select, <<: *u_s, filter: "(?i)(台湾|tw|🇹🇼|taiwan|新北|台中|台北)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/icon/color/asn.png" }
- { name: 香港故转, type: select, <<: *u_s, filter: "(?i)(香港|hk|🇭🇰|hong\\s?kong)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/icon/color/asn.png" }
- { name: 美国故转, type: select, <<: *u_s, filter: "(?i)(🇺🇸|美国|US|united\\s?states|america|usa)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/icon/color/asn.png" }
- { name: 新加坡故转, type: select, <<: *u_s, filter: "(?i)(🇸🇬|新加坡|狮城|SG|Singapore)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/icon/color/asn.png" }
- { name: 日本故转, type: select, <<: *u_s, filter: "(?i)(🇯🇵|日本|東京|东京|大阪|JP|Japan)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/icon/color/asn.png" }
# --- ⚡ 自动优选组 (仅主力参与) ---
- { name: 台湾自动, type: url-test, <<: *u_s, tolerance: 100, interval: 600, lazy: true, filter: "(?i)(台湾|tw|🇹🇼|taiwan)", icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/release/icon/color/auto.png" }
- { name: 香港自动, type: url-test, <<: *u_s, tolerance: 100, interval: 600, lazy: true, 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: 100, interval: 600, lazy: true, 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: url-test, <<: *u_s, tolerance: 100, interval: 600, lazy: true, 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: 100, interval: 600, lazy: true, 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 # 仅优选主力
url: http://www.gstatic.com/generate_204
tolerance: 50
interval: 300
lazy: false
filter: "(?i)^((?!(DIRECT|Proxy|Traffic|Expire|Expired|过期|剩余|流量|官网|超时|timeout|失效|Invalid|Test|测速|本地|Local)).)*$"
icon: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/refs/heads/master/icon/color/urltest.png"
# --- OpenAI 专项策略 (仅主力) ---
- name: OpenAI
type: select
proxies: [OpenAI_美国优选, OpenAI_全球优选, 美国故转, 新加坡故转]
icon: "https://github.com/DustinWin/ruleset_geodata/releases/download/icons/openai.png"
- name: OpenAI_美国优选
type: url-test
<<: *u_s
url: https://chatgpt.com/favicon.ico
interval: 600
tolerance: 50
filter: "(?i)美国|US|United States|洛杉矶|达拉斯|纽约|西雅图|旧金山"
icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/United_States.png"
- name: OpenAI_全球优选
type: url-test
<<: *u_s
url: https://chatgpt.com/favicon.ico
interval: 600
tolerance: 50
filter: "(?i)美国|US|Singapore|新加坡|Japan|日本|Korea|韩国"
exclude-filter: "(?i)香港|HK|HongKong|CN|中国"
icon: "https://testingcf.jsdelivr.net/gh/aihdde/Rules@master/icon/world.png"
# --- Google AISTudio 专项策略 (仅主力) ---
- name: AISTudio
type: select
<<: *u_s
exclude-filter: "(?i)香港|HK|HongKong|CN|中国|Traffic|剩余"
proxies: [美国均衡加速, 新加坡均衡加速, 日本节点, 🚀 节点选择]
icon: "https://github.com/DustinWin/ruleset_geodata/releases/download/icons/google.png"
# --- 📺 媒体平台 ---
- { name: TikTok, type: select, proxies: [美国均衡加速, 台湾均衡加速, 新加坡均衡加速, 美国故转, 台湾故转, 新加坡故转, 美国节点, 新加坡节点, 日本节点], icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/TikTok.png" }
- { name: YouTube, type: select, <<: *pg, icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/YouTube.png" }
- { name: Netflix, type: url-test, <<: *u_s, url: http://www.gstatic.com/generate_204, interval: 300, tolerance: 50, filter: "(?i)^((?!(DIRECT|Proxy|Traffic|Expire|Expired|过期|剩余|流量|官网|超时|timeout|失效|Invalid|Test|测速|本地|Local)).)*$", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Netflix.png" }
- { name: Disney+, type: url-test, <<: *u_s, url: https://www.disneyplus.com/robots.txt, interval: 300, tolerance: 50, filter: "(?i)^((?!(DIRECT|Proxy|Traffic|Expire|Expired|过期|剩余|流量|官网|超时|timeout|失效|Invalid|Test|测速|本地|Local)).)*$", icon: "https://testingcf.jsdelivr.net/gh/Koolson/Qure@master/IconSet/Color/Disney+.png" }
- { name: instagram, type: url-test, <<: *u_s, url: http://www.gstatic.com/generate_204, interval: 300, tolerance: 50, filter: "(?i)^((?!(DIRECT|Proxy|Traffic|Expire|Expired|过期|剩余|流量|官网|超时|timeout|失效|Invalid|Test|测速|本地|Local)).)*$",exclude-filter: "(?i)香港|HK|Hong\\s?Kong|🇭🇰|新加坡|SG|Singapore|🇸🇬", icon: "https://is1-ssl.mzstatic.com/image/thumb/PurpleSource211/v4/8a/90/50/8a905050-a62a-2c1c-a62a-dbb3c372e85d/Placeholder.mill/400x400bb-75.webp" }
# --- 🌍 区域节点直选 (含备用以供临时手动选择) ---
- { 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)(香港|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)(🇺🇸|美国|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)(🇸🇬|新加坡|狮城|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)^((?!(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, <<: *pg, icon: "https://testingcf.jsdelivr.net/gh/aihdde/Rules@master/icon/fish.png" }
# =============================== 规则设置 ===============================
rules:
- RULE-SET,AWAvenue_Ads_Rule,REJECT
- GEOIP,cn,DIRECT,no-resolve
- RULE-SET,telegram_ip,♻️ 自动选择,no-resolve
- RULE-SET,geoip_cloudflare,AI,no-resolve
- RULE-SET,cn_domain,DIRECT
# --- OpenAI 规则 (置顶) ---
- DOMAIN-SUFFIX,openai.com,OpenAI
- DOMAIN-SUFFIX,chatgpt.com,OpenAI
- DOMAIN-SUFFIX,oaistatic.com,OpenAI
- DOMAIN-SUFFIX,oaiusercontent.com,OpenAI
- DOMAIN-KEYWORD,openai,OpenAI
- DOMAIN-KEYWORD,chatgpt,OpenAI
# --- Google AISTudio 规则 ---
- DOMAIN-SUFFIX,aistudio.google.com,AISTudio
- DOMAIN-KEYWORD,aistudio,AISTudio
- DOMAIN-KEYWORD,generativeai,AISTudio
# AI 专项
- RULE-SET,ai,AI
- DOMAIN-SUFFIX,chat.openai.com,AI
# 媒体专项
- RULE-SET,youtube_domain,YouTube
- RULE-SET,tiktok_domain,TikTok
- RULE-SET,netflix_domain,Netflix
- RULE-SET,disney_domain,Disney+
# 通用规则
- 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" }
blackmatrix7_direct: { <<: *yaml, path: ./ruleset/blackmatrix7_direct.yaml, url: "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/rule/Clash/Direct/Direct.yaml" }
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, url: "https://github.com/DustinWin/ruleset_geodata/releases/download/mihomo-ruleset/ai.mrs" }
taiwan_domain: { <<: *domain, path: ./ruleset/taiwan_domain.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/location-tw.mrs" }
youtube_domain: { <<: *domain, path: ./ruleset/youtube.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/youtube.mrs" }
tiktok_domain: { <<: *domain, path: ./ruleset/tiktok.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/tiktok.mrs" }
netflix_domain: { <<: *domain, path: ./ruleset/netflix.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/netflix.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" }
japan_domain: { <<: *domain, path: ./ruleset/japan_domain.mrs, url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/location-jp.mrs" }