Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: no network caused by loop dns problem #759

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mzz2017
Copy link
Contributor

@mzz2017 mzz2017 commented Feb 20, 2025

Background

daeuniverse/outbound#36

有一种可能的循环依赖情况:
dae 在解析节点域名的时候走了 resolv.conf,然后到了本地的 smartdns,smartdns 用国外 doh 被劫持代理到 dae,而代理需要过节点,而过节点需要解析节点域名……

本次为 direct dialer 添加一个选项 WithCache,该选项开启后,会记录 direct dialer 的上次成功的 host 对应的 ip,并在因dns查询超时而失败时对相同 host 用缓存的 ip 进行重试。对所有节点默认开启

注:direct dialer 是 proxy dialer 的最后一层,连节点用的

Checklist

Full Changelogs

  • [Implement ...]

Issue Reference

Closes #[issue number]

Test Result

@mzz2017 mzz2017 requested a review from a team as a code owner February 20, 2025 16:21
@mzz2017 mzz2017 force-pushed the mzz/fix_loop_dns_problem branch from 1925e3a to badf345 Compare February 20, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant