MetaCubeX / mihomo

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

[Bug] redir-host 模式无ipv6 #1546

Open Lycofuture opened 1 week ago

Lycofuture commented 1 week ago

Verify steps

Operating System

Android

System Version

android 14 QPR3

Mihomo Version

Prerelease-Alpha Mihomo Meta alpha-a4e84f0 android arm64 with go1.23.1 Wed Sep 25 07:11:27 UTC 2024 Use tags: with_gvisor

Configuration File

port: 7890
socks-port: 7891
mixed-port: 7892
redir-port: 9797
tproxy-port: 9898
allow-lan: true
bind-address: "*"
lan-disallowed-ips:
  - 192.168.0.3/32
authentication:
  - "user1:pass1"
  - "user2:pass2"
skip-auth-prefixes:
  - 127.0.0.1/8
  - ::1/128
lan-allowed-ips:
  - 0.0.0.0/0
  - ::/0
mode: rule
log-level: debug
ipv6: true
keep-alive-interval: 30
find-process-mode: always
external-controller: :9090
external-controller-unix: mihomo.sock
external-controller-tls: 127.0.0.1:9443
external-doh-server: /dns-query
secret: ""
external-ui: ui
external-ui-name: xd
external-ui-url: "https://ghp.ci/https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip"
profile:
  store-selected: true
  store-fake-ip: true
unified-delay: true
tcp-concurrent: true
interface-name: en0
routing-mark: 6666
tls:
  certificate: string
  private-key: string
global-client-fingerprint: chrome
geodata-mode: true
geodata-loader: memconservative
geo-auto-update: true
geo-update-interval: 24
geox-url:
  geoip: "https://ghp.ci/https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat"
  geosite: "https://ghp.ci/https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat"
  mmdb: "https://ghp.ci/https://github.com/Loyalsoldier/geoip/releases/latest/download/Country.mmdb"
  asn: "https://ghp.ci/https://github.com/Loyalsoldier/geoip/blob/release/GeoLite2-ASN.mmdb"
global-ua: clash.meta
ntp:
  enable: true
  write-to-system: false
  server: time.apple.com
  port: 123
  interval: 30
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, 8443]
    QUIC:
      ports: [443, 8443]
  force-domain:
    - +.v2ex.com
  skip-domain:
    - Mijia Cloud
tun:
  enable: true
  stack: mixed
  auto-route: true
  auto-redirect: true
  auto-detect-interface: true
  strict-route: true
  dns-hijack:
    - any:53
    - tcp://any:53
  device: tun0
  mtu: 9000
  iproute2-table-index: 2022
  iproute2-rule-index: 9000
  endpoint-independent-nat: false
  include-interface: []
  exclude-interface: []
  route-address:
    - 0.0.0.0/1
    - 128.0.0.0/1
    - "::/1"
    - "8000::/1"
  route-exclude-address:
    - 192.168.0.0/16
    - fc00::/7
dns:
  enable: true
  prefer-h3: true
  use-hosts: true
  use-system-hosts: true
  respect-rules: true
  listen: :1053
  ipv6: true
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.0/15
  fake-ip-filter-mode: blacklist
  fake-ip-filter:
    - '*'
    - '+.lan'
    - '+.local'
  default-nameserver:
    - 223.5.5.5
    - 119.29.29.29
    - 114.114.114.114
    - '[2402:4e00::]'
    - '[2400:3200::1]'
    - system
  nameserver:
    - 'https://dns.adguard.com/dns-query'
    - 'https://1.1.1.1/dns-query'
    - 'https://8.8.8.8/dns-query'
    - 'https://8.8.4.4/dns-query'
    - 'https://dns.cloudflare.com/dns-query'
    - 'https://[2606:4700:4700::1111]/dns-query'
    - 'https://[2001:4860:4860::8888]/dns-query'
    - 'https://[2001:4860:4860::8844]/dns-query'
    - dhcp://en0
  fallback:
    - 'tls://8.8.8.8'
    - 'tls://1.1.1.1'
    - 'tls://[2001:4860:4860::8888]'
    - 'tls://[2606:4700:4700::1111]'
    - dhcp://en0
  proxy-server-nameserver:
    - 'https://dns.alidns.com/dns-query'
    - 'https://doh.pub/dns-query'
    - 'https://120.53.53.53/dns-query'
    - 'https://223.5.5.5/dns-query'
  nameserver-policy:
    "geosite:cn,private":
      - 'https://dns.alidns.com/dns-query'
      - 'https://doh.pub/dns-query'
  fallback-filter:
    geoip: true
    geoip-code: cn
    geosite:
      - geolocation-!cn
    ipcidr:
      - 240.0.0.0/4
    domain:
      - '+.google.com'
      - '+.facebook.com'
      - '+.youtube.com'

