Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 大量的TUN ipv6连接导致内存和CPU全满 #926

Open
5 of 6 tasks
ASLoveY opened this issue Dec 19, 2023 · 10 comments
Open
5 of 6 tasks

[Bug] 大量的TUN ipv6连接导致内存和CPU全满 #926

ASLoveY opened this issue Dec 19, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@ASLoveY
Copy link

ASLoveY commented Dec 19, 2023

Verify steps

  • 确保你使用的是本仓库最新的的 mihomo 或 mihomo Alpha 版本 Ensure you are using the latest version of Mihomo or Mihomo Alpha from this repository.
  • 如果你可以自己 debug 并解决的话,提交 PR 吧 Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
  • 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • 我已经使用 Alpha 分支版本测试过,问题依旧存在 I have tested using the dev branch, and the issue still exists.
  • 我已经仔细看过 Documentation 并无法自行解决问题 I have read the documentation and was unable to solve the issue.
  • 这是 Mihomo 核心的问题,并非我所使用的 Mihomo 衍生版本(如 OpenMihomo、KoolMihomo 等)的特定问题 This is an issue of the Mihomo core per se, not to the derivatives of Mihomo, like OpenMihomo or KoolMihomo.

Mihomo version

Mihomo Meta alpha-9d8c3b0 windows amd64 with go1.21.5

What OS are you seeing the problem on?

Windows

Mihomo config

mode: rule
mixed-port: 64163
allow-lan: false
log-level: error
ipv6: true
secret: ''
external-controller: 127.0.0.1:9097
dns:
  enable: true
  listen: 127.0.0.1:8853
  default-nameserver:
  - 223.5.5.5
  - 8.8.4.4
  ipv6: false
  enhanced-mode: fake-ip
  nameserver:
  - 119.29.29.29
  - 223.5.5.5
  - tls://223.5.5.5:853
  - tls://223.6.6.6:853
  - tls://120.53.53.53
  - tls://1.12.12.12
  fallback:
  - https://1.0.0.1/dns-query
  - https://public.dns.iij.jp/dns-query
  - tls://8.8.4.4:853
  fallback-filter:
    geoip: false
    ipcidr:
    - 240.0.0.0/4
    - 0.0.0.0/32
    - 127.0.0.1/32
    domain:
    - +.facebook.com
    - +.twitter.com
    - +.google.com
    - +.googleapis.com
    - +.google.cn
    - +.googleapis.cn
    - +.xn--ngstr-lra8j.com
    - +.googlevideo.com
    - +.gvt1.com
    - +.gmail.com
    - +.youtube.com
    - +.youtu.be
    - +.gvt0.com
    - +.gvt2.com
    - +.gvt3.com
    - +.gstatic.com
    - +.265.com
    - +.2mdn.net
    - +.app-measurement.com
    - +.c.admob.com
    - +.clickserve.dartsearch.net
    - +.crl.pki.goog
    - +.doubleclick.net
    - +.firebase-settings.crashlytics.com
    - +.google-analytics.com
    - +.googleadservices.com
    - +.googleanalytics.com
    - +.googleoptimize.com
    - +.googlesyndication.com
    - +.googletagmanager.com
    - +.googletagservices.com
  fake-ip-filter:
  - '*.lan'
  - '*.localdomain'
  - '*.example'
  - '*.invalid'
  - '*.localhost'
  - '*.test'
  - '*.local'
  - '*.home.arpa'
  - time.*.com
  - time.*.gov
  - time.*.edu.cn
  - time.*.apple.com
  - time1.*.com
  - time2.*.com
  - time3.*.com
  - time4.*.com
  - time5.*.com
  - time6.*.com
  - time7.*.com
  - ntp.*.com
  - ntp1.*.com
  - ntp2.*.com
  - ntp3.*.com
  - ntp4.*.com
  - ntp5.*.com
  - ntp6.*.com
  - ntp7.*.com
  - '*.time.edu.cn'
  - '*.ntp.org.cn'
  - +.pool.ntp.org
  - time1.cloud.tencent.com
  - music.163.com
  - '*.music.163.com'
  - '*.126.net'
  - musicapi.taihe.com
  - music.taihe.com
  - songsearch.kugou.com
  - trackercdn.kugou.com
  - '*.kuwo.cn'
  - api-jooxtt.sanook.com
  - api.joox.com
  - joox.com
  - y.qq.com
  - '*.y.qq.com'
  - streamoc.music.tc.qq.com
  - mobileoc.music.tc.qq.com
  - isure.stream.qqmusic.qq.com
  - dl.stream.qqmusic.qq.com
  - aqqmusic.tc.qq.com
  - amobile.music.tc.qq.com
  - '*.xiami.com'
  - '*.music.migu.cn'
  - music.migu.cn
  - +.msftconnecttest.com
  - +.msftncsi.com
  - msftconnecttest.com
  - msftncsi.com
  - localhost.ptlogin2.qq.com
  - localhost.sec.qq.com
  - +.srv.nintendo.net
  - +.stun.playstation.net
  - xbox.*.microsoft.com
  - xnotify.xboxlive.com
  - +.ipv6.microsoft.com
  - +.battlenet.com.cn
  - +.wotgame.cn
  - +.wggames.cn
  - +.wowsgame.cn
  - +.wargaming.net
  - proxy.golang.org
  - stun.*.*
  - stun.*.*.*
  - +.stun.*.*
  - +.stun.*.*.*
  - +.stun.*.*.*.*
  - heartbeat.belkin.com
  - '*.linksys.com'
  - '*.linksyssmartwifi.com'
  - '*.router.asus.com'
  - mesu.apple.com
  - swscan.apple.com
  - swquery.apple.com
  - swdownload.apple.com
  - swcdn.apple.com
  - swdist.apple.com
  - lens.l.google.com
  - stun.l.google.com
  - '*.square-enix.com'
  - '*.finalfantasyxiv.com'
  - '*.ffxiv.com'
  - '*.ff14.sdo.com'
  - ff.dorado.sdo.com
  - '*.mcdn.bilivideo.cn'
  - +.media.dssott.com
  - +.pvp.net
  fake-ip-range: 198.18.0.1/16
