CURLOPT_IPRESOLVEto the preferred value. For example, ask to only use IPv6 addresses:
CURLOPT_DOH_URLoption like this:
curl_easy_performis used, or within the multi handle when the multi interface is used. It can also be made shared between multiple easy handles using the share interface.
CURLOPT_DNS_SERVERS, the application can select to use a set of dedicated DNS servers.
CURLOPT_DNS_INTERFACEit can tell libcurl which network interface to speak DNS over instead of the default one.
CURLOPT_DNS_LOCAL_IP6, the application can specify which specific network addresses to bind DNS resolves to.
CURLOPT_DNS_USE_GLOBAL_CACHEonce told curl to use a global DNS cache. This functionality has been removed since 7.65.0, so while this option still exists it does nothing.