Description

redir-host模式没有ipv6,在 test-ipv6.com 和 ipleak.net 测试ipv6都不通 fake-ip模式则正常

Reproduction Steps

使用 redirect[tcp] + tun[udp] 切换redir-host模式ipv6超时 Screenshot_20240925-191725_Chrome Screenshot_20240925-191736_Chrome

切换fake-ip模式ipv6正常 Screenshot_20240925-192624_Chrome Screenshot_20240925-192122_Chrome

Logs

time="2024-09-25T19:15:21.245351554+08:00" level=info msg="Start initial configuration in progress"
time="2024-09-25T19:15:21.251132075+08:00" level=info msg="Geodata Loader mode: memconservative"
time="2024-09-25T19:15:21.251208013+08:00" level=info msg="Geosite Matcher implementation: succinct"
time="2024-09-25T19:15:21.252419002+08:00" level=info msg="Load GeoSite rule: cn"
time="2024-09-25T19:15:21.727848898+08:00" level=info msg="Load GeoSite rule: category-ads-all"
time="2024-09-25T19:15:22.06385296+08:00" level=info msg="Finished initial GeoSite rule category-ads-all => 🚫广告拦截, records: 73650"
time="2024-09-25T19:15:22.064019314+08:00" level=info msg="Load GeoSite rule: steam@cn"
time="2024-09-25T19:15:22.080785044+08:00" level=info msg="Finished initial GeoSite rule steam@cn => 🎯全球直连, records: 13"
time="2024-09-25T19:15:22.082771554+08:00" level=info msg="Finished initial GeoSite rule cn => 🎯全球直连, records: 90364"
time="2024-09-25T19:15:22.08284171+08:00" level=info msg="Load GeoSite rule: china-list"
time="2024-09-25T19:15:22.411147908+08:00" level=info msg="Finished initial GeoSite rule china-list => 🎯全球直连, records: 88271"
time="2024-09-25T19:15:22.411272491+08:00" level=info msg="Load GeoSite rule: bilibili"
time="2024-09-25T19:15:22.423929991+08:00" level=info msg="Finished initial GeoSite rule bilibili => 🎯全球直连, records: 50"
time="2024-09-25T19:15:22.424849158+08:00" level=info msg="Load GeoIP rule: cn"
time="2024-09-25T19:15:22.466930981+08:00" level=info msg="Finished initial GeoIP rule cn => 🎯全球直连, records: 18377"
time="2024-09-25T19:15:22.467105043+08:00" level=info msg="Load GeoIP rule: private"
time="2024-09-25T19:15:22.481095929+08:00" level=info msg="Finished initial GeoIP rule private => 🎯全球直连, records: 18"
time="2024-09-25T19:15:22.481313898+08:00" level=info msg="Finished initial GeoIP rule cn => 🎯全球直连, records: 18377"
time="2024-09-25T19:15:22.481757908+08:00" level=info msg="Initial configuration complete, total time: 1236ms"
time="2024-09-25T19:15:22.481993533+08:00" level=error msg="External controller tls listen error: parse certificate failed, maybe format error:tls: failed to find any PEM data in certificate input, or path error: open /data/adb/box/clash/string: no such file or directory"
time="2024-09-25T19:15:22.482733689+08:00" level=info msg="RESTful API unix listening at: /data/adb/box/clash/mihomo.sock"
time="2024-09-25T19:15:22.482890043+08:00" level=info msg="RESTful API listening at: [::]:9090"
time="2024-09-25T19:15:22.524575356+08:00" level=info msg="Authentication of local server updated"
time="2024-09-25T19:15:22.524678637+08:00" level=info msg="Sniffer is loaded and working"
time="2024-09-25T19:15:22.524726971+08:00" level=info msg="Use tcp concurrent"
time="2024-09-25T19:15:22.524762179+08:00" level=info msg="Use routing mark: 0x1a0a"
time="2024-09-25T19:15:22.524828116+08:00" level=info msg="NTP service start, sync system time is false"
time="2024-09-25T19:15:22.685484002+08:00" level=error msg="Initialize NTP time failed: dial udp 17.253.114.125:123: no such device\ndial udp 17.253.114.253:123: no such device\ndial udp 17.253.116.125:123: no such device\ndial udp [2403:300:a16:4000::1f2]:123: no such device\ndial udp [2403:300:a16:3000::1f2]:123: no such device\ndial udp [2403:300:a30:4000::1f2]:123: no such device"
time="2024-09-25T19:15:22.687980512+08:00" level=info msg="DNS server listening at: [::]:1053"
time="2024-09-25T19:15:22.688523429+08:00" level=info msg="HTTP proxy listening at: [::]:7890"
time="2024-09-25T19:15:22.689534575+08:00" level=info msg="SOCKS proxy listening at: [::]:7891"
time="2024-09-25T19:15:22.690100304+08:00" level=info msg="Redirect proxy listening at: [::]:9797"
time="2024-09-25T19:15:22.690578845+08:00" level=info msg="TProxy server listening at: [::]:9898"
time="2024-09-25T19:15:22.690927491+08:00" level=info msg="Mixed(http+socks) proxy listening at: [::]:7892"
time="2024-09-25T19:15:22.694904991+08:00" level=warning msg="[TUN] default interface changed by monitor, en0 => rmnet_data4"
time="2024-09-25T19:15:22.816818064+08:00" level=info msg="[TUN] Tun adapter listening at: tun0([198.18.0.0/30],[fdfe:dcba:9876::1/126]), mtu: 9000, auto route: true, auto redir: true, ip stack: Mixed"
time="2024-09-25T19:15:22.817407491+08:00" level=info msg="Start initial provider provider1"
time="2024-09-25T19:15:22.817565095+08:00" level=info msg="Start initial provider provider3"
time="2024-09-25T19:15:22.818029002+08:00" level=info msg="Start initial provider provider2"
time="2024-09-25T19:15:22.834388845+08:00" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
time="2024-09-25T19:15:22.83455572+08:00" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
time="2024-09-25T19:15:22.834817543+08:00" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
time="2024-09-25T19:15:22.848614262+08:00" level=info msg="Start initial provider proxy"
time="2024-09-25T19:15:22.849465981+08:00" level=info msg="Start initial provider BanProgramAD"
time="2024-09-25T19:15:22.850261918+08:00" level=info msg="Start initial provider applications"
time="2024-09-25T19:15:22.85037895+08:00" level=info msg="Start initial provider reject"
time="2024-09-25T19:15:22.850668845+08:00" level=info msg="Start initial provider apple"
time="2024-09-25T19:15:22.855087804+08:00" level=info msg="Start initial provider ChinaCompanyIp"
time="2024-09-25T19:15:22.855687283+08:00" level=info msg="Start initial provider ASNChina"
time="2024-09-25T19:15:22.855815043+08:00" level=info msg="Start initial provider EasyListChina"
time="2024-09-25T19:15:22.858005929+08:00" level=info msg="Start initial provider BanAD"
time="2024-09-25T19:15:22.867267804+08:00" level=info msg="Start initial provider direct"
time="2024-09-25T19:15:22.867451085+08:00" level=info msg="Start initial provider gfw"
time="2024-09-25T19:15:22.871928116+08:00" level=info msg="Start initial provider ChinaMedia"
time="2024-09-25T19:15:22.850337335+08:00" level=info msg="Start initial provider BanEasyListChina"
time="2024-09-25T19:15:22.883384835+08:00" level=info msg="Start initial provider icloud"
time="2024-09-25T19:15:22.884286918+08:00" level=info msg="Start initial provider EasyPrivacy"
time="2024-09-25T19:15:22.87341046+08:00" level=info msg="Start initial provider EasyList"
time="2024-09-25T19:15:22.873571658+08:00" level=info msg="Start initial provider ChinaIpV6"
time="2024-09-25T19:15:22.922227283+08:00" level=info msg="Start initial provider ProgramAD"
time="2024-09-25T19:15:22.850360304+08:00" level=info msg="Start initial provider private"
time="2024-09-25T19:15:22.892371397+08:00" level=info msg="Start initial provider lancidr"
time="2024-09-25T19:15:22.873304158+08:00" level=info msg="Start initial provider telegramcidr"
time="2024-09-25T19:15:22.88129421+08:00" level=info msg="Start initial provider BanEasyList"
time="2024-09-25T19:15:22.920583325+08:00" level=info msg="Start initial provider cncidr"
time="2024-09-25T19:15:22.873353637+08:00" level=info msg="Start initial provider ChinaIp"
time="2024-09-25T19:15:22.878596189+08:00" level=info msg="Start initial provider BanEasyPrivacy"
time="2024-09-25T19:15:22.873463585+08:00" level=info msg="Start initial provider google"
time="2024-09-25T19:15:22.921091241+08:00" level=info msg="Start initial provider greatfire"
time="2024-09-25T19:15:22.92115645+08:00" level=info msg="Start initial provider Bilibili"
time="2024-09-25T19:15:22.873518116+08:00" level=info msg="Start initial provider ChinaDomain"
time="2024-09-25T19:15:22.874055929+08:00" level=info msg="Start initial provider tld-not-cn"
time="2024-09-25T19:15:22.872999887+08:00" level=info msg="Start initial provider AD"
time="2024-09-25T19:15:23.708672543+08:00" level=info msg="[TCP] mihomo --> www.jinyuxiaowo.com:443 match Match using 🔰节点选择[🎯全球直连]"
time="2024-09-25T19:15:23.72745473+08:00" level=info msg="[TCP] mihomo --> www.jinyuxiaowo.com:443 match Match using 🔰节点选择[🎯全球直连]"
time="2024-09-25T19:15:23.904596605+08:00" level=info msg="[TCP] mihomo --> 123.mot.cloudns.biz:443 match Match using 🔰节点选择[🎯全球直连]"
time="2024-09-25T19:15:23.905832387+08:00" level=info msg="[TCP] mihomo --> 123.mot.cloudns.biz:443 match Match using 🔰节点选择[🎯全球直连]"
time="2024-09-25T19:15:25.54638749+08:00" level=info msg="[TCP] mihomo --> api.ytools.cc:443 match Match using 🔰节点选择[日本-vless]"
time="2024-09-25T19:15:25.868181917+08:00" level=info msg="Start initial Compatible provider default"
time="2024-09-25T19:15:25.868246969+08:00" level=info msg="Start initial Compatible provider 🔰节点选择"
time="2024-09-25T19:15:25.868324573+08:00" level=info msg="UI already exists, skip downloading"
time="2024-09-25T19:15:25.868673011+08:00" level=info msg="[GEO] last update time 2024-09-24 23:30:14.546533946 +0800 CST"
time="2024-09-25T19:15:26.709900042+08:00" level=info msg="[TCP] mihomo --> api.ytools.cc:443 match Match using 🔰节点选择[日本-vless]"
time="2024-09-25T19:15:29.267712124+08:00" level=info msg="Load ASN file: /data/adb/box/clash/ASN.mmdb"
time="2024-09-25T19:15:29.600367749+08:00" level=info msg="[TCP] 198.18.0.0:46006 --> modules.lsposed.org:443 match Match using 🔰节点选择[日本-vless]"
time="2024-09-25T19:15:31.822451654+08:00" level=info msg="[TCP] 198.18.0.0:40216 --> 119.28.121.215:8081 match RuleSet(ASNChina) using 🎯全球直连"
time="2024-09-25T19:15:32.82697405+08:00" level=info msg="[TCP] 198.18.0.0:47228 --> 119.28.121.215:8081 match RuleSet(ASNChina) using 🎯全球直连"
time="2024-09-25T19:15:42.283354359+08:00" level=info msg="[TCP] 198.18.0.0:38394 --> mime.baidu.com:443 match RuleSet(ASNChina) using 🎯全球直连"
time="2024-09-25T19:15:49.834437377+08:00" level=info msg="[TCP] 198.18.0.0:39382(com.android.chrome, uid=10191) --> test-ipv6.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:15:51.768728053+08:00" level=info msg="[UDP] 198.18.0.0:39681(com.android.chrome, uid=10191) --> clients2.google.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:15:51.778845189+08:00" level=info msg="[TCP] 198.18.0.0:43228(com.android.chrome, uid=10191) --> ds.osaka.test-ipv6.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:15:51.79462472+08:00" level=info msg="[TCP] 198.18.0.0:43240(com.android.chrome, uid=10191) --> ds.osaka.test-ipv6.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:15:51.914295761+08:00" level=info msg="[TCP] 198.18.0.0:43254(com.android.chrome, uid=10191) --> ds.v6ns.osaka.test-ipv6.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:15:52.033584303+08:00" level=info msg="[TCP] 198.18.0.0:43260(com.android.chrome, uid=10191) --> ds.osaka.test-ipv6.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:15:52.167485449+08:00" level=info msg="[TCP] 198.18.0.0:44562(com.android.chrome, uid=10191) --> ds.v6ns.osaka.test-ipv6.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:15:53.063682271+08:00" level=info msg="[TCP] 198.18.0.0:44568(com.android.chrome, uid=10191) --> ipv4.osaka.test-ipv6.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:15:54.074971021+08:00" level=info msg="[TCP] 198.18.0.0:49480(com.android.chrome, uid=10191) --> ipv4.lookup.test-ipv6.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:16:05.401597371+08:00" level=info msg="[UDP] 198.18.0.0:49714(com.android.chrome, uid=10191) --> 142.251.32.46:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:16:16.500557054+08:00" level=info msg="[TCP] 198.18.0.0:37874 --> szminorshort.weixin.qq.com:80 match RuleSet(ASNChina) using 🎯全球直连"
time="2024-09-25T19:16:21.918324135+08:00" level=info msg="[TCP] 198.18.0.0:37808(com.android.chrome, uid=10191) --> ipv4.main.test-ipv6.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:16:27.525979289+08:00" level=info msg="[TCP] 198.18.0.0:48252(com.android.chrome, uid=10191) --> ipleak.net:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:16:27.789679862+08:00" level=info msg="[TCP] 198.18.0.0:48254(com.android.chrome, uid=10191) --> ipleak.net:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:16:30.431021215+08:00" level=info msg="[TCP] 198.18.0.0:48268(com.android.chrome, uid=10191) --> lne90u9hz3atox2rjt4csv00bb8js1h9kgofwei4-1.ipleak.net:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:16:30.662199653+08:00" level=info msg="[TCP] 198.18.0.0:48274(com.android.chrome, uid=10191) --> lne90u9hz3atox2rjt4csv00bb8js1h9kgofwei4-1.ipleak.net:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:16:31.446308559+08:00" level=info msg="[TCP] 198.18.0.0:48280(com.android.chrome, uid=10191) --> ipv4.ipleak.net:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-25T19:16:35.344278193+08:00" level=info msg="[TCP] 198.18.0.0:48592 --> szextshort.weixin.qq.com:80 match RuleSet(ASNChina) using 🎯全球直连"
time="2024-09-25T19:16:37.343270484+08:00" level=info msg="[TCP] 198.18.0.0:42320 --> szminorshort.weixin.qq.com:80 match RuleSet(ASNChina) using 🎯全球直连"
time="2024-09-25T19:16:45.011508241+08:00" level=info msg="[UDP] 198.18.0.0:38509(com.android.chrome, uid=10191) --> clients4.google.com:443 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
xiandu999-yu commented 1 week ago

