AdguardTeam / DnsLibs

DNS filtering library that's used in AdGuard products
https://adguard.com/
Apache License 2.0
99 stars 20 forks source link

Implement dnsmasq-like syntax for DNS upstreams to enable per domain resolving #220

Open sviperz opened 7 months ago

sviperz commented 7 months ago

Issue Details

There are cases when specific domains have to be resolved via specific DNS servers. For example, it can help enabling the usage of AI services while they have unnecessary geo-restrictions. See https://www.comss.ru/page.php?id=7315 as a good example of such DNS services.

Proposed solution

However, it is also good to have all the rest DNS requests to go through another set of DNS servers. For this to happen I propose to implement dnsmasq-like syntax to define DNS upstreams per domains similar to how it works in AdGuard Home - see https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#specifying-upstreams-for-domains:

image

Different approaches to query DNS servers like load-balancing, parallel requests, fastest IP are also nice to have.

Alternative solution

No response