clash icon indicating copy to clipboard operation
clash copied to clipboard

[Bug] 使用 fakeip 导致用户域名规则被绕过

Open 1nC0deWeTrust opened this issue 1 year ago • 8 comments

Verify steps

  • [X] 确保你使用的是本仓库最新的的 clash 或 clash premium 版本 Ensure you are using the latest version of Clash or Clash Premium 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.
  • [ ] 我已经使用 dev 分支版本测试过,问题依旧存在 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] 这是 Clash 核心的问题,并非我所使用的 Clash 衍生版本(如 OpenClash、KoolClash 等)的特定问题 This is an issue of the Clash core per se, not to the derivatives of Clash, like OpenClash or KoolClash.

Clash version

2023.03.04 Premium

What OS are you seeing the problem on?

macOS

Clash config

tun 模式配置

dns:
  enable: true
  enhanced-mode: fake-ip
  nameserver:
    - 114.114.114.114
    - 223.5.5.5
    - 8.8.8.8
  fallback: []
  fake-ip-filter:
    - +.stun.*.*
    - +.stun.*.*.*
    - +.stun.*.*.*.*
    - +.stun.*.*.*.*.*
    - "*.n.n.srv.nintendo.net"
    - +.stun.playstation.net
    - xbox.*.*.microsoft.com
    - "*.*.xboxlive.com"
    - apps.apple.com
tun:
  enable: true
  stack: gvisor
  auto-route: true
  auto-detect-interface: true
  dns-hijack:
    - any:53

Clash log

No response

Description

使用了 fakeip 后,日志中的 rAddr(r == remote?)基本上都成了 ip,而用户的规则很大一部分是基于域名的,这样就导致这些规则匹配不到,直接走了 MATCH 了。

image image

1nC0deWeTrust avatar Mar 11 '23 14:03 1nC0deWeTrust