curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: IP address of failed/tried connections?

From: James Fuller via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 2 Jan 2020 07:03:42 +0100

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_at_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
Received on 2020-01-02