MetaCubeX / mihomo

A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API.
https://wiki.metacubex.one
MIT License
16.67k stars 2.66k forks source link

[Bug] fake-ip-filter geosite 未生效 #1629

Closed xaotag closed 2 weeks ago

xaotag commented 2 weeks ago

Verify steps

Operating System

Linux

System Version

Linux arch 6.11.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Tue, 22 Oct 2024 18:31:38 +0000 x86_64 GNU/Linux

Mihomo Version

Mihomo Meta 1.10.0 linux amd64 with go1.23.2 unknown time Use tags: with_gvisor 编译参数 go build -o clash-meta -a -ldflags '-s -w -linkmode external -extldflags "-static"' -tags with_gvisor 源码版本 3e966e82c793ca99e3badc84bf3f2907b100edae (HEAD -> Alpha, origin/Alpha) chore: update quic-go to 0.48.0 docker 运行参数 docker run --name clash-meta --device=/dev/net/tun:/dev/net/tun --cap-add=NET_ADMIN -v /home/aiden/.config/clash/:/root/.config/clash/ --network=host -d --restart always xaotag/clash-meta:latest

dockerfile

FROM alpine
COPY clash-meta /usr/bin
CMD [ "clash-meta","-d","/root/.config/clash" ]

Configuration File

-lan: true
mixed-port: 7890
mode: rule
external-controller: 0.0.0.0:9090
secret: "2cb545e798144aee8bde9ab6f2473621"
find-process-mode: strict
profile:
  store-selected: true
  store-fake-ip: false
geo-auto-update: true
geodata-mode: true
geo-update-interval: 24
geox-url:
  geoip: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat"
  geosite: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat"
  mmdb: "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/country.mmdb"
  asn: "https://github.com/xishang0128/geoip/releases/download/latest/GeoLite2-ASN.mmdb"
external-ui: ./ui
external-ui-url: "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip"
sniffer:
  enable: true
  force-dns-mapping: true
  parse-pure-ip: true
  override-destination: false
  sniff:
    HTTP:
      ports: [80, 8080-8880]
      override-destination: true
    TLS:
      ports: [443, 22]
    QUIC:
      ports: [443, 22]
  force-domain:
    - +.github.com
    - +.google.com
    - +.youtube.com
dns:
  enable: true
  ipv6: true
  prefer-h3: false
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter-mode: blacklist
  fake-ip-filter:
    - geosite:cn
    - geosite:github
    - "+.stun.*.*"
    - "+.stun.*.*.*"
    - "+.stun.*.*.*.*"
    - "+.stun.*.*.*.*.*"
    - "*.n.n.srv.nintendo.net"
    - "+.stun.playstation.net"
    - "+.github.com"
    - "+.activision.*"
    - "+.demonware.*"
  nameserver:
    - https://dns.alidns.com/dns-query
tun:
  enable: true
  stack: system
  auto-route: true
  auto-detect-interface: true # 自动识别出口网卡
  dns-hijack:
    - any:53 # 需要劫持的 dns-hijack
proxy: &proxy
  interval: 60
  health-check:
    enable: true
    url: http://www.gstatic.com/generate_204
    interval: 300
proxy-providers:
  ikunnn:
    type: http
    path: ./proxies/ikunnn.yaml
    url: "*************"
    <<: *proxy
  doggygo:
    type: http
    path: ./proxies/doggygo.yaml
    url: "***************"
    <<: *proxy
