跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[宽带症候群] Mihomo(Clash.Meta) 匹配路由规则的 DNS 配置

发表于

参考资料:

先贴我的的 dns 配置

dns:
  enable: true
  listen: 0.0.0.0:7874
  ipv6: false
  enhanced-mode: redir-host
  respect-rules: true
  # 附加参数 #RULES 为遵守路由规则进行连接,等同于 respect-rules
  nameserver:
  # 指定使用 dns 路由规则进行连接
  # nameserver-policy 未匹配的域名将使用以下 dns 解析
    - tls://8.8.8.8#dns
    - tls://1.1.1.1#dns
  proxy-server-nameserver:
    - https://120.53.53.53/dns-query
    - https://223.5.5.5/dns-query
  nameserver-policy:
    # 白名单分组使用运营商 dns 解析
    "geosite:private,onedrive,microsoft@cn,apple,apple-cn,category-games@cn,cn":
      - 运营商 dns
    # 自定义白名单分组同样使用 运营商 dns 解析
    "rule-set:custom-direct":
      - 运营商 dns

解释一下我的场景,路由器上使用 mihomo 插件,白名单模式,未开启 ipv6 ,使用 geosite 规则,路由规则如下:

rules:
  - GEOIP,lan,DIRECT,no-resolve
  - GEOSITE,private,DIRECT
  # 高优先级标注需要代理的规则防止被后面的直连规则影响
  - GEOSITE,google,其他
  - GEOSITE,google-cn,其他
  - RULE-SET,openai,OpenAI
  # 以下为直连
  - GEOSITE,onedrive,DIRECT
  - GEOSITE,microsoft@cn,DIRECT
  - GEOSITE,apple,DIRECT
  - GEOSITE,apple-cn,DIRECT
  - GEOSITE,steam@cn,DIRECT
  - GEOSITE,category-games@cn,DIRECT
  - GEOSITE,cn,DIRECT
  - GEOIP,CN,DIRECT
  - RULE-SET,custom-direct,DIRECT
  # 剩余全代理
  - MATCH,其他

配置思路如下:

  1. 将我认为直连能获得更佳体验的分组打上 DIRECT 规则并且使用运营商 dns 进行解析,获得国内 CDN 加成,比如 apple, ms, dji, steam 等。
  2. 未使用 fallback 配置,避免直连解析耗时较长。
  3. 使用 rule-providers 自定义直连规则降低 nameserver-policy 配置复杂度。

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.