daeuniverse / daed

daed, a modern dashboard with dae.
https://daeuniverse.github.io/daed/
MIT License
552 stars 57 forks source link

[Bug Report] 路由规则无效 #433

Open sommio opened 6 months ago

sommio commented 6 months ago

Checks

Current Behavior

nyaa.tracker.wf:7777 在我的系统上稳定路由失败

Expected Behavior

成功路由

Steps to Reproduce

  1. 拨号模式选择 domain++
  2. 创建两个出站,分别为「prxoy」和「tracker」,其中每个出站至少两个节点负载均衡
  3. 添加以下路由规则
    
    pname(dog, cloudflarespeedtest) -> must_direct
    pname(NetworkManager, v2ray, xray, v2raya) -> direct
    dip(224.0.0.0/3, 'ff00::/8', geoip:private) -> direct
    l4proto(udp) && dport(443) -> block

domain(keyword: torrent, keyword: tracker) -> tracker domain(nyaa.tracker.wf) -> tracker dip(geoip:cn) -> direct fallback: proxy

3. 使用 `curl -vv http://nyaa.tracker.wf:7777/`  测试
4. 在 log 中可以看到该域名没有按规则被路由到 `tracker`

❯ journalctl -f -u daed | grep tracker Apr 27 15:26:12 arch daed[907]: time="Apr 27 15:26:12" level=info msg="192.168.1.2:47864 <-> 1.1.1.1:53" _qname=nyaa.tracker.wf. dialer="HK" dscp=0 mac="XX:XX:XX:XX:XX:XX" network="tcp4(DNS)" outbound=proxy pid=2520 pname=curl policy=min_moving_avg qtype=AAAA Apr 27 15:26:12 arch daed[907]: time="Apr 27 15:26:12" level=info msg="192.168.1.2:47864 <-> 1.1.1.1:53" _qname=nyaa.tracker.wf. dialer="HK" dscp=0 mac="XX:XX:XX:XX:XX:XX" network="tcp4(DNS)" outbound=proxy pid=2520 pname=curl policy=min_moving_avg qtype=A Apr 27 15:26:12 arch daed[907]: time="Apr 27 15:26:12" level=info msg="192.168.1.2:55098 <-> nyaa.tracker.wf:7777" dialer="HK" dscp=0 ip="195.16.73.95:7777" mac="XX:XX:XX:XX:XX:XX" network=tcp4 outbound=proxy pid=0 pname=curl policy=min_moving_avg sniffed="nyaa.tracker.wf:7777"



### Environment

- **Daed version**: daed-edge-git v0.4.0rc1.r490.188.689 (unstable-5c4904d.33c3b74.a75a2ff) / daed-bin-x64-v3 0.4.1
- **OS (e.g `cat /etc/os-release`)**: Arch Linux
- **Kernel (e.g. `uname -a`)**: 6.8.1-1-ck-x64-v3 /  linux-cachyos-lts 6.6.25

### Anything else?

_No response_
dae-prow[bot] commented 6 months ago

Thanks for opening this issue!

mzz2017 commented 6 months ago

@sommio 简单看起来是嗅探到的域名带了端口,是个问题

sommio commented 6 months ago

我检查了日志,看起来问题确实出现在这里,不带端口的域名正常分流

Apr 27 17:30:11 arch daed[827]: time="Apr 27 17:30:11" level=info msg="192.168.1.2:51417 <-> tracker.opentrackr.org:1337" dialer="HK" dscp=0 ip="93.158.213.92:1337" mac="XX:XX:XX:XX:XX:XX" network=tcp4 outbound=proxy pid=0 pname=qbittorrent-nox policy=min_moving_avg sniffed="tracker.opentrackr.org:1337"
Apr 27 17:30:12 arch daed[827]: time="Apr 27 17:30:12" level=info msg="192.168.1.2:54661 <-> tracker4.itzmx.com:2710" dialer="HK" dscp=0 ip="194.87.70.68:2710" mac="XX:XX:XX:XX:XX:XX" network=tcp4 outbound=proxy pid=0 pname=qbittorrent-nox policy=min_moving_avg sniffed="tracker4.itzmx.com:2710"
Apr 27 17:30:17 arch daed[827]: time="Apr 27 17:30:17" level=info msg="192.168.1.2:37947 <-> tracker.gbitt.info:443" dialer="ZA" dscp=0 ip="172.67.146.67:443" mac="XX:XX:XX:XX:XX:XX" network=tcp4 outbound=tracker pid=0 pname=qbittorrent-nox policy=min_moving_avg sniffed=tracker.gbitt.info
Apr 27 17:30:17 arch daed[827]: time="Apr 27 17:30:17" level=info msg="192.168.1.2:60489 <-> tracker.opentrackr.org:1337" dialer="HK" dscp=0 ip="93.158.213.92:1337" mac="XX:XX:XX:XX:XX:XX" network=tcp4 outbound=proxy pid=0 pname=qbittorrent-nox policy=min_moving_avg sniffed="tracker.opentrackr.org:1337"
Apr 27 17:30:30 arch daed[827]: time="Apr 27 17:30:30" level=info msg="192.168.1.2:45607 <-> tracker.imgoingto.icu:443" dialer="ZA" dscp=0 ip="104.21.68.111:443" mac="XX:XX:XX:XX:XX:XX" network=tcp4 outbound=tracker pid=0 pname=qbittorrent-nox policy=min_moving_avg sniffed=tracker.imgoingto.icu