Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
CURLOPT_PRE_PROXY(3) | Library Functions Manual | CURLOPT_PRE_PROXY(3) |
NAME
CURLOPT_PRE_PROXY - pre-proxy host to useSYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PRE_PROXY, char *preproxy);
DESCRIPTION
Set the preproxy to use for the upcoming request. The parameter should be a char * to a null-terminated string holding the hostname or dotted numerical IP address. A numerical IPv6 address must be written within [brackets].DEFAULT
NULLPROTOCOLS
This functionality affects all supported protocolsEXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/file.txt");
curl_easy_setopt(curl, CURLOPT_PRE_PROXY, "socks4://socks-proxy:1080");
curl_easy_setopt(curl, CURLOPT_PROXY, "http://proxy:80");
curl_easy_perform(curl);
}
}
AVAILABILITY
Added in curl 7.52.0RETURN VALUE
Returns CURLE_OK if proxies are supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.SEE ALSO
CURLOPT_HTTPPROXYTUNNEL(3), CURLOPT_PROXY(3)2024-12-21 | libcurl |