日志等级你忘改了...

Lycofuture commented 1 week ago

一年四季你忘了改...

debug太大了,没发复制,我上传文件吧 clash.log

LevineWoo commented 1 week ago

我是只要开tun,就都无法直连ipv6

Lycofuture commented 1 week ago

配置关闭tun也没ipv6(只要是redir-host模式),并且此配置只能 redirect[tcp] + tun[udp] 才能使用。我并不知道到是什么原因导致的,还是哪个配置写错了 这是mihomo直接启动的日志

mihomo.log

Skyxim commented 1 week ago
curl -v https://\[2606:4700:4700::1111\]
curl -v https://ipv6.google.com

分别访问给出结果

Lycofuture commented 1 week ago
curl -v https://\[2606:4700:4700::1111\]
curl -v https://ipv6.google.com

分别访问给出结果

~ $ curl -v https://ipv6.google.com


* Host ipv6.google.com:443 was resolved.
* IPv6: 2404:6800:400a:813::200e
* IPv4: (none)
*   Trying [2404:6800:400a:813::200e]:443...
* connect to 2404:6800:400a:813::200e port 443 from fdfe:dcba:9876::1 port 42596 failed: Connection timed out
* Failed to connect to ipv6.google.com port 443 after 31517 ms: Couldn't connect to server
* Closing connection
curl: (28) Failed to connect to ipv6.google.com port 443 after 31517 ms: Couldn't connect to server