proxy-groups:
  - name: 游戏节点
    type: select
    url: http://cp.cloudflare.com/
    interval: 600
    filter: "IEPL"
    proxies:
      - DIRECT
    use:
      - ikunnn
  - name: 选择节点
    url: http://www.gstatic.com/generate_204
    type: select
    interval: 600
    proxies:
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇸 美国节点
      - DIRECT
  - name: 🐟 漏网之鱼
    url: http://www.gstatic.com/generate_204
    type: select
    interval: 600
    proxies:
      - 选择节点
      - 🇯🇵 日本节点
      - 🇺🇸 美国节点
      - DIRECT
  - name: 🌐 谷歌服务
    url: http://www.gstatic.com/generate_204
    type: select
    interval: 600
    proxies:
      - 选择节点
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇸 美国节点
      - DIRECT
  - name: 📲 电报消息
    url: http://www.gstatic.com/generate_204
    type: select
    interval: 3600
    proxies:
      - 选择节点
      - 🇭🇰 香港节点
      - 🇯🇵 日本节点
      - 🇺🇸 美国节点
  - name: 🎮 游戏平台
    type: select
    url: http://www.gstatic.com/generate_204
    interval: 60
    proxies:
      - 选择节点
      - 🇭🇰 香港节点
      - DIRECT
  - name: 📗 代码平台
    type: select
    url: http://www.gstatic.com/generate_204
    interval: 60
    proxies:
      - 选择节点
      - 🇯🇵 日本节点
      - 🇺🇸 美国节点
      - 🇭🇰 香港节点
      - DIRECT
  - name: 🤖 人工智能
    type: select
    filter: "日本|美国|英国"
    url: http://www.gstatic.com/generate_204
    interval: 600
    use:
      - ikunnn
      - doggygo
  - name: 🚫 广告过滤
    type: select
    url: http://www.gstatic.com/generate_204
    interval: 3600
    proxies:
      - REJECT
      - DIRECT
  - name: 🇭🇰 香港节点
    type: load-balance
    filter: "香港"
    url: http://www.gstatic.com/generate_204
    interval: 15
    use: # 引入proxy-provider 使用 use 关键字
      - doggygo
      - ikunnn
  - name: 🇺🇸 美国节点
    type: load-balance
    filter: "美国"
    url: http://www.gstatic.com/generate_204
    interval: 15
    use: # 引入proxy-provider 使用 use 关键字
      - doggygo
      - ikunnn
  - name: 🇯🇵 日本节点
    type: load-balance
    filter: "日本"
    url: http://www.gstatic.com/generate_204
    interval: 15
    use: # 引入proxy-provider 使用 use 关键字
      - ikunnn
rule-providers:
  gamedown:
    type: http
    behavior: classical
    url: "https://cdn.jsdelivr.net/gh/ACL4SSR/ACL4SSR@master/Clash/Providers/Ruleset/GameDownload.yaml"
    path: ./profiles/rules/gamedown.yaml
    interval: 86400
  reject:
    type: http
    behavior: domain
    url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt"
    path: ./profiles/rules/reject.yaml
    interval: 86400

rules:
  - GEOSITE,category-ads,🚫 广告过滤
  - RULE-SET,reject,🚫 广告过滤
  - PROCESS-NAME,aria2c,DIRECT
  - RULE-SET,gamedown,DIRECT
  - GEOSITE,steam,🎮 游戏平台
  - GEOSITE,openai,🤖 人工智能
  - GEOSITE,sony,游戏节点
  - GEOSITE,playstation,DIRECT
  - GEOSITE,google,🌐 谷歌服务
  - GEOSITE,googlefcm,🌐 谷歌服务
  - GEOSITE,youtube,🌐 谷歌服务
  - GEOSITE,telegram,📲 电报消息
  - GEOSITE,docker,📗 代码平台
  - GEOSITE,github,📗 代码平台
  - GEOSITE,gitlab,📗 代码平台
  - DOMAIN,pincong.com,言论自由
  - GEOSITE,cn,DIRECT
  - GEOIP,CN,DIRECT
  - SRC-IP-CIDR,192.168.10.5/32,游戏节点
  - MATCH,🐟 漏网之鱼

Description

dns:
  enable: true
  ipv6: true
  prefer-h3: false
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter-mode: blacklist
  fake-ip-filter:
    - geosite:cn
    - geosite:github
    - "+.stun.*.*"
    - "+.stun.*.*.*"
    - "+.stun.*.*.*.*"
    - "+.stun.*.*.*.*.*"
    - "*.n.n.srv.nintendo.net"
    - "+.stun.playstation.net"
    - "+.github.com"
    - "+.activision.*"
    - "+.demonware.*"

这段配置中的geosite没有生效,同样的geosite 分流生效

Reproduction Steps

在使用geosite:cn中 百度域名依然发生了fake-ip映射 image

Logs

/
xaotag commented 2 weeks ago

@xishang0128 这么详细都不遵循模板吗?

xishang0128 commented 2 weeks ago

@xaotag 中文用户使用英文模板