本方式仅适用于 clash meta 新版本内核,且要在配置的 General 部分设置
geox-url
。
geox-url 设置#
geox-url:
geoip: "https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat"
geosite: "https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat"
mmdb: "https://cdn.jsdelivr.net/gh/Loyalsoldier/geoip@release/Country.mmdb"
规则#
rules:
# > RULES_LOCAL
- DOMAIN-SUFFIX,ip6-localhost,DIRECT
- DOMAIN-SUFFIX,ip6-loopback,DIRECT
- DOMAIN-SUFFIX,lan,DIRECT
- DOMAIN-SUFFIX,local,DIRECT
- DOMAIN-SUFFIX,localhost,DIRECT
- IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
- IP-CIDR,100.64.0.0/10,DIRECT,no-resolve
- IP-CIDR,127.0.0.0/8,DIRECT,no-resolve
- IP-CIDR,172.16.0.0/12,DIRECT,no-resolve
- IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
- IP-CIDR,198.18.0.0/16,DIRECT,no-resolve
- IP-CIDR,224.0.0.0/4,DIRECT,no-resolve
- IP-CIDR6,::1/128,DIRECT,no-resolve
- IP-CIDR6,fc00::/7,DIRECT,no-resolve
- IP-CIDR6,fe80::/10,DIRECT,no-resolve
- IP-CIDR6,fd00::/8,DIRECT,no-resolve
- DOMAIN-SUFFIX,cm.steampowered.com,DIRECT
- DOMAIN-SUFFIX,steamserver.net,DIRECT
# > GEOSITE
- GEOSITE,category-ads-all,REJECT
- GEOSITE,category-games@cn,DIRECT
- GEOSITE,apple@cn,DIRECT
- GEOSITE,netflix,🔰 选择节点
- GEOSITE,disney,🔰 选择节点
- GEOSITE,youtube,🔰 选择节点
- GEOSITE,google,🔰 选择节点
- GEOSITE,microsoft@cn,DIRECT
- GEOSITE,microsoft,🔰 选择节点
- GEOSITE,geolocation-!cn,🔰 选择节点
- GEOSITE,cn,DIRECT
- GEOIP,telegram,🔰 选择节点,no-resolve
- GEOIP,netflix,🔰 选择节点,no-resolve
- GEOIP,private,DIRECT,no-resolve
- GEOIP,CN,DIRECT,no-resolve
- MATCH,🔰 选择节点
本方式は、clash meta の新しいバージョンのカーネルにのみ適用され、設定の General セクションで
geox-url
を設定する必要があります。
- rule-provider モードが必要な場合は、 こちらをご覧ください
- foss バージョンの通常のルールが必要な場合は、 こちらをご覧ください
geox-url の設定#
geox-url:
geoip: "https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geoip.dat"
geosite: "https://cdn.jsdelivr.net/gh/Loyalsoldier/v2ray-rules-dat@release/geosite.dat"
mmdb: "https://cdn.jsdelivr.net/gh/Loyalsoldier/geoip@release/Country.mmdb"
ルール#
rules:
# > RULES_LOCAL
- DOMAIN-SUFFIX,ip6-localhost,DIRECT
- DOMAIN-SUFFIX,ip6-loopback,DIRECT
- DOMAIN-SUFFIX,lan,DIRECT
- DOMAIN-SUFFIX,local,DIRECT
- DOMAIN-SUFFIX,localhost,DIRECT
- IP-CIDR,10.0.0.0/8,DIRECT,no-resolve
- IP-CIDR,100.64.0.0/10,DIRECT,no-resolve
- IP-CIDR,127.0.0.0/8,DIRECT,no-resolve
- IP-CIDR,172.16.0.0/12,DIRECT,no-resolve
- IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
- IP-CIDR,198.18.0.0/16,DIRECT,no-resolve
- IP-CIDR,224.0.0.0/4,DIRECT,no-resolve
- IP-CIDR6,::1/128,DIRECT,no-resolve
- IP-CIDR6,fc00::/7,DIRECT,no-resolve
- IP-CIDR6,fe80::/10,DIRECT,no-resolve
- IP-CIDR6,fd00::/8,DIRECT,no-resolve
- DOMAIN-SUFFIX,cm.steampowered.com,DIRECT
- DOMAIN-SUFFIX,steamserver.net,DIRECT
# > GEOSITE
- GEOSITE,category-ads-all,REJECT
- GEOSITE,category-games@cn,DIRECT
- GEOSITE,apple@cn,DIRECT
- GEOSITE,netflix,🔰 选择节点
- GEOSITE,disney,🔰 选择节点
- GEOSITE,youtube,🔰 选择节点
- GEOSITE,google,🔰 选择节点
- GEOSITE,microsoft@cn,DIRECT
- GEOSITE,microsoft,🔰 选择节点
- GEOSITE,geolocation-!cn,🔰 选择节点
- GEOSITE,cn,DIRECT
- GEOIP,telegram,🔰 选择节点,no-resolve
- GEOIP,netflix,🔰 选择节点,no-resolve
- GEOIP,private,DIRECT,no-resolve
- GEOIP,CN,DIRECT,no-resolve
- MATCH,🔰 选择节点