~ $ curl -v https://\[2606:4700:4700::1111]


*   Trying [2606:4700:4700::1111]:443...
* connect to 2606:4700:4700::1111 port 443 from fdfe:dcba:9876::1 port 42640 failed: Connection timed out
* Failed to connect to 2606:4700:4700::1111 port 443 after 31492 ms: Couldn't connect to server
* Closing connection
curl: (28) Failed to connect to 2606:4700:4700::1111 port 443 after 31492 ms: Couldn't connect to server
Skyxim commented 1 week ago
curl -v https://\[2606:4700:4700::1111\]
curl -v https://ipv6.google.com

分别访问给出结果

~ $ curl -v https://ipv6.google.com

* Host ipv6.google.com:443 was resolved.
* IPv6: 2404:6800:400a:813::200e
* IPv4: (none)
*   Trying [2404:6800:400a:813::200e]:443...
* connect to 2404:6800:400a:813::200e port 443 from fdfe:dcba:9876::1 port 42596 failed: Connection timed out
* Failed to connect to ipv6.google.com port 443 after 31517 ms: Couldn't connect to server
* Closing connection
curl: (28) Failed to connect to ipv6.google.com port 443 after 31517 ms: Couldn't connect to server

~ $ curl -v https://[2606:4700:4700::1111]


