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] listeners里定义的服务不走sub-rules,而是直接走rules #1466

Closed
5 of 7 tasks
bsdcpp opened this issue Aug 23, 2024 · 1 comment
Closed
5 of 7 tasks
Labels
bug Something isn't working

Comments

@bsdcpp
Copy link

bsdcpp commented Aug 23, 2024

Verify steps

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

操作系统

Linux

系统版本

5.10.194

Mihomo 版本

Mihomo Meta alpha-41efc5e linux amd64 with go1.23.0 Thu Aug 22 01:26:01 UTC 2024
Use tags: with_gvisor

配置文件

rules:
  - RULE-SET,rule1,DIRECT
  - IP-ASN,1,PROXY
  - Match,PROXY

sub-rules:
  sub-rule-name1:
    - Match,REJECT
    - DOMAIN,google.com,ss1
    - DOMAIN,baidu.com,DIRECT


# 流量入站
listeners:
  - name: ss
    type: shadowsocks
    port: 10808
    listen: 0.0.0.0 # 默认监听 0.0.0.0
    rule: sub-rule-name1 # 默认使用 rules,如果未找到 sub-rule 则直接使用 rules
    password: 3sWe86+UpxxxiK75a3so4ujw==
    cipher: rc4-md5

描述

按照上述官方配置,sub-rules只在listener里用,rules里并没有调用。
现象就是客户端进来并没有按照sub-rule-name1里的全部REJECT,而是走了上面rules里的规则。我把上面的代码片段放在最后,
或者任意调整rules和sub-rules的顺序都是一样的结果。
而且试过几个版本的mihomo,包括release里的,都是一样只走默认的rules。

重现方式

最新版本的mihomo的alpha, release都可以,按照官网文档配置即可

日志

No response

@bsdcpp bsdcpp added the bug Something isn't working label Aug 23, 2024
@wwqgtxx
Copy link
Collaborator

wwqgtxx commented Aug 23, 2024

fixed in 16c95fc

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