pr: &pr {type: select, proxies: [默认,香港,台湾,日本,新加坡,美国,其它地区,全部节点,自动选择,直连]}
p: &p {type: http, interval: 3600, health-check: {enable: true, url:
https://www.gstatic.com/generate_204, interval: 300}}#
# url 里填写订阅,名称不能重复
proxy-providers:
xxxx:
<<: *p
path: ./xxxx.yaml
url: ""
ipv6: false
allow-lan: true
mixed-port: 7890
unified-delay: false
tcp-concurrent: true
external-controller: :9999
external-ui: /etc/mihomo/ui
external-ui-name: xd
# 因为 linux 用的是 server 版,所以 UI 指的是 yacd 等 dashboard
external-ui-url: "
https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip"
geodata-mode: true
geodata-loader: standard
geo-auto-update: true
geo-update-interval: 24
geox-url:
geoip: "
https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat"
geosite: "
https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat"
mmdb: "
https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country-lite.mmdb"
find-process-mode: strict
global-client-fingerprint: chrome
sniffer:
enable: true
sniff:
HTTP:
ports: [80, 8080-8880]
override-destination: true
TLS:
ports: [443, 8443]
QUIC:
ports: [443, 8443]
skip-domain:
- '*.rc.sunlogin.net'
tun:
enable: true
stack: system
dns-hijack: ["any:53"]
auto-route: true
auto-detect-interface: true
dns:
enable: true
listen: :53
ipv6: false
enhanced-mode: redir-host
nameserver: ["tls://8.8.4.4", "tls://208.67.222.222"]
nameserver-policy:
"geosite:cn": ["202.96.128.166", "223.5.5.5"]
hosts:
'*.ptg.com': 192.168.66.55
proxies:
- name: "直连"
type: direct
udp: true
proxy-groups:
- {name: 默认, type: select, proxies: [自动选择, 直连, 香港, 台湾, 日本, 新加坡, 美国, 其它地区, 全部节点]}
- {name: YouTube, <<: *pr}
- {name: Google, <<: *pr}
- {name: OpenAI, <<: *pr}
- {name: 国内, type: select, proxies: [直连, 默认, 香港, 台湾, 日本, 新加坡, 美国, 其它地区, 全部节点, 自动选择]}
- {name: 其他, <<: *pr}
# 地区分组
- {name: 香港, type: select , include-all-providers: true, filter: "(?i)港|hk|hongkong|hong kong"}
- {name: 台湾, type: select , include-all-providers: true, filter: "(?i)台|tw|taiwan"}
- {name: 日本, type: select , include-all-providers: true, filter: "(?i)日|jp|japan"}
- {name: 美国, type: select , include-all-providers: true, filter: "(?i)美|us|unitedstates|united states"}
- {name: 新加坡, type: select , include-all-providers: true, filter: "(?i)(新|sg|singapore)"}
- {name: 其它地区, type: select , include-all-providers: true, filter: "(?i)^(?!.*(?:🇭🇰|🇯🇵|🇺🇸|🇸🇬|🇨🇳|港|hk|hongkong|台|tw|taiwan|日|jp|japan|新|sg|singapore|美|us|unitedstates)).*"}
- {name: 全部节点, type: select , include-all-providers: true}
- {name: 自动选择, type: url-test, include-all-providers: true, tolerance: 10}
rules:
- GEOIP,lan,直连,no-resolve
- GEOIP,private,直连,no-resolve
- GEOSITE,youtube,YouTube
- GEOSITE,google,Google
- GEOSITE,openai,OpenAI
- GEOSITE,cn,国内
- GEOSITE,geolocation-!cn,其他
- GEOIP,CN,国内
- MATCH,其他