*   Trying [2606:4700:4700::1111]:443...
* connect to 2606:4700:4700::1111 port 443 from fdfe:dcba:9876::1 port 42640 failed: Connection timed out
* Failed to connect to 2606:4700:4700::1111 port 443 after 31492 ms: Couldn't connect to server
* Closing connection
curl: (28) Failed to connect to 2606:4700:4700::1111 port 443 after 31492 ms: Couldn't connect to server

没有任何劫持 IPv6 流量发生,你具体用 TUN?iptables?

Lycofuture commented 1 week ago
curl -v https://\[2606:4700:4700::1111\]
curl -v https://ipv6.google.com

分别访问给出结果

~ $ curl -v https://ipv6.google.com

* Host ipv6.google.com:443 was resolved.
* IPv6: 2404:6800:400a:813::200e
* IPv4: (none)
*   Trying [2404:6800:400a:813::200e]:443...
* connect to 2404:6800:400a:813::200e port 443 from fdfe:dcba:9876::1 port 42596 failed: Connection timed out
* Failed to connect to ipv6.google.com port 443 after 31517 ms: Couldn't connect to server
* Closing connection
curl: (28) Failed to connect to ipv6.google.com port 443 after 31517 ms: Couldn't connect to server

~ $ curl -v https://[2606:4700:4700::1111]


