DnsLibs currently provides a testUpstream method for validating an upstream.
In addition to that (or instead of that) I suggest providing a public method that provides upstream settings:
- DNS protocol
- Additional details (might be important for DNSCrypt)