1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 21:43:02 +01:00

Use proxy for DNS requests when type is SOCKS5

This commit is contained in:
Jfreegman 2015-11-02 02:01:17 -05:00
parent 9751cfc407
commit e02cf1bb7d
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63

View File

@ -254,7 +254,7 @@ static int set_lookup_proxy(ToxWindow *self, CURL *c_handle, const char *proxy_a
return 0; return 0;
if (proxy_address == NULL || port == 0) { if (proxy_address == NULL || port == 0) {
lookup_error(self, "Unknkown proxy error"); lookup_error(self, "Unknown proxy error");
return -1; return -1;
} }
@ -265,7 +265,7 @@ static int set_lookup_proxy(ToxWindow *self, CURL *c_handle, const char *proxy_a
return -1; return -1;
} }
long int type = proxy_type == TOX_PROXY_TYPE_SOCKS5 ? CURLPROXY_SOCKS5 : CURLPROXY_HTTP; long int type = proxy_type == TOX_PROXY_TYPE_SOCKS5 ? CURLPROXY_SOCKS5_HOSTNAME : CURLPROXY_HTTP;
ret = curl_easy_setopt(c_handle, CURLOPT_PROXYTYPE, type); ret = curl_easy_setopt(c_handle, CURLOPT_PROXYTYPE, type);