mihomo icon indicating copy to clipboard operation
mihomo copied to clipboard

[Bug] 开启dns处理后疑似导致负载均衡失效

Open kingofotaku opened this issue 1 year ago • 3 comments

Verify steps

  • [X] 确保你使用的是本仓库最新的的 mihomo 或 mihomo Alpha 版本 Ensure you are using the latest version of Mihomo or Mihomo Alpha from this repository.
  • [ ] 如果你可以自己 debug 并解决的话,提交 PR 吧 Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
  • [X] 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • [X] 我已经使用 Alpha 分支版本测试过,问题依旧存在 I have tested using the dev branch, and the issue still exists.
  • [X] 我已经仔细看过 Documentation 并无法自行解决问题 I have read the documentation and was unable to solve the issue.
  • [X] 这是 Mihomo 核心的问题,并非我所使用的 Mihomo 衍生版本(如 OpenMihomo、KoolMihomo 等)的特定问题 This is an issue of the Mihomo core per se, not to the derivatives of Mihomo, like OpenMihomo or KoolMihomo.

Mihomo version

issue发布时最新的Alpha版本

What OS are you seeing the problem on?

No response

Mihomo config

dns:
  enable: false
  ipv6: true
  listen: :53
  enhanced-mode: redir-host
  prefer-h3: true
  nameserver-policy:
    "geosite:cn,private": 
    - tls://223.5.5.5:853
    - https://[2400:3200::1]/dns-query
  nameserver:
    #- 8.8.8.8
    #- 45.11.45.11
    #- "[2a09::]"
    - tls://[2606:4700:4700::1111]:853
    - tls://dot.sb:853
    - tls://45.11.45.11:853
    - tls://1.1.1.1:853
......

 - name: "直连负载均衡"
   type: load-balance
   proxies:
     - "en0直连"
     - "en1直连"
   strategy: round-robin  
     
 - name: "en1直连"
   type: select
   interface-name: WLAN
   routing-mark: 19198
   proxies:
     - DIRECT
      
 - name: "en0直连"
   type: select
   interface-name: 以太网
   routing-mark: 11451
   proxies:
     - DIRECT

Mihomo log

No response

Description

台式机同时连接了有线网和WiFi,于是手动写了个负载均衡以使带宽最大化(有线只有1Gbps)最近发现一个现象:当我将dns字段设定为true时,观察log显示负载均衡组发起的连接永远只会选择“en0直连”这个出口,无论发起多少条连接皆是如此(即有线出口)而当我关掉dns字段后,负载均衡发起的连接就恢复正常,变成了en0和en1各一半(round-robin策略)。不知这是否属于bug?

kingofotaku avatar Jan 25 '24 16:01 kingofotaku