This commit is contained in:
GitHub Actions
2026-03-25 06:44:13 +08:00
parent 8678b966d9
commit 5c054228ef
2 changed files with 460 additions and 22 deletions

View File

@@ -0,0 +1,298 @@
allow-lan: true
mode: rule
bind-address: "0.0.0.0"
mixed-port: 7891
socks-port: 7890
ipv6: true
unified-delay: true
log-level: warning
find-process-mode: strict
tcp-concurrent: true
keep-alive-idle: 600
keep-alive-interval: 15
profile:
store-selected: true
store-fake-ip: true
external-controller: 0.0.0.0:9090
tun:
enable: true
stack: mixed
auto-route: true
auto-detect-interface: true
dns-hijack:
- any:53
NodeParam: &NodeParam
type: http
interval: 86400
health-check:
enable: true
url: https://www.gstatic.com/generate_204
interval: 300
proxy-providers:
airport:
<<: *NodeParam
url: "http://172.30.0.2:25500/sub?target=clash&new_name=true&url=https%3A%2F%2Fdash.pqjc.site%2Fapi%2Fv1%2Fpq%2Fdce38d7c4a39d9b8fb6818a658e2f554"
path: ./providers/airport.yaml
dns:
enable: true
cache-algorithm: arc
listen: 0.0.0.0:1053
ipv6: true
respect-rules: true
use-hosts: true
use-system-hosts: true
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
fake-ip-filter-mode: blacklist
fake-ip-filter:
- rule-set:fakeipfilter
nameserver:
- https://223.5.5.5/dns-query
- https://doh.pub/dns-query
proxy-server-nameserver:
- https://223.5.5.5/dns-query
- https://doh.pub/dns-query
sniffer:
enable: true
parse-pure-ip: true
sniff:
HTTP:
ports: [80, 8080-8880]
override-destination: true
TLS:
ports: [443, 8443]
QUIC:
ports: [443, 8443]
skip-domain:
- "Mijia Cloud"
- "+.push.apple.com"
FilterUS: &FilterUS '^(?=.*?(?i)(United States|America|\bUS\b|硅谷|家宽|洛杉矶|西雅图|纽约|芝加哥|拉斯维加斯|美帝|美国)).*(?<!(?i)(回国|过期|剩余|官网|网址|节点|订阅|机场|客服|校园|本土)).*$'
FilterJP: &FilterJP '^(?=.*?(?i)(Japan|\bJP\b|东京|大阪|埼玉|川日|泉日|日区|日本)).*(?<!(?i)(回国|过期|剩余|官网|网址|节点|订阅|机场|客服|校园|本土)).*$'
FilterSG: &FilterSG '^(?=.*?(?i)(Singapore|\bSG\b|新加坡|狮城|狮)).*(?<!(?i)(回国|过期|剩余|官网|网址|节点|订阅|机场|客服|校园|本土)).*$'
FilterTW: &FilterTW '^(?=.*?(?i)(Taiwan|\bTW\b|\bTai(?:wan)?\b|台湾|台北|台中|台南|高雄|新竹)).*(?<!(?i)(回国|过期|剩余|官网|网址|节点|订阅|机场|客服|校园|本土)).*$'
FilterHK: &FilterHK '^(?=.*?(?i)(\bHK\b|Hong.?Kong|香港|深港|广港|港区)).*(?<!(?i)(回国|过期|剩余|官网|网址|节点|订阅|机场|客服|校园|本土)).*$'
FilterAll: &FilterAll '^(?!.*?(?i)(GB\s*[\|丨]\s*GB|GB|Traffic|Reset|Days|Left|Expire|Date|Direct|直连|套餐|流量|重置|剩余|到期|时间|频道)).*$'
Select: &Select
type: select
url: https://www.gstatic.com/generate_204
disable-udp: false
hidden: false
include-all: true
UrlTest: &UrlTest
type: url-test
url: https://www.gstatic.com/generate_204
disable-udp: false
hidden: true
include-all: true
interval: 300
lazy: true
tolerance: 50
timeout: 2000
max-failed-times: 3
FallBack: &FallBack
type: fallback
url: https://www.gstatic.com/generate_204
disable-udp: false
hidden: true
include-all: true
interval: 300
lazy: true
timeout: 2000
max-failed-times: 3
pg_FallBack_US: &pg_FallBack_US [US_FALLBACK, JP_FALLBACK, SG_FALLBACK, TW_FALLBACK, HK_FALLBACK]
pg_Proxy: &pg_Proxy [AUTO, ALL_NODES, ROTATE_RR, ROTATE_AUTO, ROTATE_NODES, DIRECT, US_AUTO, JP_AUTO, SG_AUTO, TW_AUTO, HK_AUTO, US_FALLBACK, JP_FALLBACK, SG_FALLBACK, TW_FALLBACK, HK_FALLBACK, US_NODES, JP_NODES, SG_NODES, TW_NODES, HK_NODES]
pg_Direct: &pg_Direct [DIRECT, AUTO, ALL_NODES, ROTATE_RR, ROTATE_AUTO, ROTATE_NODES, US_AUTO, JP_AUTO, SG_AUTO, TW_AUTO, HK_AUTO, US_FALLBACK, JP_FALLBACK, SG_FALLBACK, TW_FALLBACK, HK_FALLBACK, US_NODES, JP_NODES, SG_NODES, TW_NODES, HK_NODES]
proxy-groups:
- {name: AUTO, <<: *UrlTest, filter: *FilterAll}
- {name: ALL_NODES, <<: *Select, filter: *FilterAll}
- {name: ROTATE_NODES, type: select, use: [airport], filter: '^(美国01-0\.1x \| 电信联通移动推荐|美国08-0\.1x \| 电信联通移动推荐|香港01 \| 移动联通推荐|韩国 \| 高速专线-hy2|迪拜 \| 高速专线-hy2|新加坡4 \| 高速专线-hy2|日本东京3 \| 移动联通推荐-hy2)$'}
- {name: ROTATE_AUTO, type: url-test, use: [airport], filter: '^(美国01-0\.1x \| 电信联通移动推荐|美国08-0\.1x \| 电信联通移动推荐|香港01 \| 移动联通推荐|韩国 \| 高速专线-hy2|迪拜 \| 高速专线-hy2|新加坡4 \| 高速专线-hy2|日本东京3 \| 移动联通推荐-hy2)$', url: https://www.gstatic.com/generate_204, interval: 300, tolerance: 50, lazy: true, timeout: 2000, max-failed-times: 3}
- {name: ROTATE_RR, type: load-balance, strategy: round-robin, use: [airport], filter: '^(美国01-0\.1x \| 电信联通移动推荐|美国08-0\.1x \| 电信联通移动推荐|香港01 \| 移动联通推荐|韩国 \| 高速专线-hy2|迪拜 \| 高速专线-hy2|新加坡4 \| 高速专线-hy2|日本东京3 \| 移动联通推荐-hy2)$', url: https://www.gstatic.com/generate_204, interval: 300, lazy: true, timeout: 2000, max-failed-times: 3}
- {name: DEFAULT_PROXY, type: select, proxies: *pg_Proxy}
- {name: AIGC, type: select, proxies: *pg_FallBack_US}
- {name: STEAM, type: select, proxies: *pg_Direct}
- {name: ONEDRIVE, type: select, proxies: *pg_Direct}
- {name: MICROSOFT, type: select, proxies: *pg_Direct}
- {name: GITHUB, type: select, proxies: *pg_Proxy}
- {name: X, type: select, proxies: *pg_Proxy}
- {name: SONY, type: select, proxies: *pg_Proxy}
- {name: TELEGRAM, type: select, proxies: *pg_Proxy}
- {name: GOOGLE, type: select, proxies: *pg_FallBack_US}
- {name: YOUTUBE, type: select, proxies: *pg_Proxy}
- {name: FINAL, type: select, proxies: *pg_Proxy}
- {name: US_NODES, <<: *Select, filter: *FilterUS}
- {name: JP_NODES, <<: *Select, filter: *FilterJP}
- {name: SG_NODES, <<: *Select, filter: *FilterSG}
- {name: TW_NODES, <<: *Select, filter: *FilterTW}
- {name: HK_NODES, <<: *Select, filter: *FilterHK}
- {name: US_FALLBACK, <<: *FallBack, filter: *FilterUS}
- {name: JP_FALLBACK, <<: *FallBack, filter: *FilterJP}
- {name: SG_FALLBACK, <<: *FallBack, filter: *FilterSG}
- {name: TW_FALLBACK, <<: *FallBack, filter: *FilterTW}
- {name: HK_FALLBACK, <<: *FallBack, filter: *FilterHK}
- {name: US_AUTO, <<: *UrlTest, filter: *FilterUS}
- {name: JP_AUTO, <<: *UrlTest, filter: *FilterJP}
- {name: SG_AUTO, <<: *UrlTest, filter: *FilterSG}
- {name: TW_AUTO, <<: *UrlTest, filter: *FilterTW}
- {name: HK_AUTO, <<: *UrlTest, filter: *FilterHK}
rules:
- IP-CIDR,169.254.169.254/32,REJECT,no-resolve
- DST-PORT,11434,REJECT
- DOMAIN,t-ring-fdv2.msedge.net,REJECT,no-resolve
- IP-CIDR,223.5.5.5/32,DIRECT,no-resolve
- IP-CIDR,223.6.6.6/32,DIRECT,no-resolve
- RULE-SET,custom_proxy,DEFAULT_PROXY
- RULE-SET,custom_direct,DIRECT
- RULE-SET,private_ip,DIRECT,no-resolve
- RULE-SET,private_domain,DIRECT
- RULE-SET,speedtest_domain,DIRECT
- RULE-SET,apple_domain,DIRECT
- RULE-SET,apple_ip,DIRECT,no-resolve
- RULE-SET,ai_domain,AIGC
- RULE-SET,onedrive_domain,ONEDRIVE
- RULE-SET,steam_domain,STEAM
- RULE-SET,github_domain,GITHUB
- RULE-SET,x_domain,X
- RULE-SET,telegram_ip,TELEGRAM,no-resolve
- RULE-SET,telegram_domain,TELEGRAM
- RULE-SET,sony_domain,SONY
- RULE-SET,microsoft_domain,MICROSOFT
- RULE-SET,youtube_domain,YOUTUBE
- RULE-SET,google_domain,GOOGLE
- RULE-SET,google_ip,GOOGLE,no-resolve
- RULE-SET,cn_domain,DIRECT
- RULE-SET,cn_ip,DIRECT,no-resolve
- RULE-SET,geolocation-!cn_domain,DEFAULT_PROXY
- MATCH,FINAL
RuleSet_classical_text: &RuleSet_classical_text
type: http
behavior: classical
interval: 43200
format: text
RuleSet_domain_mrs: &RuleSet_domain_mrs
type: http
behavior: domain
interval: 43200
format: mrs
RuleSet_domain_text: &RuleSet_domain_text
type: http
behavior: domain
interval: 43200
format: text
RuleSet_ipcidr_mrs: &RuleSet_ipcidr_mrs
type: http
behavior: ipcidr
interval: 43200
format: mrs
rule-providers:
custom_proxy:
<<: *RuleSet_classical_text
url: "https://raw.githubusercontent.com/lvbibir/clash/refs/heads/master/Ruleset/Proxy.list"
path: ./rule-providers/custom_proxy.list
custom_direct:
<<: *RuleSet_classical_text
url: "https://raw.githubusercontent.com/lvbibir/clash/refs/heads/master/Ruleset/Direct.list"
path: ./rule-providers/custom_direct.list
fakeipfilter:
<<: *RuleSet_domain_text
url: "https://raw.githubusercontent.com/juewuy/ShellCrash/refs/heads/dev/public/fake_ip_filter.list"
path: ./rule-providers/fakeipfilter.list
private_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/private.mrs"
path: ./rule-providers/private_domain.mrs
ai_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/category-ai-!cn.mrs"
path: ./rule-providers/ai_domain.mrs
x_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/x.mrs"
path: ./rule-providers/x_domain.mrs
youtube_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/youtube.mrs"
path: ./rule-providers/youtube_domain.mrs
google_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/google.mrs"
path: ./rule-providers/google_domain.mrs
github_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/github.mrs"
path: ./rule-providers/github_domain.mrs
steam_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/steam.mrs"
path: ./rule-providers/steam_domain.mrs
sony_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/sony.mrs"
path: ./rule-providers/sony_domain.mrs
telegram_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/telegram.mrs"
path: ./rule-providers/telegram_domain.mrs
onedrive_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/onedrive.mrs"
path: ./rule-providers/onedrive_domain.mrs
microsoft_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/microsoft.mrs"
path: ./rule-providers/microsoft_domain.mrs
apple_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/apple.mrs"
path: ./rule-providers/apple_domain.mrs
speedtest_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/ookla-speedtest.mrs"
path: ./rule-providers/speedtest_domain.mrs
geolocation-!cn_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/geolocation-!cn.mrs"
path: ./rule-providers/geolocation-!cn_domain.mrs
cn_domain:
<<: *RuleSet_domain_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/cn.mrs"
path: ./rule-providers/cn_domain.mrs
private_ip:
<<: *RuleSet_ipcidr_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/private.mrs"
path: ./rule-providers/private_ip.mrs
cn_ip:
<<: *RuleSet_ipcidr_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/cn.mrs"
path: ./rule-providers/cn_ip.mrs
google_ip:
<<: *RuleSet_ipcidr_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geoip/google.mrs"
path: ./rule-providers/google_ip.mrs
apple_ip:
<<: *RuleSet_ipcidr_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/apple.mrs"
path: ./rule-providers/apple_ip.mrs
telegram_ip:
<<: *RuleSet_ipcidr_mrs
url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo-lite/geoip/telegram.mrs"
path: ./rule-providers/telegram_ip.mrs