*   Trying [2606:4700:4700::1111]:443...
* connect to 2606:4700:4700::1111 port 443 from fdfe:dcba:9876::1 port 42640 failed: Connection timed out
* Failed to connect to 2606:4700:4700::1111 port 443 after 31492 ms: Couldn't connect to server
* Closing connection
curl: (28) Failed to connect to 2606:4700:4700::1111 port 443 after 31492 ms: Couldn't connect to server

没有任何劫持 IPv6 流量发生,你具体用 TUN?iptables?

有劫持吧,配置文件里开了tun, iptables 不太清楚,我只知道这个模式使用不了v6 ,这次测试的完整日志放下面了


time="2024-09-26T12:37:31.570888114+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:31.573125145+08:00" level=debug msg="[Process] find process beacons.gcp.gvt2.com error: process not found"
time="2024-09-26T12:37:31.573528114+08:00" level=info msg="[UDP] 198.18.0.0:46138 --> beacons.gcp.gvt2.com:443 match RuleSet(reject) using 🚫广告拦截"
time="2024-09-26T12:37:33.224612957+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:33.225524571+08:00" level=debug msg="[Process] find process beacons2.gvt2.com error: process not found"
time="2024-09-26T12:37:33.226190457+08:00" level=info msg="[UDP] 198.18.0.0:38040 --> beacons2.gvt2.com:443 match RuleSet(reject) using 🚫广告拦截"
time="2024-09-26T12:37:56.407652115+08:00" level=debug msg="Hopped to 172.233.81.251:28093"
time="2024-09-26T12:37:56.523638885+08:00" level=debug msg="Hopped to 172.233.81.251:24036"
time="2024-09-26T12:37:56.548022167+08:00" level=debug msg="Hopped to 172.233.81.251:24731"
time="2024-09-26T12:37:56.709627062+08:00" level=debug msg="Hopped to 172.233.81.251:20448"
time="2024-09-26T12:37:57.06474425+08:00" level=debug msg="Hopped to 172.233.81.251:24389"
time="2024-09-26T12:37:57.561044927+08:00" level=debug msg="Hopped to 172.233.81.251:26604"
time="2024-09-26T12:37:57.589465448+08:00" level=debug msg="Hopped to 172.233.81.251:26497"
time="2024-09-26T12:37:57.595693833+08:00" level=debug msg="Hopped to 172.233.81.251:26474"
time="2024-09-26T12:37:57.699663052+08:00" level=debug msg="[Sniffer] Sniff tcp [198.18.0.0:38862]-->[183.47.121.90:80] success, replace domain []-->[szextshort.weixin.qq.com]"
time="2024-09-26T12:37:57.699890604+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.700007218+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from "
time="2024-09-26T12:37:57.700712166+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from tls://[2606:4700:4700::1111]:853"
time="2024-09-26T12:37:57.700805135+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.701294041+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from tls://8.8.8.8:853"
time="2024-09-26T12:37:57.701366854+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from tls://1.1.1.1:853"
time="2024-09-26T12:37:57.701430031+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from tls://[2001:4860:4860::8888]:853"
time="2024-09-26T12:37:57.701591437+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.702778989+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.702842322+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.702855708+08:00" level=debug msg="[Process] find process szextshort.weixin.qq.com error: process not found"
time="2024-09-26T12:37:57.705871645+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from "
time="2024-09-26T12:37:57.705948885+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from tls://8.8.8.8:853"
time="2024-09-26T12:37:57.705977947+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.70890175+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from tls://[2001:4860:4860::8888]:853"
time="2024-09-26T12:37:57.708975447+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.716812218+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from tls://[2606:4700:4700::1111]:853"
time="2024-09-26T12:37:57.71691576+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.720832479+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from tls://1.1.1.1:853"

