MetaCubeX / mihomo

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

[Bug] 使用tun模式时,开启ipv6会导致tun内核启动失败 #1667

Closed SixGodSGD closed 2 days ago

SixGodSGD commented 2 days ago

Verify steps

Operating System

Android

System Version

安卓15

Mihomo Version

v1.18.10

Configuration File

mixed-port: 1080
redir-port: 7891
tproxy-port: 1536
allow-lan: true
mode: rule
log-level: debug

ipv6: true
keep-alive-interval: 15
keep-alive-idle: 15
unified-delay: true
tcp-concurrent: true
external-controller: 127.0.0.1:9090
external-ui: ui
secret: ""
external-ui-url: "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip"

find-process-mode: always
global-client-fingerprint: chrome

profile:
  store-selected: true
  store-fake-ip: true

sniffer:
  enable: true
  sniff:
    HTTP:
      ports: [80, 8080-8880]
      override-destination: true
    TLS:
      ports: [443, 8443]
    QUIC:
      ports: [443, 8443]
  skip-domain:
    - "Mijia Cloud"
    - "+.oray.com"
    - "+.oray.net"
    - "+.orayer.com"
    - "+.apple.com"
    - "dlg.io.mi.com"

tun:
  enable: true
  stack: gvisor
  device: tun0
  mtu: 9000
  dns-hijack:
    - "any:53"
    - "tcp://any:53"
  auto-route: true
  strict-route: true
#  auto-redirect: true
  auto-detect-interface: true

Description

time="2024-11-23T17:30:08.486507524+08:00" level=error msg="Start TUN listening error: configure tun interface: permission denied"

Reproduction Steps

开启配置文件中的ipv6即可复现问题

Logs

time="2024-11-23T17:30:08.486507524+08:00" level=error msg="Start TUN listening error: configure tun interface: permission denied"
covenant-stars commented 2 days ago

@SixGodSGD 开启ipv6权限被拒绝应该是因为本地没有ipv6 而且配置不了ipv6地址 安卓系统问题或者自己iptables彻底关掉了系统的ipv6(比如是通过模块运行的 但是模块关闭了ipv6)

covenant-stars commented 2 days ago

@covenant-stars 你也可以打开ipv6 但是不配置tun的ipv6地址来使用

SixGodSGD commented 2 days ago

@covenant-stars 我尝试自己添加v6地址,确实可以启动,但是发现v6会漏尿