Skip to content

[Bug] redir-host 模式无ipv6,以及其他dns配置问题 #1546

Description

@Kwisma

Verify steps

  • I have read the documentation and understand the meaning of all configuration items I have written, avoiding a large number of seemingly useful options or default values.
  • I have not reviewed the documentation and resolve this issue.
  • I have not searched the Issue Tracker for the problem I am going to raise.
  • I have tested with the latest Alpha branch version, and the issue still persists.
  • I have provided server and client configuration files and processes that can reproduce the issue locally, rather than a desensitized complex client configuration file.
  • I have provided the simplest configuration that can reproduce the error I reported, rather than relying on remote servers, TUN, graphical client interfaces, or other closed-source software.
  • I have provided complete configuration files and logs, rather than providing only parts that I believe are useful due to confidence in my own intelligence.

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 ᵛ⁶]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions