summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/server/speedtest.cpp9
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);
}