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

Make useHardcodedDnsServers static #72

Open
iNPUTmice opened this issue Sep 20, 2017 · 3 comments
Open

Make useHardcodedDnsServers static #72

iNPUTmice opened this issue Sep 20, 2017 · 3 comments

Comments

@iNPUTmice
Copy link

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.

@iNPUTmice
Copy link
Author

iNPUTmice commented 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
Copy link
Collaborator

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.

@Flowdalic
Copy link
Collaborator

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"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants