lib: provide a getaddrinfo wrapper

This uses c-ares under the hood and supports the CURL_DNS_SERVER
environment variable - for debug builds only. The getaddrinfo()
replacement function is only used if CURL_DNS_SERVER is set to make a
debug build work more like a release version without the variable set.

'override-dns' is a new feature for the test suite when curl can be told
to use a dedicated DNS server, and test 2102 is the first to require
this.

Requires c-ares 1.26.0 or later.

Closes #17134
This commit is contained in:
Daniel Stenberg 2025-04-22 14:51:49 +02:00
parent da33c1e349
commit e0ebc3ff13
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
8 changed files with 335 additions and 11 deletions

View file

@ -33,8 +33,7 @@ http
dns
</server>
<features>
Debug
c-ares
override-dns
</features>
<name>
HTTP GET with host name