char *range;
long low_speed_limit;
long low_speed_time;
+ char* dns_servers; /* dot notation: 1.1.1.1;2.2.2.2 */
+ char* dns_interface; /* interface name */
+ char* dns_ipv4_addr; /* dot notation */
+ char* dns_ipv6_addr; /* dot notation */
int showerror; /* -1 == unset, default => show errors
0 => -s is used to NOT show errors
1 => -S has been used to show errors */
void free_config_fields(struct Configurable *config);
#endif /* HEADER_CURL_TOOL_CFGABLE_H */
-
/* all these ones, starting with "*" or "$" as a short-option have *no*
short option to mention. */
{"*", "url", TRUE},
+ {"*4", "dns-ipv4-addr", TRUE},
+ {"*6", "dns-ipv6-addr", TRUE},
{"*a", "random-file", TRUE},
{"*b", "egd-file", TRUE},
{"*B", "bearer", TRUE},
{"*c", "connect-timeout", TRUE},
{"*d", "ciphers", TRUE},
+ {"*D", "dns-interface", TRUE},
{"*e", "disable-epsv", FALSE},
{"*E", "epsv", FALSE},
/* 'epsv' made like this to make --no-epsv and --epsv to work
#ifdef USE_ENVIRONMENT
{"*f", "environment", FALSE},
#endif
+ {"*F", "dns-servers", TRUE},
{"*g", "trace", TRUE},
{"*h", "trace-ascii", TRUE},
{"*i", "limit-rate", TRUE},
switch(letter) {
case '*': /* options without a short option */
switch(subletter) {
+ case '4': /* --dns-ipv4-addr */
+ /* addr in dot notation */
+ GetStr(&config->dns_ipv4_addr, nextarg);
+ break;
+ case '6': /* --dns-ipv6-addr */
+ /* addr in dot notation */
+ GetStr(&config->dns_ipv6_addr, nextarg);
+ break;
case 'a': /* random-file */
GetStr(&config->random_file, nextarg);
break;
case 'd': /* ciphers */
GetStr(&config->cipher_list, nextarg);
break;
+ case 'D': /* --dns-interface */
+ /* interface name */
+ GetStr(&config->dns_interface, nextarg);
+ break;
case 'e': /* --disable-epsv */
config->disable_epsv = toggle;
break;
config->writeenv = toggle;
break;
#endif
+ case 'F': /* --dns-servers */
+ /* IP addrs of DNS servers */
+ GetStr(&config->dns_servers, nextarg);
+ break;
case 'g': /* --trace */
GetStr(&config->trace_dump, nextarg);
if(config->tracetype && (config->tracetype != TRACE_BIN))
return PARAM_OK;
}
-
" --digest Use HTTP Digest Authentication (H)",
" --disable-eprt Inhibit using EPRT or LPRT (F)",
" --disable-epsv Inhibit using EPSV (F)",
+ " --dns-servers DNS server addrs to use: 1.1.1.1;2.2.2.2",
+ " --dns-interface Interface to use for DNS requests",
+ " --dns-ipv4-addr IPv4 address to use for DNS requests, dot notation",
+ " --dns-ipv6-addr IPv6 address to use for DNS requests, dot notation",
" -D, --dump-header FILE Write the headers to this file",
" --egd-file FILE EGD socket path for random data (SSL)",
" --engine ENGINE Crypto engine (SSL). \"--engine list\" for list",
#endif
}
}
-
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);
return res;
}
-