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

Support strict order for upstreams (fallback DNS servers) #3701

Closed
timkgh opened this issue Oct 3, 2021 · 12 comments
Closed

Support strict order for upstreams (fallback DNS servers) #3701

timkgh opened this issue Oct 3, 2021 · 12 comments

Comments

@timkgh
Copy link

timkgh commented Oct 3, 2021

I use 2 upstreams from different providers, Cloudflare and Quad9. Cloudflare is fast from my location, Quad9 is about 2x slower. So I'd like to use Cloudflare all the time, unless it's unavailable (which happened before). When it's not available I'd like AGH to switch to the second provider (Quad9 in this case), then periodically check the first provider and switch back to it when it is available again.

For now I can use parallel queries but it seems wasteful and also don't want both providers to have a log of my queries all the time.

This is somewhat related to #3672, if the load balancing feature worked correctly it would be close to equivalent to strict order, unless someone wanted the slower upstream to be the main one.

@agneevX
Copy link
Contributor

agneevX commented Oct 5, 2021

This is a good feature request... that way primary and backup servers can be used.

@timkgh
Copy link
Author

timkgh commented Oct 19, 2021

This seems very similar to the dnsproxy --upstream and --fallback options. AGH uses dnsproxy, is it just a matter of exposing the config options in AGH?

@ghost
Copy link

ghost commented Nov 9, 2021

This is a good feature request... that way primary and backup servers can be used.

I agree. This would also allow for upstream dns resolution to prefer dns over a vpn tunnel if the tunnel is up, where it only falls back to a public dns server if the tunnel is down. So say:

10.1.1.1
8.8.8.8

If 10.1.1.1 is reachable, only that gets used. Otherwise 8.8.8.8 will be used as a fallback.

@timkgh
Copy link
Author

timkgh commented Nov 9, 2021

@ameshkov How difficult would it be to expose the dnsproxy feature through AGH? Thanks!

@ameshkov
Copy link
Member

Not too complicated, UI changes is what slows this down.

@ghost
Copy link

ghost commented Feb 12, 2022

Hi there, is there any update regarding the implementation of this option? 🙏

@ainar-g
Copy link
Contributor

ainar-g commented Feb 16, 2022

@komic, it's still unplanned, as you can see by the absence of a set milestone. Please use the 👍 reaction to show your support for the feature.

@agneevX
Copy link
Contributor

agneevX commented Mar 8, 2022

Hello @ainar-g and team, today I faced an issue where this feature request would've come in really handy and potentially mitigated the issue.

Google DNS was returning REFUSED and SERVFAIL intermittently for a specific domain while other DNS servers were responding properly.

I'd like to therefore ask that this feature be prioritized.

Screenshot (183)

Screenshot (186)

@rrfeng
Copy link

rrfeng commented Apr 14, 2023

#5731
I have made a pull request to support fallback option which dnsproxy already supported.
When upstream is not reachable (include the domain specific upstream), the fallback upstreams are used.

@ainar-g
Copy link
Contributor

ainar-g commented Aug 10, 2023

Now that we've improved the fallback upstreams in dnsproxy, I think we can implement this using the fallback mechanism. That is, if the main upstreams fail, use the new additional configuration field instead.

@ainar-g ainar-g modified the milestones: v0.108.0, v0.107.37 Aug 10, 2023
@ainar-g ainar-g changed the title Support strict order for upstream DNS servers Support strict order for upstreams (fallback DNS servers) Aug 10, 2023
adguard pushed a commit that referenced this issue Aug 21, 2023
Updates #3701.

Squashed commit of the following:

commit 5801acd
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Mon Aug 21 13:37:57 2023 +0300

    all: upd chlog

commit 5c40913
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Aug 17 13:15:19 2023 +0300

    dnsforward: add fallback dns servers
@duckxx
Copy link

duckxx commented Aug 31, 2023

fallback DNS支持dot或doh吗?

@ainar-g
Copy link
Contributor

ainar-g commented Sep 6, 2023

@duckxx, the same types of upstreams as in the main upstream fields are supported.

The fallback feature is going to be released in the upcoming v0.107.37.

@ainar-g ainar-g closed this as completed Sep 6, 2023
@ainar-g ainar-g modified the milestones: v0.107.38, v0.107.37 Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants