I’ve already upgrade curl library in my client. Nothing changed. But, thank
you for information. If I understand you the most probable cause is a
network configuration.
I’ll continue investigation.
Regards, Alex K

Вс, 29 мая 2022 г. в 09:14, Ray Satiro via curl-library <
curl-library@lists.haxx.se>:

> On 5/26/2022 10:37 AM, Александр Карелин via curl-library wrote:
>
> I have one issue when use curl. After performing a http request I call
> method curl_easy_get info with second parameter CURLINFI_LOCAL_IP. And
> every time I get 127.0.0.1 as a result, but my server is on another machine
> with n network. How can it be possible?
>
> And another related question:
> What is the main difference between CURLINFI_LOCAL_IP and CURLINFI_PRIMARY_IP
> parameter?
>
>
> Try the latest libcurl if you haven't already. Internally
> Curl_conninfo_local [1] calls your socket library's getsockname to retrieve
> the local ip. CURLINFO_LOCAL_IP [2] is used to retrieve the local address
> and CURLINFO_PRIMARY_IP [3] is used to retrieve the remote address. I don't
> know why you are seeing 127.0.0.1 as a local address if the remote address
> is another machine. The only way I can think of it happening is if the
> remote machine redirected back to your machine. I doubt it's a bug in curl.
>
>
> [1]: https://github.com/curl/curl/blob/curl-7_83_1/lib/connect.c#L718-L747
> [2]: https://curl.se/libcurl/c/CURLINFO_LOCAL_IP.html
> [3]: https://curl.se/libcurl/c/CURLINFO_PRIMARY_IP.html
>
>
>
> --
> Unsubscribe: https://lists.haxx.se/listinfo/curl-library
> Etiquette:   https://curl.haxx.se/mail/etiquette.html
>
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
  • Loopback ip Александр Карелин via curl-library
    • Re: Loopback ip Ray Satiro via curl-library
      • Re: Loopback i... Александр Карелин via curl-library

Reply via email to