aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-01-04 23:01:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-01-04 23:01:00 +0000
commit2e42b0a252416803a90ea232dc94a0a21d5a97e5 (patch)
treece5c9b3a2e33408a77300563964924a73d6b464b /lib/url.c
parentfcc485092a09811d5bfed78d13984fed5c31e652 (diff)
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.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 550cb2113..774e25ff2 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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 */