Skip to content

Make useHardcodedDnsServers static #72

Open

Description

@iNPUTmice

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.

Activity

  1. iNPUTmice commented on Sep 20, 2017

    @iNPUTmice
    Author

    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

  2. Flowdalic commented on Sep 21, 2017

    @Flowdalic
    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.

  3. Flowdalic commented on Sep 21, 2017

    @Flowdalic
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions