1--- 2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_PROXYPASSWORD 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_HTTPAUTH (3) 9 - CURLOPT_PASSWORD (3) 10 - CURLOPT_PROXYAUTH (3) 11 - CURLOPT_PROXYUSERNAME (3) 12--- 13 14# NAME 15 16CURLOPT_PROXYPASSWORD - password to use with proxy authentication 17 18# SYNOPSIS 19 20~~~c 21#include <curl/curl.h> 22 23CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROXYPASSWORD, char *pwd); 24~~~ 25 26# DESCRIPTION 27 28Pass a char pointer as parameter, which should be pointing to the null-terminated 29password to use for authentication with the proxy. 30 31The CURLOPT_PROXYPASSWORD(3) option should be used in conjunction with 32the CURLOPT_PROXYUSERNAME(3) option. 33 34The application does not have to keep the string around after setting this 35option. 36 37# DEFAULT 38 39blank 40 41# PROTOCOLS 42 43Most 44 45# EXAMPLE 46 47~~~c 48int main(void) 49{ 50 CURL *curl = curl_easy_init(); 51 if(curl) { 52 CURLcode res; 53 curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin"); 54 curl_easy_setopt(curl, CURLOPT_PROXY, "http://localhost:8080"); 55 curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, "mrsmith"); 56 curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, "qwerty"); 57 res = curl_easy_perform(curl); 58 curl_easy_cleanup(curl); 59 } 60} 61~~~ 62 63# AVAILABILITY 64 65Added in 7.19.1 66 67# RETURN VALUE 68 69Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or 70CURLE_OUT_OF_MEMORY if there was insufficient heap space. 71