time="2024-09-26T12:37:57.699890604+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.700007218+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from "
time="2024-09-26T12:37:57.700712166+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from tls://[2606:4700:4700::1111]:853"
time="2024-09-26T12:37:57.700805135+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.701294041+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from tls://8.8.8.8:853"
time="2024-09-26T12:37:57.701366854+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from tls://1.1.1.1:853"
time="2024-09-26T12:37:57.701430031+08:00" level=debug msg="[DNS] resolve ipv6.google.com AAAA from tls://[2001:4860:4860::8888]:853"
time="2024-09-26T12:37:57.701591437+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.702778989+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.702842322+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.702855708+08:00" level=debug msg="[Process] find process szextshort.weixin.qq.com error: process not found"
time="2024-09-26T12:37:57.705871645+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from "
time="2024-09-26T12:37:57.705948885+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from tls://8.8.8.8:853"
time="2024-09-26T12:37:57.705977947+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.70890175+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from tls://[2001:4860:4860::8888]:853"
time="2024-09-26T12:37:57.708975447+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.716812218+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from tls://[2606:4700:4700::1111]:853"
time="2024-09-26T12:37:57.71691576+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.720832479+08:00" level=debug msg="[DNS] resolve ipv6.google.com A from tls://1.1.1.1:853"
time="2024-09-26T12:37:57.720936489+08:00" level=debug msg="[Rule] use default rules"
time="2024-09-26T12:37:57.72217826+08:00" level=debug msg="[DNS] resolve szextshort.weixin.qq.com A from https://doh.pub:443/dns-query"
time="2024-09-26T12:37:57.722610031+08:00" level=debug msg="[DNS] resolve szextshort.weixin.qq.com A from https://dns.alidns.com:443/dns-query"
time="2024-09-26T12:37:57.722771072+08:00" level=debug msg="[DNS] resolve szextshort.weixin.qq.com AAAA from https://dns.alidns.com:443/dns-query"
time="2024-09-26T12:37:57.7228455+08:00" level=debug msg="[DNS] resolve szextshort.weixin.qq.com AAAA from https://doh.pub:443/dns-query"
time="2024-09-26T12:37:57.817173312+08:00" level=debug msg="[DNS] szextshort.weixin.qq.com --> [183.47.118.249 119.147.19.143 119.147.19.225 183.47.124.53 183.60.8.218 183.60.8.150 183.47.124.77 183.47.121.90 183.47.118.145 183.47.121.104] A from https://dns.alidns.com:443/dns-query"
time="2024-09-26T12:37:57.817272791+08:00" level=debug msg="[DNS] szextshort.weixin.qq.com --> [240e:97c:2f:1006::2d 240e:97c:2f:1005::18 240e:97c:2f:3047::5 240e:97c:2f:3046::30 240e:97c:2f:4001::31 240e:ff:f100:43::20 240e:ff:f100:44::28 240e:ff:f100:5003::a 240e:ff:f100:5004::c] AAAA from https://dns.alidns.com:443/dns-query"
time="2024-09-26T12:37:57.819342218+08:00" level=info msg="[TCP] mihomo --> 8.8.8.8:853 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-26T12:37:57.825961437+08:00" level=info msg="[TCP] mihomo --> [2606:4700:4700::1111]:853 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-26T12:37:57.826320656+08:00" level=info msg="[TCP] mihomo --> 1.1.1.1:853 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"
time="2024-09-26T12:37:57.826359927+08:00" level=info msg="[TCP] mihomo --> [2606:4700:4700::1111]:853 match Match using 🔰节点选择[Japan 1 ᵛ⁶]"

clash.log

xishang0128 commented 1 week ago

切换gvisor栈即可,可能Android的问题