304 lines
9.6 KiB
YAML
304 lines
9.6 KiB
YAML
proxies:
|
|
- name: seed
|
|
type: vless
|
|
server: 1.2.3.4
|
|
port: 443
|
|
uuid: 00000000-0000-0000-0000-000000000000
|
|
network: tcp
|
|
udp: true
|
|
tls: true
|
|
flow: xtls-rprx-vision
|
|
servername: eh.vk.ru
|
|
client-fingerprint: firefox
|
|
reality-opts:
|
|
public-key: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
|
short-id: a1b2
|
|
|
|
proxy-providers:
|
|
kitty:
|
|
type: http
|
|
url: "https://a.example.com/x"
|
|
path: ./providers/kitty.yaml
|
|
interval: 3600
|
|
proxy: BOOT-AUTO
|
|
exclude-filter: "(?i)app not supported|приложение не|свяжитесь|\\[MY\\]"
|
|
header:
|
|
User-Agent: ["v2rayN/9.99"]
|
|
x-device-os: ["OpenWrt"]
|
|
x-ver-os: ["24.10.3"]
|
|
x-device-model: ["Huasifei WH3000 Pro"]
|
|
x-hwid: ["123"]
|
|
# one check per provider: the groups over it (use:) only add their URLs to it,
|
|
# so the interval and lazy here are what counts for RU/FOREIGN/TORRENT/MY-EXIT.
|
|
# lite: every 10 min and skipped while no traffic used the provider
|
|
health-check:
|
|
enable: true
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
timeout: 3000
|
|
lazy: false
|
|
|
|
vpn_host:
|
|
type: http
|
|
url: "https://sub.vpn-host.co.uk/y?t=1"
|
|
path: ./providers/vpn_host.yaml
|
|
interval: 3600
|
|
proxy: DIRECT
|
|
exclude-filter: "(?i)app not supported|приложение не|свяжитесь|\\[MY\\]"
|
|
header:
|
|
User-Agent: ["mihomo"]
|
|
# one check per provider: the groups over it (use:) only add their URLs to it,
|
|
# so the interval and lazy here are what counts for RU/FOREIGN/TORRENT/MY-EXIT.
|
|
# lite: every 10 min and skipped while no traffic used the provider
|
|
health-check:
|
|
enable: true
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
timeout: 3000
|
|
lazy: false
|
|
|
|
sub3:
|
|
type: http
|
|
url: "https://1.2.3.4:8443/s"
|
|
path: ./providers/sub3.yaml
|
|
interval: 3600
|
|
proxy: FOREIGN
|
|
exclude-filter: "(?i)app not supported|приложение не|свяжитесь|\\[MY\\]"
|
|
header:
|
|
User-Agent: ["mihomo"]
|
|
x-a: ["1"]
|
|
# one check per provider: the groups over it (use:) only add their URLs to it,
|
|
# so the interval and lazy here are what counts for RU/FOREIGN/TORRENT/MY-EXIT.
|
|
# lite: every 10 min and skipped while no traffic used the provider
|
|
health-check:
|
|
enable: true
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
timeout: 3000
|
|
lazy: false
|
|
|
|
# own servers kept in the subscription, named "[MY] ...", for group MY (the main
|
|
# provider leaves them out); a provider of its own because on whitelist and the
|
|
# phone they go through MY-EXIT. Router: not a second download, reads the file the
|
|
# main provider saves (mihomo watches it; ./providers exists before the start,
|
|
# ovpn_routes_write). Phone: FlClash moves provider files to paths of its own,
|
|
# so the subscription is fetched once more.
|
|
kitty-my:
|
|
type: file
|
|
path: ./providers/kitty.yaml
|
|
filter: "(?i)\\[MY\\]"
|
|
health-check:
|
|
enable: true
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
timeout: 3000
|
|
lazy: false
|
|
|
|
# own servers kept in the subscription, named "[MY] ...", for group MY (the main
|
|
# provider leaves them out); a provider of its own because on whitelist and the
|
|
# phone they go through MY-EXIT. Router: not a second download, reads the file the
|
|
# main provider saves (mihomo watches it; ./providers exists before the start,
|
|
# ovpn_routes_write). Phone: FlClash moves provider files to paths of its own,
|
|
# so the subscription is fetched once more.
|
|
vpn_host-my:
|
|
type: file
|
|
path: ./providers/vpn_host.yaml
|
|
filter: "(?i)\\[MY\\]"
|
|
health-check:
|
|
enable: true
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
timeout: 3000
|
|
lazy: false
|
|
|
|
# own servers kept in the subscription, named "[MY] ...", for group MY (the main
|
|
# provider leaves them out); a provider of its own because on whitelist and the
|
|
# phone they go through MY-EXIT. Router: not a second download, reads the file the
|
|
# main provider saves (mihomo watches it; ./providers exists before the start,
|
|
# ovpn_routes_write). Phone: FlClash moves provider files to paths of its own,
|
|
# so the subscription is fetched once more.
|
|
sub3-my:
|
|
type: file
|
|
path: ./providers/sub3.yaml
|
|
filter: "(?i)\\[MY\\]"
|
|
health-check:
|
|
enable: true
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
timeout: 3000
|
|
lazy: false
|
|
|
|
rule-providers:
|
|
# Russian services (geosite ru-inside of russia-only, as .mrs): an ordinary
|
|
# http rule-set, so every client fetches it with the config, no geodata setup
|
|
ru-inside:
|
|
type: http
|
|
behavior: domain
|
|
format: mrs
|
|
url: "https://cdn.jsdelivr.net/gh/SamLatsin/russia-only@release/ru-inside.mrs"
|
|
path: ./ruleset/ru-inside.mrs
|
|
interval: 86400
|
|
# Russian services outside ru-inside and outside .ru/.su/.рф (russia-only ru-services):
|
|
# not on the whitelist, so through RU everywhere but main
|
|
ru-services:
|
|
type: http
|
|
behavior: domain
|
|
format: mrs
|
|
url: "https://cdn.jsdelivr.net/gh/SamLatsin/russia-only@release/ru-services.mrs"
|
|
path: ./ruleset/ru-services.mrs
|
|
interval: 86400
|
|
|
|
sniffer:
|
|
enable: true
|
|
force-dns-mapping: true
|
|
parse-pure-ip: true
|
|
override-destination: false
|
|
# ECH: browsers show the outer name cloudflare-ech.com instead of the site behind
|
|
# Cloudflare; the sniffed name wins in the rules, so .ru / own lists would miss the
|
|
# site. Skipped: the rules see the name from mihomo's DNS (fake-ip / DNS mapping).
|
|
skip-domain:
|
|
- "+.cloudflare-ech.com"
|
|
sniff:
|
|
HTTP:
|
|
ports: [80, 8080-8880]
|
|
TLS:
|
|
ports: [443, 8443]
|
|
# lite: no QUIC (fake-ip already gives the domain; pure-IP QUIC goes by IP)
|
|
QUIC:
|
|
ports: [443, 8443]
|
|
|
|
dns:
|
|
enable: true
|
|
ipv6: false
|
|
respect-rules: true
|
|
enhanced-mode: fake-ip
|
|
fake-ip-range: 198.18.0.1/16
|
|
fake-ip-filter:
|
|
- '*.lan'
|
|
- '*.local'
|
|
- '+.ru'
|
|
- '+.xn--p1ai'
|
|
- rule-set:ru-inside
|
|
|
|
default-nameserver:
|
|
- 77.88.8.8
|
|
- 1.1.1.1
|
|
|
|
proxy-server-nameserver:
|
|
- https://77.88.8.8/dns-query
|
|
|
|
direct-nameserver:
|
|
- 77.88.8.8
|
|
- 77.88.8.1
|
|
|
|
nameserver:
|
|
- https://1.1.1.1/dns-query
|
|
- https://dns.google/dns-query
|
|
|
|
proxy-groups:
|
|
# BOOT: whitelisted entry nodes (BOOT_LINKS), the first alive one
|
|
- name: BOOT
|
|
type: fallback
|
|
proxies: [seed]
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
lazy: false
|
|
|
|
# default for downloading subscriptions: BOOT (if set), else the nodes of the
|
|
# saved subscriptions (providers are cached on disk), else direct. FOREIGN goes
|
|
# before DIRECT: the health check of DIRECT (gstatic) passes in Russia even when
|
|
# the subscription site itself is blocked.
|
|
- name: BOOT-AUTO
|
|
type: fallback
|
|
proxies: [BOOT, FOREIGN, DIRECT]
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
lazy: false
|
|
|
|
- name: RU
|
|
type: url-test
|
|
use: [kitty, vpn_host, sub3]
|
|
filter: "(?i)🇷🇺|\\bru\\b|russia|росси|моск"
|
|
# lite: the provider's URL, so RU nodes are not tested a second time
|
|
url: "https://ya.ru"
|
|
interval: 300
|
|
tolerance: 50
|
|
lazy: false
|
|
|
|
- name: FOREIGN
|
|
type: url-test
|
|
use: [kitty, vpn_host, sub3]
|
|
exclude-filter: "(?i)🇷🇺|\\bru\\b|russia|росси|моск"
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
tolerance: 50
|
|
lazy: false
|
|
|
|
- name: TORRENT
|
|
type: url-test
|
|
use: [kitty, vpn_host, sub3]
|
|
filter: "(?i)torrent|\\[tor\\]"
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
timeout: 6000
|
|
tolerance: 500
|
|
max-failed-times: 5
|
|
lazy: false
|
|
|
|
# own servers: those of the settings (proxies/30-own_srv) and the "[MY] ..." nodes of
|
|
# the subscriptions (providers <id>-my); the fastest alive one; pin one in the dashboard if needed
|
|
- name: MY
|
|
type: url-test
|
|
use: [kitty-my, vpn_host-my, sub3-my]
|
|
url: "https://www.gstatic.com/generate_204"
|
|
interval: 300
|
|
tolerance: 50
|
|
lazy: false
|
|
|
|
# whitelist and mobile (my_exit): what own servers are reached through; switches only when the node is
|
|
# clearly worse or dead (each switch breaks everything going through MY)
|
|
|
|
- name: MAIN
|
|
type: select
|
|
proxies: [FOREIGN, MY, RU, DIRECT]
|
|
|
|
- name: TORRENT-SEL
|
|
type: select
|
|
proxies: [TORRENT, FOREIGN, DIRECT]
|
|
|
|
- name: PUSH
|
|
type: select
|
|
proxies: [DIRECT, MY, FOREIGN]
|
|
|
|
rules:
|
|
- IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
|
|
- IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
|
|
- IP-CIDR,172.16.0.0/12,DIRECT,no-resolve
|
|
|
|
# push notifications (Apple APNs, Google FCM): long-lived connections on a
|
|
# stable path - group PUSH (main/foreign: DIRECT, whitelist: MY)
|
|
- DOMAIN-SUFFIX,push.apple.com,PUSH
|
|
- IP-CIDR,17.249.0.0/16,PUSH,no-resolve
|
|
- IP-CIDR,17.252.0.0/16,PUSH,no-resolve
|
|
- IP-CIDR,17.57.144.0/22,PUSH,no-resolve
|
|
- IP-CIDR,17.188.128.0/18,PUSH,no-resolve
|
|
- IP-CIDR,17.188.20.0/23,PUSH,no-resolve
|
|
- DOMAIN-REGEX,^(alt[0-9]+-)?mtalk[0-9]*\.google\.com$,PUSH
|
|
- DST-PORT,5228-5230,PUSH
|
|
|
|
# own lists from the settings: above torrents, ru-inside, .ru and MATCH; below the
|
|
# tunnels, LAN and push. Domains (DOMAIN-SUFFIX: the domain and all subdomains)
|
|
# before IPs; first match wins: MY, then FOREIGN, then RU.
|
|
# RU on main (home, own white IP): reachable directly; whitelist/abroad: through RU
|
|
- IP-CIDR,194.190.191.112/32,DIRECT
|
|
|
|
- SRC-PORT,20000-20199,TORRENT-SEL
|
|
|
|
- RULE-SET,ru-inside,DIRECT
|
|
# main (home, own white IP): ru-services and .ru/.su/.рф directly; elsewhere through RU
|
|
- RULE-SET,ru-services,DIRECT
|
|
- DOMAIN-SUFFIX,ru,DIRECT
|
|
- DOMAIN-SUFFIX,su,DIRECT
|
|
- DOMAIN-SUFFIX,xn--p1ai,DIRECT
|
|
- MATCH,MAIN
|