You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a reason useHardcodedDnsServers and the respective getter and setter methods are not static?
If other settings that influence the choice of DNS server (blacklist, lookup mechanism) are it kinda makes sense to make that variable static as well.
I'd rather have them not as lookup mechanism, as they are a special very last resort step. I also think it makes sense for them to be not static, as it easily allows you to create different DNSClient instances using different DNS servers (Yes, that eventually would also be possible if they where a lookup mechanism, but still).
Do that would also require that lookup mechanisms can access the ip preference as I already suggested in #12
I'd rather have the part of the API processing the return DNS servers from the lookup mechanism sort the DNS server IPs by preference of the IP version.
Correction, master already has the mechanisms and the hardcoded servers static. That means there is currently no way to create DNSClient instances using different DNS servers, but this should be possible. Not only for testing purposes. I see a few options how this could be achieved. I give it some more thinking which one it's going to be.
Anyway, what is really missing in master is the ability to change the hardcoded servers. @iNPUTmice shall we hijack this issue so that is says "Make hardcoded dns servers configurable"?
Activity
iNPUTmice commentedon Sep 20, 2017
Random thought: Maybe the hardcoded servers can go into their own Lookup Mechanism that can be added and removed. This would simplify the API a bit.
Do that would also require that lookup mechanisms can access the ip preference as I already suggested in #12
Flowdalic commentedon Sep 21, 2017
I'd rather have them not as lookup mechanism, as they are a special very last resort step. I also think it makes sense for them to be not static, as it easily allows you to create different DNSClient instances using different DNS servers (Yes, that eventually would also be possible if they where a lookup mechanism, but still).
I'd rather have the part of the API processing the return DNS servers from the lookup mechanism sort the DNS server IPs by preference of the IP version.
Flowdalic commentedon Sep 21, 2017
Correction, master already has the mechanisms and the hardcoded servers static. That means there is currently no way to create
DNSClientinstances using different DNS servers, but this should be possible. Not only for testing purposes. I see a few options how this could be achieved. I give it some more thinking which one it's going to be.Anyway, what is really missing in master is the ability to change the hardcoded servers. @iNPUTmice shall we hijack this issue so that is says "Make hardcoded dns servers configurable"?