Based on Maxim Perenesenko's patch, we now do SOCKS5 operations and let the
proxy do the host name resolving and only if --socks5ip (or CURLOPT_SOCKS5_RESOLVE_LOCAL) is used we resolve the host name locally and pass on the IP address only to the proxy.
This commit is contained in:
@@ -2054,6 +2054,14 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
||||
}
|
||||
break;
|
||||
|
||||
case CURLOPT_SOCKS5_RESOLVE_LOCAL:
|
||||
/*
|
||||
* Enable or disable using of SOCKS5 proxy server to resolve domain names
|
||||
* instead of using platform API like gethostbyname_r etc
|
||||
*/
|
||||
data->set.socks5_resolve_local = (bool)(0 != va_arg(param, long));
|
||||
break;
|
||||
|
||||
default:
|
||||
/* unknown tag and its companion, just ignore: */
|
||||
result = CURLE_FAILED_INIT; /* correct this */
|
||||
|
||||
Reference in New Issue
Block a user