仅供参考
```yaml
mixed-port: 7788
redir-port: 1234
allow-lan: true
mode: rule
log-level: info
# web ui 访问地址
external-controller: '0.0.0.0:9090'
secret: ''
ipv6: false
global-client-fingerprint: chrome
sniffer:
enable: true
sniffing:
- tls
- http
skip-domain:
- 'Mijia Cloud'
- '
dlg.io.mi.com'
- '*.baidu.com'
force-domain:
- '
google.com'
- '
youtube.com'
- '
stackoverflow.com'
- '
ytimg.com'
- '+.apple.com'
port-whitelist:
- 80
- 443
# - 8000-9000
dns:
enable: true
ipv6: false
listen: 0.0.0.0:5334
enhanced-mode: redir-host
#enhanced-mode: fake-ip
fake-ip-filter:
- "*.lan"
- "daemon.warn"
- "*.DHCP"
- stun.*.*.*
- stun.*.*
-
time.windows.com - "*.ntp.org.cn"
-
pool.ntp.org -
localhost.ptlogin2.qq.com default-nameserver:
- 119.29.29.29
- 114.114.114.114
# dns 上游,可以自建 dnsmasq 或者 smartdns
nameserver:
- https://doh.pub/dns-query
- tls://223.5.5.5:853
fallback:
- 'https://1.0.0.1/dns-query#URLTest' # 使用代理处理 DNS
- 'tls://8.8.4.4:853#URLTest'
fallback-filter:
geoip: false
geosite:
- gfw
ipcidr:
- 240.0.0.0/4
- 0.0.0.0/32
- 127.0.0.1/32
domain:
- +.google.com
- +.facebook.com
- +.twitter.com
- +.youtube.com
- +.xn
--ngstr-lra8j.com - +.google.cn
- +.googleapis.cn
- +.googleapis.com
- +.gvt1.com
proxy-providers:
cloud:
type: http
path: ./cloud.yaml
url:
https://sub.xxx.com?newclash=2&extend=1 # one day
interval: 86400
health-check:
enable: true
url:
http://cp.cloudflare.com interval: 300
proxy-groups:
# 全局手动选择
- name: MANUL-ALL
type: select
use:
- cloud
#==============================================================================
- name: SG-ULT
type: url-test
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'SG|sg|sgp|狮城|新加坡'
- name: HK-ULT
type: url-test
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'HK|hk|香港'
- name: US-ULT
type: url-test
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'US|us|美国'
- name: JP-ULT
type: url-test
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'JP|jp|日本|东京'
- name: TW-ULT
type: url-test
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'TW|tw|台湾|台北'
- name: INDIA-ULT
type: url-test
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'IN|india|印度'
#==============================================================================
- name: SG-FB
type: fallback
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'SG|sg|sgp|狮城|新加坡'
- name: HK-FB
type: fallback
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'HK|hk|香港'
- name: US-FB
type: fallback
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'US|us|美国'
- name: JP-FB
type: fallback
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'JP|jp|日本|东京'
- name: TW-FB
type: fallback
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'TW|tw|台湾|台北'
- name: INDIA-FB
type: fallback
use:
- cloud
url: '
http://cp.cloudflare.com'
interval: 300
filter: 'IN|india|印度'
#==============================================================================
- name: URLTest
type: select
proxies:
- 'HK-ULT'
- 'SG-ULT'
- 'US-ULT'
- 'JP-ULT'
- 'TW-ULT'
- name: "Fallback"
type: fallback
url:
http://cp.cloudflare.com interval: 300
proxies:
- 'HK-FB'
- 'SG-FB'
- 'US-FB'
- 'JP-FB'
- 'TW-FB'
- name: Proxy
type: select
proxies:
- 'HK-FB'
- 'SG-FB'
- 'US-FB'
- 'JP-FB'
- 'TW-FB'
- 'SG-ULT'
- 'HK-ULT'
- 'US-ULT'
- 'JP-ULT'
- 'TW-ULT'
- 'MANUL-ALL'
- name: China
type: select
proxies:
- 'DIRECT'
- 'URLTest'
- 'Fallback'
- 'Proxy'
- name: Reject
type: select
proxies:
- 'REJECT'
- 'DIRECT'
- 'URLTest'
- 'Fallback'
- 'Proxy'
- name: Final
type: select
proxies:
- 'Fallback'
- 'URLTest'
- 'Proxy'
- 'DIRECT'
rules:
- GEOIP,private,China,no-resolve
- GEOIP,telegram,Proxy,no-resolve
- GEOSITE,youtube,Proxy
- DOMAIN,
infinitynewtab.com,Proxy
- GEOSITE,category-ads-all,Reject
# - GEOSITE,icloud@cn,China
# - GEOSITE,apple@cn,China
# - GEOSITE,apple-cn,China
# - GEOSITE,microsoft@cn,Proxy
- GEOSITE,facebook,Proxy
- GEOSITE,geolocation-cn,China
- GEOSITE,geolocation-!cn,Proxy
#GEOIP 规则
- GEOIP,cn,China
- MATCH,Final
- MATCH,Reject
```