CURLOPT_PROXY_TRANSFER_MODE(3)
CURLOPT_PROXY_TRANSFER_MODE π
okay so bestie, this is the CURLOPT_PROXY_TRANSFER_MODE page from the Library Functions Manual β manual name folded in right here like a little name tag π«Ά. She's all about appending the FTP transfer mode to a URL for a proxy, and yes, she's a little niche, but that's her main character energy.
πΈ NAME πΈ
CURLOPT_PROXY_TRANSFER_MODE β append FTP transfer mode to URL for proxy. literally the whole assignment, and she understood it π.
β¨ SYNOPSIS β¨
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXY_TRANSFER_MODE,
long enabled);
π DESCRIPTION π
You pass a long. If the value is set to 1 (one), it tells libcurl to set the transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by appending ;type=a or ;type=i to the URL.
Without this setting, or if it's set to 0 (zero, the default), CURLOPT_TRANSFERTEXT(3) has no effect when doing FTP via a proxy. no cap, that's just the tea.
β οΈ Beware that not all proxies support this feature. like, do a vibe check on your proxy before you count on it, bestie π
π DEFAULT π
0, disabled. she starts off asleep, periodt.
π PROTOCOLS π
This functionality affects all supported protocols β all of them, bestie β¨.
π EXAMPLE π
look at her go:
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://example.com/old-server/file.txt");
curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:80");
curl_easy_setopt(curl, CURLOPT_PROXY_TRANSFER_MODE, 1L);
curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
π¦ AVAILABILITY π¦
Added in curl 7.18.0. a whole vintage icon, honestly.
π RETURN VALUE π
curl_easy_setopt(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3).
π SEE ALSO π
mwah π signing off fr fr: source/version libcurl, dated 2026-10-12, footer tag CURLOPT_PR...ANSFER_MODE(3). stay slay, bestie π«Ά
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms