AdguardTeam / AdguardForAndroid

Open bug tracker for Android version of AdGuard.
https://adguard.com/
1.24k stars 86 forks source link

Append search domain if necessary #4316

Open larena1 opened 1 year ago

larena1 commented 1 year ago

In a network the DHCP usually provides clients with one or more search domains. That can be .home or .lan or something else.

When trying to resolve adguard or vpn for example, every major OS will first try to resolve the given hostname and if that's not possible, it'll append the search domain so adguard becomes adguard.home and will be tried to be resolved.

Unfortunately that is currently not the way Adguard for Android works. When the DNS filter is enabled, it tries to resolve the host adguard and will not try to append the search domain if that fails.

Can that be fixed?

maxikuzmin commented 1 year ago

@larena1 could you explain please what this feature request is for?

larena1 commented 1 year ago

AdGuard on Android with DNS filtering OFF and DHCP search domain ".home":

AdGuard on Android with DNS filtering ON and DHCP search domain ".home":

AdGuard is not resolving the host "adguardhome" through the local DNS server when DNS filtering is turned on

Is that clearer now?

maxikuzmin commented 1 year ago

@larena1 that’s interesting feature request. Let’s see how many likes it will gain.

larena1 commented 1 year ago

@maxikuzmin this is not a feature request. It's a bug report because stuff that works great without AdGuard breaks when AdGuard is enabled.

In the example above, AdGuard will try to resolve the host adguardhome through the selected upstream resolver like Cloudflare or Quad9 or so. As the host adguardhome has no TLD and is not a TLD itself, AdGuard should be using the fallback resolver instead.

To sum it up: Hosts that don't end with an ICANN registered TLD should be resolved through the fallback resolver instead of the upstream resolver.

maxikuzmin commented 9 months ago

@larena1 since this is adding new functionality, it does fall under feature request, so this issue has been labeled as a feature request

larena1 commented 9 months ago

@maxikuzmin that's okay but I'd also consider this a bug because with Adguard disabled there is no issue and when Adguard is enabled, it won't work anymore. So essentially Adguard breaks stuff.