This is basically most of the code from the authd-framework branch, but written to the new DNS code in master. Not quite done yet but getting there.