Here the output is supposed to be anything but 0.
Because 0 according to libcurl documentation is a success. http://curl.haxx.se/libcurl/c/libcurl-errors.html
curl_easy_setopt(curl_handle, CURLOPT_PROXY, "socks5://127.0.0.1:9050");
And clearly curl_easy_setopt is supposed to return 5 i.e CURLE_COULDNT_RESOLVE_PROXY
#include <iostream>
#include <string>
#include <curl/curl.h>
using namespace std;
int main()
{
CURL *curl_handle;
CURLcode err;
curl_global_init(CURL_GLOBAL_ALL);
curl_handle = curl_easy_init();
err = curl_easy_setopt(curl_handle, CURLOPT_PROXY, "socks5://127.0.0.1:9050");
cout << err;
}
Am i missing something here ?