tun:
  enable: true
  stack: gvisor
  dns-hijack:
  - any:53
  auto-route: true
  auto-detect-interface: true
hosts:
  mtalk.google.com: 108.177.125.188
  services.googleapis.cn: 74.125.203.94
experimental:
  ignore-resolve-fail: true
bind-address: '*'
unified-delay: true
udp: true
cfw-latency-timeout: 8000
cfw-latency-url: http://YouTube.com/generate_204

Mihomo log

No response

Description

在一小段时间后会出现内存和CPU使用大量增加的情况

@ASLoveY ASLoveY added the bug Something isn't working label Dec 19, 2023
@ASLoveY
Copy link
Author

ASLoveY commented Dec 19, 2023

图片暂时发不上来,
clash-meta-alpha会把本机的CPU和内存全部吃完,最多会吃掉16G+的内存,检查连接会出现大量的ipv6 tun连接,都是由clash-meta-alpha发起

@ASLoveY ASLoveY changed the title [Bug] [Bug] 大量的TUN ipv6连接导致内存和CPU全满 Dec 19, 2023
@ASLoveY
Copy link
Author

ASLoveY commented Dec 19, 2023

time="2023-12-19T15:06:32.7693929+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7700888+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7700888+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7705927+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.772477+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7731489+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7738507+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7738507+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7738507+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7738507+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7749044+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7749044+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7759236+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7766578+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7766578+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7771634+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7771634+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7771634+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.7815586+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.8040313+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.8116816+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.8604399+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55099(clash-meta-alpha.exe) --> [240e:352:8107:6100:0:ff:fe11:e01]:8445 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8707293+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55100(clash-meta-alpha.exe) --> [240e:3a0:540c:a65c:9ea:2be:74d:eb0d]:8447 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8757999+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55101(clash-meta-alpha.exe) --> [240e:3a0:b0e:23c5:d216:f012:ec00:c5be]:8445 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8757999+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55103(clash-meta-alpha.exe) --> [2002:6f4e:4ebd:0:32a6:12ff:fe09:cd97]:8445 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8766903+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55102(clash-meta-alpha.exe) --> [2408:8226:c701:b089:3d65:c214:51ad:39f4]:8449 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8787981+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55104(clash-meta-alpha.exe) --> [2408:864c:3000:68d4:1ca4:eff:fed3:dbce]:8449 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8793501+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55105(clash-meta-alpha.exe) --> [240e:3a0:9c0a:2679:28b:49a3:b56:4081]:8446 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8806844+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55107(clash-meta-alpha.exe) --> [240e:398:1200:3a22:32a6:12ea:9209:3ea9]:8445 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8806844+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55106(clash-meta-alpha.exe) --> [240e:378:3a05:6660:68c6:de41:a0ae:3f86]:8445 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8811908+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55108(clash-meta-alpha.exe) --> [240e:3b1:f133:bb90:1c63:58ff:feec:9345]:8445 match GeoIP(CN) using DIRECT"
time="2023-12-19T15:06:32.8909143+08:00" level=debug msg="[Rule] use default rules"
time="2023-12-19T15:06:32.892923+08:00" level=debug msg="[Rule] use default rules"

