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 # own servers of the settings (LuCI "Свои серверы", /etc/nikki/my-servers): one JSON # proxy per line, as mihomo's own config would have it; the kit puts dialer-proxy in # front: whitelist and the phone through MY-EXIT, with CSQTT through UPLINK - {"dialer-proxy": "MY-EXIT", "name":"🇩🇪 de 1","type":"vless","server":"x.example.com","port":"443","uuid":"00000000-0000-0000-0000-000000000001","udp":true,"tls":true,"client-fingerprint":"chrome","servername":"www.example.com","reality-opts":{"public-key":"Nc9ZSDuQMwHN4M6TeDHjfJhgZ6SBTBbfMwx5iHQZ1ns","short-id":"ab"},"xudp":true,"network":"xhttp","xhttp-opts":{"path":"/x"}} - {"dialer-proxy": "MY-EXIT", "name":"tr \"q\"","type":"trojan","server":"t.example.org","port":"443","password":"p\u0024w","udp":true,"skip-cert-verify":false,"sni":"t.example.org","network":"grpc","grpc-opts":{"grpc-service-name":"g"},"client-fingerprint":"chrome"} - {"dialer-proxy": "MY-EXIT", "name":"hy-own","type":"hysteria2","server":"h.example.net","port":8443,"password":"a\u0024b","obfs":"salamander","obfs-password":"o","up":"50 mbps"} - {"dialer-proxy": "MY-EXIT", "name":"m1","type":"hysteria2","server":"m.example.com","port":443,"password":"p","udp":true} proxy-providers: example: type: http url: "https://sub.example.com/sub/aaa" path: ./providers/example.yaml interval: 3600 proxy: BOOT-AUTO 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 example2: type: http url: "https://sub2.example.com/x?a=1&b=2" path: ./providers/example2.yaml interval: 3600 proxy: BOOT-AUTO 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 # 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. example-my: type: http url: "https://sub.example.com/sub/aaa" path: ./providers/example-my.yaml interval: 3600 proxy: BOOT-AUTO filter: "(?i)\\[MY\\]" override: dialer-proxy: MY-EXIT header: User-Agent: ["mihomo"] 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. example2-my: type: http url: "https://sub2.example.com/x?a=1&b=2" path: ./providers/example2-my.yaml interval: 3600 proxy: BOOT-AUTO filter: "(?i)\\[MY\\]" override: dialer-proxy: MY-EXIT header: User-Agent: ["mihomo"] 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 # services (SERVICES): geosite list anthropic of MetaCubeX/meta-rules-dat geosite-anthropic: type: http behavior: domain format: mrs url: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@meta/geo/geosite/anthropic.mrs" path: ./ruleset/geosite-anthropic.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' - '+.ru' default-nameserver: - 77.88.8.8 - 223.5.5.5 proxy-server-nameserver: - https://77.88.8.8/dns-query direct-nameserver: - 77.88.8.8 - 77.88.8.1 nameserver: - https://dns.google/dns-query - https://1.1.1.1/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: [example, example2] 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: [example, example2] exclude-filter: "(?i)🇷🇺|\\bru\\b|russia|росси|моск" url: "https://www.gstatic.com/generate_204" interval: 300 tolerance: 50 lazy: false # own servers: those of the settings (proxies/30-own_srv) and the "[MY] ..." nodes of # the subscriptions (providers -my); the fastest alive one; pin one in the dashboard if needed - name: MY type: url-test proxies: ["🇩🇪 de 1", "tr \"q\"", "hy-own", "m1"] use: [example-my, example2-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: MY-EXIT type: url-test use: [example, example2] exclude-filter: "(?i)🇷🇺|\\bru\\b|russia|росси|моск" url: "https://www.gstatic.com/generate_204" interval: 300 tolerance: 300 lazy: false # service claude (SERVICES, SVC_*): its own way, whatever MAIN is # through own servers: the first alive one, not the fastest - the exit IP stays the # same while the server lives (a site that checks the region sees one country); # pick another in the dashboard, the choice is remembered - name: CLAUDE type: fallback proxies: ["🇩🇪 de 1", "tr \"q\"", "hy-own", "m1"] use: [example-my, example2-my] url: "https://www.gstatic.com/generate_204" interval: 300 lazy: false - name: MAIN type: select proxies: [FOREIGN, MY, RU, DIRECT] 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 # service claude: above the own lists, below the tunnels, LAN and push - RULE-SET,geosite-anthropic,CLAUDE # 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,RU - RULE-SET,ru-inside,DIRECT # main (home, own white IP): .ru/.рф directly; elsewhere through RU - DOMAIN-SUFFIX,ru,RU - DOMAIN-SUFFIX,xn--p1ai,RU - MATCH,MAIN