you might get something out of this discussion

https://github.com/curl/curl/issues/2126

summary - failed connections intentionally do not report back ip address

hope that helps, Jim Fuller

On Thu, 2 Jan 2020 at 05:25, Arthur Murray via curl-library
<curl-library@cool.haxx.se> wrote:
>
> Hi,
>
> I would like to get the IP#(s) of both successful and failed
> connections after "curl_easy_perform". For example: If I try to:
>
> curl_easy_setopt(curl, CURLOPT_URL, "http://www.google.com:999";);
> res = curl_easy_perform(curl);
>
> It will timeout for port 999 but both of these getinfo entries are empty:
>
> curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ip);
> curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
>
> How do I programmatically get the tried IPs?   (curl -v shows "Trying
> [IP#]...", but I'm not looking for debug strings)
>
> Hostnames resolve to many IP #s, different ones at different times of
> day and from different geo locations. How can my software access and
> use them from libcurl?
> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette:   https://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to