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模式下auto-route为false时仍会添加ipv6路由和规则 #1239

Open
7 tasks done
Yuanandcircle opened this issue Apr 30, 2024 · 1 comment
Open
7 tasks done
Labels
bug Something isn't working

Comments

@Yuanandcircle
Copy link

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

Linux

System Version

OpenWrt 23.05.3

Mihomo Version

v1.18.4

Configuration File

tun:
  enable: true
  stack: system
  auto-route: false
  auto-detect-interface: false

Description

TUN模式下,设置auto-route为false时,mihomo仍会添加ipv6路由和规则。

root@openwrt:~# ip -6 rule
0:      from all lookup local
32765:  from all lookup 2022
32766:  from all lookup main

root@openwrt:~# ip -6 route
default dev utun  metric 1024

Reproduction Steps

Linux下开启tun模式即可复现

Logs

No response

@Yuanandcircle Yuanandcircle added the bug Something isn't working label Apr 30, 2024
@dyhkwong
Copy link

dyhkwong commented May 8, 2024

该行为来自 https://github.com/SagerNet/sing-tun/blob/fb6e917a2cd7a5e6a0c45cc5291f2cbe9c8e8bcb/tun_rules.go#L106-L179 ,似乎是为了避免有 Inet6Address 但没有 ipv6 路由时,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

2 participants