MetaCubeX / mihomo

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

[Bug] geoip问题 #1083

Closed Nine499 closed 5 months ago

Nine499 commented 6 months ago

Verify steps

Mihomo version

alpha-974332c

What OS are you seeing the problem on?

Windows

Mihomo config

mixed-port: 4949
ipv6: false
log-level: warning
mode: rule
keep-alive-interval: 1800
unified-delay: true
tcp-concurrent: true
global-client-fingerprint: iOS
geox-url:
  geoip: "https://fast.nine499.uk/3aaa9/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat"
  geosite: "https://fast.nine499.uk/3aaa9/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat"
  mmdb: "https://fast.nine499.uk/3aaa9/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb"
geo-auto-update: true
geo-update-interval: 24
dns:
    enable: true
    listen: 0.0.0.0:4953
    ipv6: false
    enhanced-mode: fake-ip
    fake-ip-range: 22.49.0.1/16
    nameserver:
      - https://dns.alidns.com/dns-query#h3=true
49-jiedian: &49-jiedian
  type: http
  interval: 10800
  override:
    skip-cert-verify: true
    udp: true
  health-check:
    enable: true
    interval: 10800
    url: https://cp.cloudflare.com/generate_204
proxy-providers:
    huayun:
        <<: *49-jiedian
        url: "https://api.flowercloud.xyz/"
    bocchi:
        <<: *49-jiedian
        url: "https://bocchi.site/api/v1/client/"
49-xuanze: &49-xuanze
  type: select
  use:
    - huayun
    - bocchi
proxy-groups:
  - name: 49鱼
    <<: *49-xuanze
  - name: 日本媒体
    <<: *49-xuanze
  - name: 台湾媒体
    <<: *49-xuanze
  - name: 大流量下载
    <<: *49-xuanze
49-guize: &49-guize
  behavior: classical
  interval: 10800
  type: http
rule-providers:
  da:
    <<: *49-guize
    url: "https://box.nine499.uk/clash_meta_aaa/rule/app/da.txt"
  jp:
    <<: *49-guize
    url: "https://box.nine499.uk/clash_meta_aaa/rule/app/jp.txt"
  tw:
    <<: *49-guize
    url: "https://box.nine499.uk/clash_meta_aaa/rule/app/tw.txt"
  REJECT49:
    <<: *49-guize
    url: "https://box.nine499.uk/clash_meta_aaa/rule/REJECT.txt"
  PROXY49:
    <<: *49-guize
    url: "https://box.nine499.uk/clash_meta_aaa/rule/PROXY.txt"
  DIRECT49:
    <<: *49-guize
    url: "https://box.nine499.uk/clash_meta_aaa/rule/DIRECT.txt"
rules:
  - AND,((DST-PORT,443),(NETWORK,udp)),REJECT
  - RULE-SET,da,大流量下载
  - RULE-SET,jp,日本媒体
  - RULE-SET,tw,台湾媒体
  - RULE-SET,REJECT49,REJECT
  - RULE-SET,PROXY49,49鱼
  - RULE-SET,DIRECT49,DIRECT
  - GEOIP,CN,DIRECT
  - MATCH,49鱼

Mihomo log

No response

Description

mmdb: "https://fast.nine499.uk/3aaa9/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.metadb"

只要使用 geoip.metadb 以外的任何文件,GEOIP,CN,DIRECT 就像坏了一样不匹配规则,流量全会流向MATCH。 已测试文件 meta-rules-dat 的 country-lite.mmdb country.mmdb 和 Loyalsoldier/geoip 的 Country-only-cn-private.mmdb

RodmanWang commented 6 months ago

同问题,最新的几个内核版本都是这样,退回2月29日之前的就是正常的

rickblue commented 6 months ago

geodata-mode: true 用上面的设置试试,默认false表示用.mmdb格式的geoip库,但是我发现这样ip规则不起作用,修改成true也就是使用.dat的格式的就行了,原因未知,用的meta alpha最新版。

xuelide commented 6 months ago

同问题,mmdb失效 暂时用geodata-mode: true,配geoip.dat就好了 用的alpha,天天更,大概这5 6天出现的问题

wwqgtxx commented 6 months ago

导致问题的commit已被撤销,请更新最新alpha尝试是否恢复正常 https://github.com/MetaCubeX/mihomo/commit/6b74ade897c6b307e068e44cfee96a7b57640685

rickblue commented 6 months ago

升级到alpha-6b74ade,问题仍存在,我这里用的clash verge。

xishang0128 commented 6 months ago

升级到alpha-6b74ade,问题仍存在,我这里用的clash verge。

再试试?最近有修改过

RodmanWang commented 6 months ago

我这边已经可以了,感谢大佬的辛苦付出。

rickblue commented 6 months ago

升级到alpha-6b74ade,问题仍存在,我这里用的clash verge。

再试试?最近有修改过

奇怪,我这里还不行,用的clash verge最新版,内核也是alpha最新版,以下是部分配置:

mixed-port: 7891
bind-address: 127.0.0.1
mode: rule
sniffer:
  enable: true
  parse-pure-ip: false
  sniff: {HTTP: {ports: [80, 8080-8880], override-destination: true}, TLS: {ports: [443, 8443]}, QUIC: {ports: [443, 8443]}}
  skip-domain: ['Mijia Cloud']
profile:
  store-selected: true
  store-fake-ip: true
tcp-concurrent: true 
secret: '123456'
external-controller: 127.0.0.1:9090
external-ui: ui/m
external-ui-name: xd
geox-url:
  geosite: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat"
  geoip: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat"
  mmdb: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/Country.mmdb"
geodata-mode: false
geodata-loader: standard
geo-auto-update: true
geo-update-interval: 72
xishang0128 commented 6 months ago

升级到alpha-6b74ade,问题仍存在,我这里用的clash verge。

再试试?最近有修改过

奇怪,我这里还不行,用的clash verge最新版,内核也是alpha最新版,以下是部分配置:

mixed-port: 7891
bind-address: 127.0.0.1
mode: rule
sniffer:
  enable: true
  parse-pure-ip: false
  sniff: {HTTP: {ports: [80, 8080-8880], override-destination: true}, TLS: {ports: [443, 8443]}, QUIC: {ports: [443, 8443]}}
  skip-domain: ['Mijia Cloud']
profile:
  store-selected: true
  store-fake-ip: true
tcp-concurrent: true 
secret: '123456'
external-controller: 127.0.0.1:9090
external-ui: ui/m
external-ui-name: xd
geox-url:
  geosite: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geosite.dat"
  geoip: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/geoip.dat"
  mmdb: "https://cdn.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@release/Country.mmdb"
geodata-mode: false
geodata-loader: standard
geo-auto-update: true
geo-update-interval: 72

log呢

rickblue commented 6 months ago

仔细查看了连接规则,发现内核已经加载mmdb数据,ip规则已经生效,但web面板(metacubexd、yacd)geoip规则部分都显示0,误导了我,感谢大佬! 另,mmdb和dat用起来用啥大的区别么?

xishang0128 commented 6 months ago

@rickblue db不会显示数量,只有dat可以

rickblue commented 6 months ago

@rickblue db不会显示数量,只有dat可以 原来这样啊,又学到了,^^……

PullGuy commented 6 months ago

哪位能解释一下geoip.dat和country.mmdb在性能上有差吗?