aboutsummaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2013-02-09 13:18:02 -0800
committerDaniel Stenberg <daniel@haxx.se>2013-09-12 21:11:47 +0200
commit32352ed6adddcb9275eb6f19f8aaeadf9476b0fd (patch)
treea1add10a47b3540bc1400d05e46b6b5eb5f13a9a /src/tool_operate.c
parentdf69440d05f1133a9053e19a9bf576c8b13514b9 (diff)
curl: Add support for various DNS binding options.
(Passed on to c-ares.) Allows something like this: curl --dns-interface sta8 --dns-ipv4-addr 8.8.1.111 --interface sta8 \ --localaddr 8.8.1.111 --dns-servers 8.8.8.1 www.google.com Signed-off-by: Ben Greear <greearb@candelatech.com>
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index aa5fc6908..ba077973e 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1239,6 +1239,12 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
my_setopt(curl, CURLOPT_PROGRESSDATA, &progressbar);
}
+ my_setopt_str(curl, CURLOPT_DNS_SERVERS, config->dns_servers);
+ /* new in libcurl 7.33.0: */
+ my_setopt_str(curl, CURLOPT_DNS_INTERFACE, config->dns_interface);
+ my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP4, config->dns_ipv4_addr);
+ my_setopt_str(curl, CURLOPT_DNS_LOCAL_IP6, config->dns_ipv6_addr);
+
/* new in libcurl 7.6.2: */
my_setopt_slist(curl, CURLOPT_TELNETOPTIONS, config->telnet_options);
@@ -1899,4 +1905,3 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
return res;
}
-