GNURLOPT_FTP_SKIP_PASV_IP(3)
πΈ GNURLOPT_FTP_SKIP_PASV_IP(3) πΈ
okay bestie, this page lives in the curl_easy_setopt options manual, and it's literally about telling libcurl to ignore the IP address a server sends back in its PASV response. manual name folded in near the top? done, we move π
β¨ NAME β¨
CURLOPT_FTP_SKIP_PASV_IP β ignore the IP address in the PASV response.
π» SYNOPSIS π»
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_SKIP_PASV_IP, long skip);
π¦ DESCRIPTION π¦
You pass a long here, bestie. If skip is set to 1, it tells libcurl not to use the IP address the server suggests in its 227-response to libcurl's PASV command when libcurl connects the data connection. Instead, libcurl re-uses the same IP address it already uses for the control connection β but it will use the port number from the 227-response π
So yeah, this option lets libcurl work around broken server installations that report the wrong IP address back because of NATs, firewalls, or plain incompetence. it's giving "server said what now?" π
This option has no effect ifPORT,EPRT, orEPSVis used instead ofPASV. periodt.
π DEFAULT π
0 β default is off, no cap.
π PROTOCOLS π
FTP only, bestie.
π₯ EXAMPLE π₯
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/file.txt");
/* please ignore the IP in the PASV response */
curl_easy_setopt(curl, CURLOPT_FTP_SKIP_PASV_IP, 1L);
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β AVAILABILITY β
Added in 7.14.2 β¨
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
π SEE ALSO π
mwah π β this page is from libcurl 7.37.0, dated 19 Jun 2014, and that's the cute sign-off, bestie π«Άπ
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms