Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
CURLOPT_DOH_URL(3) | libcurl | CURLOPT_DOH_URL(3) |
NAME
CURLOPT_DOH_URL - provide the DNS-over-HTTPS URLSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DOH_URL, char *URL);
DESCRIPTION
Pass in a pointer to a URL for the DoH server to use for name resolving. The parameter should be a char * to a null-terminated string which must be URL-encoded in the following format: "https://host:port/path". It MUST specify an HTTPS URL.INHERIT OPTIONS
DoH lookups use SSL and some SSL settings from your transfer are inherited, like CURLOPT_SSL_CTX_FUNCTION(3).KNOWN BUGS
Even when DoH is set to be used with this option, there are still some name resolves that are performed without it, using the default name resolver mechanism. This includes name resolves done for CURLOPT_INTERFACE(3), CURLOPT_FTPPORT(3), a proxy type set to CURLPROXY_SOCKS4 or CURLPROXY_SOCKS5 and probably some more.DEFAULT
NULL - there is no default DoH URL. If this option is not set, libcurl uses the default name resolver.PROTOCOLS
AllEXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
curl_easy_setopt(curl, CURLOPT_DOH_URL, "https://dns.example.com");
curl_easy_perform(curl);
}
}
AVAILABILITY
Added in 7.62.0RETURN VALUE
Returns CURLE_OK on success or CURLE_OUT_OF_MEMORY if there was insufficient heap space.SEE ALSO
CURLOPT_DNS_CACHE_TIMEOUT(3), CURLOPT_RESOLVE(3), CURLOPT_VERBOSE(3)December 4, 2023 | ibcurl 8.5.0 |