diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-03-22 17:15:40 +0200 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2012-03-22 17:15:40 +0200 |
commit | bff6edc0e10cdf27dae170403f6a6badf9b8d1c0 (patch) | |
tree | 8e47815653a07ae8be9c6d391b22d78098d5d017 | |
parent | 1e094bb1109bf1fa83d9feeb2f91b99be8a6839f (diff) |
same as in previous commit workaround for socks4
-rw-r--r-- | server/server/speedtest.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/server/server/speedtest.cpp b/server/server/speedtest.cpp index ecfec2e..8303afc 100644 --- a/server/server/speedtest.cpp +++ b/server/server/speedtest.cpp @@ -58,8 +58,13 @@ size_t speedtest::test(config::proxy_entry_base *p) CURLcode error = CURL_LAST; for(int i = 0; error && (i < 3); i++) { - if(type == CURLPROXY_SOCKS5_HOSTNAME && i > 1) - curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + if(i > 1) + { + if(type == CURLPROXY_SOCKS5_HOSTNAME) + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + if(type == CURLPROXY_SOCKS4A) + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A); + } error = curl_easy_perform(curl); } |