asyn-thread: use c-ares to resolve HTTPS RR

Allow building with c-ares and yet use threaded resolver for the main
host A/AAAA resolving:

  `--with-ares` provides the c-ares install path and defaults to use
  c-ares for name resolving

  `--with-threaded-resolver` still uses c-ares in the build (for HTTPS)
  but uses the threaded resolver for "normal" resolves.

It works similarly for cmake: ENABLE_ARES enables ares, and if
ENABLE_THREADED_RESOLVER also is set, c-ares is used for HTTPS RR and
the threaded resolver for "normal" resolves.

HTTPSRR and c-ares-rr are new features return by curl_version_info() and
thus shown by curl -V.

The c-ares-rr feature bit is there to make it possible to distinguish
between builds using c-ares for all name resolves and builds that use
the threaded resolves for the regular name resolves and c-ares for
HTTPSRR only. "c-ares-rr" means it does not use c-ares for "plain" name
resolves.

HTTPSRR support is EXPERIMENTAL only.

Closes #16054
This commit is contained in:
Daniel Stenberg 2025-01-21 11:42:20 +01:00
parent 520e67dd39
commit 0d4fdbf15d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
18 changed files with 470 additions and 421 deletions

View file

@ -151,13 +151,13 @@ entry.
# FEATURES
## alt-svc
## `alt-svc`
*features* mask bit: CURL_VERSION_ALTSVC
HTTP Alt-Svc parsing and the associated options (Added in 7.64.1)
## AsynchDNS
## `AsynchDNS`
*features* mask bit: CURL_VERSION_ASYNCHDNS
@ -165,32 +165,40 @@ libcurl was built with support for asynchronous name lookups, which allows
more exact timeouts (even on Windows) and less blocking when using the multi
interface. (added in 7.10.7)
## brotli
## `brotli`
*features* mask bit: CURL_VERSION_BROTLI
supports HTTP Brotli content encoding using libbrotlidec (Added in 7.57.0)
## Debug
## `c-ares-rr`
*features* mask bit: non-existent
libcurl was built to use c-ares for EXPERIMENTAL HTTPS resource record
resolves, but uses the threaded resolver for "normal" resolves (Added in
8.12.0)
## `Debug`
*features* mask bit: CURL_VERSION_DEBUG
libcurl was built with debug capabilities (added in 7.10.6)
## ECH
## `ECH`
*features* mask bit: non-existent
libcurl was built with ECH support (experimental, added in 8.8.0)
## gsasl
## `gsasl`
*features* mask bit: CURL_VERSION_GSASL
libcurl was built with libgsasl and thus with some extra SCRAM-SHA
authentication methods. (added in 7.76.0)
## GSS-API
## `GSS-API`
*features* mask bit: CURL_VERSION_GSSAPI
@ -199,66 +207,73 @@ functions for Kerberos and SPNEGO authentication. It also allows libcurl
to use the current user credentials without the app having to pass them on.
(Added in 7.38.0)
## HSTS
## `HSTS`
*features* mask bit: CURL_VERSION_HSTS
libcurl was built with support for HSTS (HTTP Strict Transport Security)
(Added in 7.74.0)
## HTTP2
## `HTTP2`
*features* mask bit: CURL_VERSION_HTTP2
libcurl was built with support for HTTP2.
(Added in 7.33.0)
## HTTP3
## `HTTP3`
*features* mask bit: CURL_VERSION_HTTP3
HTTP/3 and QUIC support are built-in (Added in 7.66.0)
## HTTPS-proxy
## `HTTPS-proxy`
*features* mask bit: CURL_VERSION_HTTPS_PROXY
libcurl was built with support for HTTPS-proxy.
(Added in 7.52.0)
## IDN
## `HTTPSRR`
*features* mask bit: non-existent
libcurl was built with EXPERIMENTAL support for HTTPS resource records (Added
in 8.12.0)
## `IDN`
*features* mask bit: CURL_VERSION_IDN
libcurl was built with support for IDNA, domain names with international
letters. (Added in 7.12.0)
## IPv6
## `IPv6`
*features* mask bit: CURL_VERSION_IPV6
supports IPv6
## Kerberos
## `Kerberos`
*features* mask bit: CURL_VERSION_KERBEROS5
supports Kerberos V5 authentication for FTP, IMAP, LDAP, POP3, SMTP and
SOCKSv5 proxy. (Added in 7.40.0)
## Largefile
## `Largefile`
*features* mask bit: CURL_VERSION_LARGEFILE
libcurl was built with support for large files. (Added in 7.11.1)
## libz
## `libz`
*features* mask bit: CURL_VERSION_LIBZ
supports HTTP deflate using libz (Added in 7.10)
## MultiSSL
## `MultiSSL`
*features* mask bit: CURL_VERSION_MULTI_SSL
@ -266,20 +281,20 @@ libcurl was built with multiple SSL backends. For details, see
curl_global_sslset(3).
(Added in 7.56.0)
## NTLM
## `NTLM`
*features* mask bit: CURL_VERSION_NTLM
supports HTTP NTLM (added in 7.10.6)
## NTLM_WB
## `NTLM_WB`
*features* mask bit: CURL_VERSION_NTLM_WB
libcurl was built with support for NTLM delegation to a winbind helper.
(Added in 7.22.0) This feature was removed from curl in 8.8.0.
## PSL
## `PSL`
*features* mask bit: CURL_VERSION_PSL
@ -287,27 +302,27 @@ libcurl was built with support for Mozilla's Public Suffix List. This makes
libcurl ignore cookies with a domain that is on the list.
(Added in 7.47.0)
## SPNEGO
## `SPNEGO`
*features* mask bit: CURL_VERSION_SPNEGO
libcurl was built with support for SPNEGO authentication (Simple and Protected
GSS-API Negotiation Mechanism, defined in RFC 2478.) (added in 7.10.8)
## SSL
## `SSL`
*features* mask bit: CURL_VERSION_SSL
supports SSL (HTTPS/FTPS) (Added in 7.10)
## SSLS-EXPORT
## `SSLS-EXPORT`
*features* mask bit: non-existent
libcurl was built with SSL session import/export support
(experimental, added in 8.12.0)
## SSPI
## `SSPI`
*features* mask bit: CURL_VERSION_SSPI
@ -316,42 +331,42 @@ makes libcurl use Windows-provided functions for Kerberos, NTLM, SPNEGO and
Digest authentication. It also allows libcurl to use the current user
credentials without the app having to pass them on. (Added in 7.13.2)
## threadsafe
## `threadsafe`
*features* mask bit: CURL_VERSION_THREADSAFE
libcurl was built with thread-safety support (Atomic or SRWLOCK) to protect
curl initialization. (Added in 7.84.0) See libcurl-thread(3)
## TLS-SRP
## `TLS-SRP`
*features* mask bit: CURL_VERSION_TLSAUTH_SRP
libcurl was built with support for TLS-SRP (in one or more of the built-in TLS
backends). (Added in 7.21.4)
## TrackMemory
## `TrackMemory`
*features* mask bit: CURL_VERSION_CURLDEBUG
libcurl was built with memory tracking debug capabilities. This is mainly of
interest for libcurl hackers. (added in 7.19.6)
## Unicode
## `Unicode`
*features* mask bit: CURL_VERSION_UNICODE
libcurl was built with Unicode support on Windows. This makes non-ASCII
characters work in filenames and options passed to libcurl. (Added in 7.72.0)
## UnixSockets
## `UnixSockets`
*features* mask bit: CURL_VERSION_UNIX_SOCKETS
libcurl was built with support for Unix domain sockets.
(Added in 7.40.0)
## zstd
## `zstd`
*features* mask bit: CURL_VERSION_ZSTD