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] key missing for tun inbound #1672

Closed
9 tasks done
Long0x0 opened this issue Nov 25, 2024 · 8 comments
Closed
9 tasks done

[Bug] key missing for tun inbound #1672

Long0x0 opened this issue Nov 25, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Long0x0
Copy link

Long0x0 commented Nov 25, 2024

验证步骤

  • 我已经阅读了 文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我仔细看过 文档 并未解决问题
  • 我已在 Issue Tracker 中寻找过我要提出的问题,并且没有找到
  • 我是中文用户,而非其他语言用户
  • 我已经使用最新的 Alpha 分支版本测试过,问题依旧存在
  • 我提供了可以在本地重现该问题的服务器、客户端配置文件与流程,而不是一个脱敏的复杂客户端配置文件。
  • 我提供了可用于重现我报告的错误的最简配置,而不是依赖远程服务器或者堆砌大量对于复现无用的配置等。
  • 我提供了完整的日志,而不是出于对自身智力的自信而仅提供了部分认为有用的部分。
  • 我直接使用 Mihomo 命令行程序重现了错误,而不是使用其他工具或脚本。

操作系统

Windows

系统版本

23H2

Mihomo 版本

Mihomo Meta alpha-eb985b0 windows amd64 with go1.23.3 Thu Nov 21 14:54:05 UTC 2024
Use tags: with_gvisor

配置文件

mode: rule
log-level: debug

listeners:
  - name: tun-in
    type: tun
    stack: system
    dns-hijack:
      - 0.0.0.0:53
    auto-route: true
    auto-detect-interface: true
    exclude-interface: []
    inet4-address:
      - 198.19.0.1/30

    ## the following keys are mandatory?
    # iproute2-table-index: 2022
    # iproute2-rule-index: 9000
    # auto-redirect: true
    # auto-redirect-input-mark: 6666
    # auto-redirect-output-mark: 6667
    # route-address: []
    # route-address-set: []
    # route-exclude-address: []
    # route-exclude-address-set: []

rules:
  - MATCH,DIRECT

描述

tun入站的配置默认缺少iproute2-table-indexiproute2-rule-index等。部分键值在文档里也没有提到。记得前几个版本没有问题。

重现方式

./mihomo-windows-amd64-alpha.exe -f ./config.yaml -t

日志

time="2024-11-25T13:15:01.2130283+08:00" level=info msg="Start initial configuration in progress"
time="2024-11-25T13:15:01.2202054+08:00" level=error msg="proxy 0: key 'iproute2-table-index' missing"
configuration file config.yaml test failed

time="2024-11-25T13:15:07.0055137+08:00" level=info msg="Start initial configuration in progress"
time="2024-11-25T13:15:07.0131423+08:00" level=error msg="proxy 0: key 'iproute2-rule-index' missing"
configuration file config.yaml test failed

time="2024-11-25T13:15:10.222249+08:00" level=info msg="Start initial configuration in progress"
time="2024-11-25T13:15:10.2300203+08:00" level=error msg="proxy 0: key 'auto-redirect' missing"
configuration file config.yaml test failed

time="2024-11-25T13:15:13.3484527+08:00" level=info msg="Start initial configuration in progress"
time="2024-11-25T13:15:13.3566058+08:00" level=error msg="proxy 0: key 'auto-redirect-input-mark' missing"
configuration file config.yaml test failed

time="2024-11-25T13:15:16.5719643+08:00" level=info msg="Start initial configuration in progress"
time="2024-11-25T13:15:16.5796745+08:00" level=error msg="proxy 0: key 'auto-redirect-output-mark' missing"
configuration file config.yaml test failed

time="2024-11-25T13:15:19.5153912+08:00" level=info msg="Start initial configuration in progress"
time="2024-11-25T13:15:19.5235885+08:00" level=error msg="proxy 0: key 'route-address' missing"
configuration file config.yaml test failed

time="2024-11-25T13:15:22.0491507+08:00" level=info msg="Start initial configuration in progress"
time="2024-11-25T13:15:22.0563157+08:00" level=error msg="proxy 0: key 'route-address-set' missing"
configuration file config.yaml test failed

time="2024-11-25T13:15:25.372104+08:00" level=info msg="Start initial configuration in progress"
time="2024-11-25T13:15:25.379812+08:00" level=error msg="proxy 0: key 'route-address-set' missing"
configuration file config.yaml test failed

time="2024-11-25T13:15:27.8285588+08:00" level=info msg="Start initial configuration in progress"
time="2024-11-25T13:15:27.8383566+08:00" level=error msg="proxy 0: key 'route-exclude-address-set' missing"
configuration file config.yaml test failed
@Long0x0 Long0x0 added the bug Something isn't working label Nov 25, 2024
@E021ntox
Copy link

E021ntox commented Dec 5, 2024

@xishang0128 同样的问题

@wwqgtxx

@E021ntox
Copy link

E021ntox commented Dec 21, 2024

@xishang0128 请求修复一下,新版还是缺少iproute2-table-index

wwqgtxx added a commit that referenced this issue Dec 28, 2024
@wwqgtxx wwqgtxx closed this as completed Dec 28, 2024
@E021ntox
Copy link

E021ntox commented Dec 28, 2024

@wwqgtxx 更新后还是缺少 Parse config error: proxy 2: key 'exclude-interface' missing

ExcludeInterface []string `inbound:"exclude-interface"`

wwqgtxx added a commit that referenced this issue Dec 28, 2024
@E021ntox
Copy link

E021ntox commented Dec 28, 2024

@wwqgtxx 还是不能正常使用

  - { name: tun-in, type: tun, stack: system }

level=error msg="Listener tun-in listen err: missing interface address"

@wwqgtxx
Copy link
Collaborator

wwqgtxx commented Dec 28, 2024

listeners里的tun需要自己配置inet4-addressinet6-address,和顶层配置中的tun不一样

@E021ntox
Copy link

listeners里的tun需要自己配置inet4-addressinet6-address,和顶层配置中的tun不一样

感谢解答,可以同步一下两边的配置逻辑吗?否则应该会有很多人迁移过来后会遇到问题

@wwqgtxx
Copy link
Collaborator

wwqgtxx commented Dec 28, 2024

不会同步,listeners里的tun从来就不建议使用,仅留给高级用户处理特殊需求,正常情况请使用顶层配置中的tun

@E021ntox
Copy link

不会同步,listeners里的tun从来就不建议使用,仅留给高级用户处理特殊需求,正常情况请使用顶层配置中的tun

好的,但是从统一配置逻辑的角度来说,全部放进listener其实更合理点

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

3 participants