@ASLoveY
Copy link
Author

ASLoveY commented Dec 19, 2023

log中出现大量这样的ipv6连接和规则匹配,直接导致内存和CPU被完全占用

@ASLoveY
Copy link
Author

ASLoveY commented Dec 19, 2023

@li60240
Copy link

li60240 commented Dec 20, 2023

time="2023-12-19T15:06:32.7693929+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7700888+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7700888+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7705927+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.772477+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7731489+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7738507+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7738507+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7738507+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7738507+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7749044+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7749044+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7759236+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7766578+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7766578+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7771634+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7771634+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7771634+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.7815586+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.8040313+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.8116816+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.8604399+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55099(clash-meta-alpha.exe) --> [240e:352:8107:6100:0:ff:fe11:e01]:8445 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8707293+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55100(clash-meta-alpha.exe) --> [240e:3a0:540c:a65c:9ea:2be:74d:eb0d]:8447 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8757999+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55101(clash-meta-alpha.exe) --> [240e:3a0:b0e:23c5:d216:f012:ec00:c5be]:8445 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8757999+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55103(clash-meta-alpha.exe) --> [2002:6f4e:4ebd:0:32a6:12ff:fe09:cd97]:8445 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8766903+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55102(clash-meta-alpha.exe) --> [2408:8226:c701:b089:3d65:c214:51ad:39f4]:8449 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8787981+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55104(clash-meta-alpha.exe) --> [2408:864c:3000:68d4:1ca4:eff:fed3:dbce]:8449 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8793501+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55105(clash-meta-alpha.exe) --> [240e:3a0:9c0a:2679:28b:49a3:b56:4081]:8446 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8806844+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55107(clash-meta-alpha.exe) --> [240e:398:1200:3a22:32a6:12ea:9209:3ea9]:8445 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8806844+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55106(clash-meta-alpha.exe) --> [240e:378:3a05:6660:68c6:de41:a0ae:3f86]:8445 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8811908+08:00" level=info msg="[UDP] [2409:8a00:1857:23c0:b0b3:3dad:2377:3964]:55108(clash-meta-alpha.exe) --> [240e:3b1:f133:bb90:1c63:58ff:feec:9345]:8445 match GeoIP(CN) using DIRECT" time="2023-12-19T15:06:32.8909143+08:00" level=debug msg="[Rule] use default rules" time="2023-12-19T15:06:32.892923+08:00" level=debug msg="[Rule] use default rules"

log中出现大量这样的ipv6连接和规则匹配,直接导致内存和CPU被完全占用

遇到同样的错误,ipv6 匹配 cpu爆满

@Magic989
Copy link

Magic989 commented Jan 2, 2024

我也碰到了,IPv6 数据回环。
使用 box for magisk 在手机上运行 mihomo 内核。
内核向本机 IPv6 地址发送大量数据,手机上实时网速显示 400MB/s ,WebUI 卡得快不能动了,猜测是不同地区 IPv6 网络环境差异较大,直接操作防火墙转发数据的风险较大,也没有能够兼容所有网络环境的方案,目前恐怕只能通过关闭 IPv6 来解决。

@Journalist-HK
Copy link

我观察到只要启动BT客户端,就会出现大量UDP连接,直接卡死。

@flyflas
Copy link

flyflas commented Jan 27, 2024

同样使用box for magisk。在开启ipv6时,出现回环。
发生回环的日志如下:

