API access to DNS over HTTPS settings

Gary Kopet 6 Reputation points
2021-03-20T00:39:12.023+00:00

Hi,

I have dev build 21337and sdk version 20313, and I'm experimenting with DNS over HTTPS. It's working great.

I'm just wondering if there are calls somewhere in the Windows API that allow me to see the user's settings in this regard: whether DoH Is enabled and what the DoH server is for a given adapter.

Thanks,
Gary Kopet

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,429 questions
Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,276 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Strive Sun-MSFT 426 Reputation points
    2021-03-22T09:40:31.037+00:00

    Hello, @Gary Kopet

    Please check the winapi below:

    • DnsQueryConfig: The DnsQueryConfig function enables application programmers to query for the configuration of the local computer or a specific adapter.
    • HttpQueryServiceConfiguration : The HttpQueryServiceConfiguration function retrieves one or more HTTP Server API configuration records.

    ----------

    Thank you!

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Gary Kopet 6 Reputation points
    2021-03-22T16:45:01.707+00:00

    Hi,

    Thanks for the quick response. I'm playing with the APIs you listed, but I can't figure out how to get the information I'm after.

    I can see it using "ipconfig /all". I'm after the dns config for the nic that shows DoH is enabled: "DoH: https://dns.google/dns-query". Can you tell me how I can get that via an API?

    80248-screenshot-2021-03-22-094256.png