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其实更合理点

kitty314 added a commit to kitty314/mihomoababold that referenced this issue Feb 13, 2025
commit ccc3f84
Author: clash-meta-maintainer[bot] <148681994+clash-meta-maintainer[bot]@users.noreply.github.com>
Date:   Sat Feb 8 23:28:08 2025 +0800

    license: any downstream projects not affiliated with `MetaCubeX` shall not contain the word `mihomo` in their names

commit 9bfb10d
Author: ForestL <45709305+ForestL18@users.noreply.github.com>
Date:   Wed Feb 5 10:10:58 2025 +0800

    chore: extracting compressed files to correct location (#1823)

commit 0a5ea37
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Feb 4 15:28:06 2025 +0800

    chore: update dependencies

commit a440f64
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Feb 4 15:09:27 2025 +0800

    chore: alignment capability for vmess inbound

commit 0ac6c3b
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Feb 4 00:44:18 2025 +0800

    feat: inbound support vless

commit b69e52d
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Jan 21 00:45:49 2025 +0800

    chore: deprecated `routing-mark` and `interface-name` of the group, please set it directly on the proxy instead

commit 9c73b5b
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Mon Jan 20 23:01:26 2025 +0800

    fix: the trustcerts not add to globalCerts after ca.ResetCertificate (#1801)
    support PEM format for custom-certificates too

commit fc23318
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Sun Jan 19 09:56:16 2025 +0800

    feat: add receive window config for hy2
    MetaCubeX/mihomo#1796

commit 192d769
Author: tnextday <fw2k4@163.com>
Date:   Thu Jan 16 10:17:32 2025 +0800

    chore: ensure forced domains are always sniffed (#1793)

    When a domain matches forceDomain:
    - SkipList is not checked
    - Failed attempts are not cached
    - Sniffing is attempted every time

    This ensures forced domains are always sniffed regardless of previous failures.

commit c99c71a
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Thu Jan 16 10:16:37 2025 +0800

    chore: listening tcp together for dns server (#1792)

commit c7661d7
Author: lucidhz <38235555+lucidhz@users.noreply.github.com>
Date:   Tue Jan 7 13:25:54 2025 +0800

    fix:  initialize error message with cipher (#1760)

commit 56c1288
Author: Mossia <63834850+MuXia-0326@users.noreply.github.com>
Date:   Tue Jan 7 13:26:56 2025 +0800

    fix: empty proxy provider subscription info not omitted (#1759)

commit f4806b4
Author: enfein <83481737+enfein@users.noreply.github.com>
Date:   Tue Jan 7 05:25:32 2025 +0000

    chore: update mieru version (#1762)

commit 49d54cc
Author: J.K.SAGE <sage417@users.noreply.github.com>
Date:   Tue Jan 7 13:23:05 2025 +0800

    fix: remote conn statistic error (#1776)

    TCP handshake traffic should be counted as upload traffic for the remote connection

commit 1c5f4a3
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Dec 31 16:42:33 2024 +0800

    chore: update dependencies

commit 368b1e1
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Mon Dec 30 22:33:13 2024 +0800

    chore: rollback tfo-go version

commit a9ce5da
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Sat Dec 28 10:59:06 2024 +0800

    fix: key missing for tun inbound
    MetaCubeX/mihomo#1672

commit 301c78f
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Thu Dec 26 10:50:08 2024 +0800

    chore: update sing-tun to v0.4.5

commit 72a126e
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Wed Dec 25 10:23:55 2024 +0800

    feat: support inline proxy provider

commit 20739f5
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Wed Dec 25 10:31:40 2024 +0800

    chore: code cleanup

commit 89dfabe
Author: valord577 <30427460+valord577@users.noreply.github.com>
Date:   Thu Dec 19 15:55:47 2024 +0800

    chore: align time fields in logs (#1704)

    ref: A comma or decimal point followed by one or more zeros represents a fractional second, printed to the given number of decimal places. A comma or decimal point followed by one or more nines represents a fractional second, printed to the given number of decimal places, with trailing zeros removed. For example "15:04:05,000" or "15:04:05.000" formats or parses with millisecond precision.

commit 5a9ad0e
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Thu Dec 19 09:29:17 2024 +0800

    chore: code cleanup

commit bb80324
Author: qianlongzt <18493471+qianlongzt@users.noreply.github.com>
Date:   Thu Dec 19 09:16:45 2024 +0800

    feat: support inline rule provider (#1731)

commit 3f6823b
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Mon Dec 16 09:26:11 2024 +0800

    fix: handle invalid values in Decoder's decode method

commit c786b72
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Sat Dec 14 13:27:28 2024 +0800

    chore: update dependencies

commit 269c525
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Sat Dec 14 11:09:31 2024 +0800

    chore: update gopsutil to v4

commit c7fc93d
Author: laburaps <laburaps@gmail.com>
Date:   Thu Dec 12 19:02:34 2024 +0800

    fix: the TLS Sniffer fails when the length of the ClientHello packet exceeds the TCP MSS (#1711)

    * chore: add uniformly formatted debug info to sniffDomain

    * fix: when data is not enough, attempt to peek more data and retry

    * chore: reduce debug info of sniffDomain

commit 5d9d8f4
Author: laburaps <laburaps@gmail.com>
Date:   Tue Dec 10 16:15:08 2024 +0800

    fix: check whether the dst port is within the specified range (#1706)

commit f3a43fe
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Dec 10 09:57:20 2024 +0800

    feat: support read config file from stdin
    via `-f -`

commit 9a95920
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Dec 10 09:19:59 2024 +0800

    chore: support config `multiplexing` of mieru

commit cd23112
Author: enfein <83481737+enfein@users.noreply.github.com>
Date:   Tue Dec 10 00:03:17 2024 +0000

    chore: remove gRPC dependency from mieru (#1705)

commit 613becd
Author: enfein <83481737+enfein@users.noreply.github.com>
Date:   Mon Dec 9 04:05:11 2024 +0000

    feat: support mieru protocol (#1702)

commit d6b496d
Author: hingbong <hingbonglo@gmail.com>
Date:   Wed Dec 4 00:54:01 2024 +0000

    chore: allow upgrade ui in embed mode (#1692)

commit 5a24efd
Author: ForestL <45709305+ForestL18@users.noreply.github.com>
Date:   Mon Dec 2 22:49:16 2024 +0800

    fix: DisableKeepAlive default value of android (#1690)

commit 9de9f1e
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Wed Nov 27 11:02:55 2024 +0800

    fix: don't panic when listen on `localhost`
    MetaCubeX/mihomo#1655

commit fbead56
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Wed Nov 27 09:28:38 2024 +0800

    feat: add `size-limit` for provider
    MetaCubeX/mihomo#1645

commit 1fff34d
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Nov 26 13:39:54 2024 +0800

    chore: update quic-go to 0.48.2

commit a35f712
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Nov 26 10:28:07 2024 +0800

    chore: update gvisor

commit f805a9f
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Nov 26 10:04:41 2024 +0800

    chore: cleaned up some weird code

commit eb985b0
Author: xishang0128 <xishang02@gmail.com>
Date:   Thu Nov 21 22:50:54 2024 +0800

    chore: restful api displays more information

commit 4623435
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Thu Nov 21 11:06:25 2024 +0800

    chore: update sing-tun to v0.4.1

commit 671d901
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Mon Nov 18 10:41:15 2024 +0800

    ci: align loongarch golang version when it is not abi1

commit 80e4eaa
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Mon Nov 18 10:34:43 2024 +0800

    fix: process IPv6 Link-Local address (#1657)

commit 25b3c86
Author: xishang0128 <xishang02@gmail.com>
Date:   Sun Nov 17 23:31:46 2024 +0800

    ci: update loongarch golang and android ndk

commit de19f92
Author: Chenx Dust <chenx_dust@outlook.com>
Date:   Tue Nov 12 07:58:24 2024 +0000

    chore: restful api display smux and mptcp

commit 792f162
Author: Larvan2 <78135608+Larvan2@users.noreply.github.com>
Date:   Fri Nov 8 16:29:32 2024 +0800

    fix: find process panic

commit 215bf09
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Fri Nov 8 09:40:38 2024 +0800

    chore: switch syscall.SyscallN back to syscall.Syscall6
    Until the current version, SyscallN always escapes the variadic argument

commit 91d54bd
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Wed Nov 6 19:45:39 2024 +0800

    fix: android tun start error

commit ce52c34
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Nov 5 10:03:21 2024 +0800

    chore: cleaned up some confusing code

commit d4478db
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Nov 5 09:29:01 2024 +0800

    chore: reduce the performance overhead of not enabling LoopBackDetector

commit 69454b0
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Nov 5 09:15:30 2024 +0800

    chore: allow disabled overrideAndroidVPN by environment variable `DISABLE_OVERRIDE_ANDROID_VPN`

commit e6d1c8c
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Nov 5 09:12:20 2024 +0800

    chore: update sing-tun to v0.4.0-rc.5

commit fabd216
Author: wwqgtxx <wwqgtxx@gmail.com>
Date:   Tue Nov 5 08:58:41 2024 +0800

    chore: update quic-go to 0.48.1

commit a86c562
Author: xishang0128 <xishang02@gmail.com>
Date:   Mon Nov 4 19:31:43 2024 +0800

    chore: Increase support for other format of ASN
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