dkim_verifier icon indicating copy to clipboard operation
dkim_verifier copied to clipboard

JSDNS: Improve getting default nameservers from the OS

Open lieser opened this issue 5 years ago • 4 comments

The detection of disconnected interfaces via registry is broken in Win 10. This can result in non reachable DNS servers from disconnected interfaces being tried. If this happens, the first DNS query can take some time, until the non reachable DNS servers are deactivated.

Some related information can be found in #120.

Workarounds for delay on first query:

  • disable detection of OS DNS servers completely, and manually configure them in the add-on
  • reduce timeout for DNS servers to 1 second
  • enable DKIM key caching to reduce the number of queries needed

lieser avatar Jan 13 '19 19:01 lieser

Just an idea: What about add the possibility to set custom DNS in the plug-in and add support for DNS over TLS?

ghost avatar Jan 14 '19 08:01 ghost

What about add the possibility to set custom DNS in the plug-in

Do you meant custom DNS servers? This is already possible for both currently supported resolvers. See https://github.com/lieser/dkim_verifier/wiki/DNS.

And if it turns out that many people will be encounter the here described delay, I may be good to temporally use them by default, instead of the OS DNS servers. But my hope is that only a few will be affected.

add support for DNS over TLS

I was already thinking about adding it, if porting the current JSDNS resolver to web extensions will turn out to not be feasible. But I do not see how this would help here.

The whole reasons the add-ons is even trying to get the OS DNS servers is because some people carefully chose which DNS servers they want to use, e.g. for privacy reasons. Even if they could also set this servers in the add-on, I think it is bad to not try to respect the choice they already made in the OS. Especially because it is not common for applications to have their own DNS server setting, so there would definitely people who miss that the add-on is using different servers.

lieser avatar Jan 14 '19 22:01 lieser

Do you meant custom DNS servers? This is already possible for both currently supported resolvers

Yes, is there an option in the GUI inside Thunderbird under Windows?

Especially because it is not common for applications to have their own DNS server setting

On Windows is more uncommon to respect OS settings.

so there would definitely people who miss that the add-on is using different servers.

I don't think they miss it if they manually set DNS servers (I mean that if by default it use OS settings and also it allow to manually set DNS servers then they cannot miss it).

ghost avatar Jan 17 '19 14:01 ghost

Do you meant custom DNS servers? This is already possible for both currently supported resolvers

Yes, is there an option in the GUI inside Thunderbird under Windows?

I think you misunderstood something. I'm talking about the options of the add-on itself, not about general settings of Thunderbird.

Most of the DNS settings of the add-on are available via the add-ons options GUI. Only some advanced options are not. Please follow the Link in my previous post for details.

I mean that if by default it use OS settings and also it allow to manually set DNS servers then they cannot miss it

This is already the current behavior of the add-on.

lieser avatar Jan 17 '19 20:01 lieser

I removed the check for the Linked status of interfaces in the registry. Seems to be removed in Windows 10, and not convey any useful information in older Windows.

I sadly don't see how the detection mechanism can be improved with just the information in the registry. I'm unable to find a place there it is visible if an interface (either LAN or WLAN) is connected. So unless someone has a concrete idea I do not plan to invest any more time on this.

Note that I'm aware that it would be possible to get more information by calling some of the tools Windows provides, and probably also using the Windows API. But that is probably more effort than the current reading of the registry, and any time would be better spend on integrating the usage of the DNS resolver provided by the OS (#176).

lieser avatar May 21 '23 17:05 lieser