socks: use dns filter for resolving

Use a dns connection filter to resolve hostnames where their addresses
are locally resolved and forwarded to the SOCKS proxy.

This makes all improvements, like in #21295 for example, also apply
to socks connections. Curl_resolv() is now only called from a DNS
filter.

(ftp still calls Curl_resolv_blocking() in two places, one of which
 may be replaceable with a DNS filter as well to remove the block, tbd)

Closes #21297
This commit is contained in:
Stefan Eissing 2026-04-13 12:57:11 +02:00 committed by Daniel Stenberg
parent 0567e72168
commit bcd94e2750
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 74 additions and 92 deletions

View file

@ -42,7 +42,8 @@ CURLcode Curl_cf_dns_insert_after(struct Curl_cfilter *cf_at,
uint8_t dns_queries,
const char *hostname,
uint16_t port,
uint8_t transport);
uint8_t transport,
bool complete_resolve);
CURLcode Curl_conn_dns_result(struct connectdata *conn, int sockindex);
CURLcode Curl_cf_dns_result(struct Curl_cfilter *cf);