time="2024-01-27T04:08:16.421281998Z" level=info msg="[TCP] 10.8.168.130:45642 --> cdn-mum.alibabachengdun.com:80 match GeoSite(cn) using DIRECT"
time="2024-01-27T04:08:16.787135956Z" level=info msg="[TCP] 10.8.168.130:49332 --> api.kingdata.ksyun.com:80 match GeoSite(cn) using DIRECT"
time="2024-01-27T04:08:16.978507466Z" level=info msg="[UDP] 10.8.168.130:44456(com.taobao.taobao, uid=10289) --> 27.222.18.252:443 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:16.982510695Z" level=info msg="[TCP] 10.8.168.130:38032 --> 59.82.9.145:80 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:17.097762362Z" level=info msg="[UDP] 10.8.168.130:39367(com.taobao.taobao, uid=10289) --> 111.206.225.225:443 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:17.138356164Z" level=info msg="[TCP] [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:40314(com.taobao.taobao, uid=10289) --> [2408:4001:f00::2a2]:443 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:17.153735747Z" level=info msg="[TCP] 10.8.168.130:46286 --> 27.222.18.251:80 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:17.376748456Z" level=info msg="[TCP] [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:40574(com.taobao.taobao, uid=10289) --> [2408:872f:900:9:3::3f7]:443 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:17.392426372Z" level=info msg="[TCP] 10.8.168.130:46070 --> guide-acs.m.taobao.com:443 match GeoSite(cn) using DIRECT"
time="2024-01-27T04:08:17.60409106Z" level=info msg="[TCP] [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:42246(com.tencent.mm, uid=10264) --> [2408:80f1:21:5001::19]:80 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:17.924612883Z" level=info msg="[TCP] 10.8.168.130:41732 --> cdn.ynuf.aliapp.org:80 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:18.120202101Z" level=info msg="[TCP] 10.8.168.130:40150(com.taobao.taobao, uid=10289) --> 123.125.216.235:80 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:18.332215382Z" level=info msg="[TCP] 10.8.168.130:49498 --> mpush-api.aliyun.com:443 match GeoSite(cn) using DIRECT"
time="2024-01-27T04:08:18.458856893Z" level=info msg="[TCP] 10.8.168.130:37926 --> mum.alibabachengdun.com:443 match GeoSite(cn) using DIRECT"
time="2024-01-27T04:08:19.178144965Z" level=info msg="[TCP] 10.8.168.130:40564(com.taobao.taobao, uid=10289) --> 61.48.83.231:443 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:19.188444288Z" level=info msg="[TCP] 10.8.168.130:43894(com.taobao.taobao, uid=10289) --> 61.48.83.231:80 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:19.485862778Z" level=info msg="[UDP] [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:42497(com.taobao.taobao, uid=10289) --> [2408:4001:f10::21f]:443 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:19.559882882Z" level=info msg="[UDP] [2408:4001:f10::21f]:443(clash) --> [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:42497 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:19.571622569Z" level=info msg="[UDP] [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:42007(clash) --> [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:42497 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:19.613739132Z" level=info msg="[UDP] [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:46502(clash) --> [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:42497 match GeoIP(CN) using DIRECT"
time="2024-01-27T04:08:19.629892257Z" level=info msg="[UDP] [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:46806(clash) --> [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:42497 match GeoIP(CN) using DIRECT"

在此之后,一直有这样的回环:

time="2024-01-27T04:08:19.629892257Z" level=info msg="[UDP] [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:46806(clash) --> [2408:8406:1981:2bf1:2017:68c9:9146:2d02]:42497 match GeoIP(CN) using DIRECT"

DNS设置如下

dns:
  enable: true
  prefer-h3: true
  listen: 0.0.0.0:1053
  use-hosts: true
  ipv6: true
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  fake-ip-filter:
  - '*'
  - +.lan
  - +.local
  default-nameserver:
  - 114.114.114.114
  - 223.5.5.5
  - 127.0.0.1:53
  nameserver:
  - 114.114.114.114
  - 223.5.5.5
  - https://dns.alidns.com/dns-query
  proxy-server-nameserver:
  - https://dns.alidns.com/dns-query
  - https://8.8.8.8/dns-query#🔬 Dns Proxy
  - https://1.1.1.1/dns-query#🔬 Dns Proxy
  fallback:
  - https://8.8.8.8/dns-query#🔬 Dns Proxy
  - https://1.1.1.1/dns-query#🔬 Dns Proxy
  nameserver-policy:
    geosite:private:
    - https://doh.pub/dns-query
    - https://dns.alidns.com/dns-query
    geosite:geolocation-!cn:
    - https://dns.cloudflare.com/dns-query#🔬 Dns Proxy
    - https://dns.google/dns-query#🔬 Dns Proxy

@flyflas
Copy link

flyflas commented Feb 14, 2024

我也碰到了,IPv6 数据回环。 使用 box for magisk 在手机上运行 mihomo 内核。 内核向本机 IPv6 地址发送大量数据,手机上实时网速显示 400MB/s ,WebUI 卡得快不能动了,猜测是不同地区 IPv6 网络环境差异较大,直接操作防火墙转发数据的风险较大,也没有能够兼容所有网络环境的方案,目前恐怕只能通过关闭 IPv6 来解决。

box for magisk iptables规则的问题。添加定时检测ipv6的脚本就能解决。

@lovitus
Copy link

lovitus commented Apr 10, 2024

#1178
看日志这两个issues是一样的问题. 都和ipv6+tun有关

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants