MetaCubeX / mihomo

A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API.
https://wiki.metacubex.one
MIT License
16.96k stars 2.67k forks source link

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

Open kingofotaku opened 10 months ago

kingofotaku commented 10 months ago

Verify steps

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?

xishang0128 commented 10 months ago

@kingofotaku https://wiki.metacubex.one/config/general/#tcp 可以试试使用tcp并发看看

kingofotaku commented 10 months ago

@kingofotaku https://wiki.metacubex.one/config/general/#tcp 可以试试使用tcp并发看看

看了一下我一直开着这个

LordHumphrey commented 2 months ago

我这里负载均衡也失效了,原因未知。