好吧,我想使用默认的 Internet Explorer 连接代理设置在 C++ 中的 cURL 中发出请求,这是我的示例代码:
CURL *curl;
CURLcode result;
curl = curl_easy_init();
char errorBuffer[CURL_ERROR_SIZE];
if (curl)
{
// Now set up all of the curl options
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_HEADER, 0);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookies.txt");
// Attempt to retrieve the remote page
result = curl_easy_perform(curl);
// Always cleanup
curl_easy_cleanup(curl);
}
如何检索代理 Internet Explorer 设置,然后传递给我的 cURL,以便它能够使用代理发出请求?
提前致谢。