有办法区分国内域名和国外域名?
需求应用场景 我外网有国际线路和国内电信线路,想实现如果访问的国外域名就直接使用国外的DNS解析,解析出来国外的IP就会正常走国际线路
建议的方案 在检测ping时是否可以指定DNS从哪个网卡或者源IP出发ping去探测?
Pull Request Test Coverage Report for Build 17795654203
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
- 18 unchanged lines in 6 files lost coverage.
- Overall coverage increased (+0.03%) to 66.037%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| pdns/recursordist/syncres.cc | 1 | 81.25% |
| modules/godbcbackend/sodbc.cc | 2 | 70.13% |
| pdns/recursordist/rec-main.cc | 2 | 64.68% |
| pdns/rcpgenerator.cc | 3 | 90.56% |
| pdns/dnsdistdist/dnsdist-lbpolicies.cc | 4 | 72.36% |
| pdns/recursordist/pdns_recursor.cc | 6 | 73.64% |
| <!-- | Total: | 18 |
| Totals | |
|---|---|
| Change from base Build 17789672259: | 0.03% |
| Covered Lines: | 128910 |
| Relevant Lines: | 166497 |
💛 - Coveralls
Please have some patience. We are certainly considering this, but first we need to finish the 5.3.0 release.
Please have some patience. We are certainly considering this, but first we need to finish the 5.3.0 release.
No problem, I did expect to wait until the release, and I've been on vacation anyway.
I rebased the code and added a fix for when the new remote is TCP and port 853, it should switch to DoT if needed. This PR will need a test.
As I suspected, there's an issue with the nsspeed bookkeeping: the original IP stays in the table at 0ms, while the updated IP gets an entry > 0ms. The speed based selection mechanism then keeps selecting the fast 0ms entry, which is never updated, basically breaking the mechanism that selects the fastest nameserver.