FS#49962 - [curl] please add c-ares for the --dns-servers option
Attached to Project:
Arch Linux
Opened by Peter Wu (Lekensteyn) - Tuesday, 05 July 2016, 20:37 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 29 March 2017, 18:53 GMT
Opened by Peter Wu (Lekensteyn) - Tuesday, 05 July 2016, 20:37 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 29 March 2017, 18:53 GMT
|
Details
Description:
For a Network Manager dispatcher script, I would like to override the DNS server for curl since resolv.conf is not yet configured. That is however not possible at the moment because curl is not built with c-ares. Package version: curl 7.49.1-1 Steps to reproduce: $ curl --dns-servers 8.8.8.8 example.com curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision. Manual excerpt: --dns-servers <ip-address,ip-address> Set the list of DNS servers to be used instead of the system default. The list of IP addresses should be separated with commas. Port numbers may also optionally be given as :<port-number> after each IP address. This option requires that libcurl was built with a resolver backend that supports this operation. The c-ares back‐ end is the only such one. (Added in 7.33.0) |
This task depends upon
Closed by Dave Reisner (falconindy)
Wednesday, 29 March 2017, 18:53 GMT
Reason for closing: Won't implement
Additional comments about closing: Unless there's compelling new evidence to enable c-ares, this isn't a good tradeoff.
Wednesday, 29 March 2017, 18:53 GMT
Reason for closing: Won't implement
Additional comments about closing: Unless there's compelling new evidence to enable c-ares, this isn't a good tradeoff.
There's also been several reliability problems with c-ares in the past:
https://curl.haxx.se/mail/lib-2009-08/0014.html (I don't know if this is still valid)
https://curl.haxx.se/mail/lib-2013-09/0098.html
https://bugs.archlinux.org/task/22797 (it seems that c-ares since has learned to read nsswitch.conf and hosts but still has shortcomings)
If the *only* advantage of using c-ares is support for --dns-servers, I don't know that this is a sensible thing to do.
I found this bug through trying to use curl through Tor, and that seems a significant-enough use case to enable this, unless it is actively harmful in normal usage.
Please consider it.
Fedora
Ubuntu
Debian
OpenSUSE/SLES
CentOS/RHEL
Here's a list of distros using c-ares:
(i honestly don't know of any)
If you care about c-ares, then please look into the shortcomings/reliability issues I posted about nearly a year ago. Talk to maintainers in other distros and find out why they aren't using c-ares (because no one is really doing this). I'm not making sacrifices just for Tor -- it's not something I'm ever going to care about.
The first is from 2009. That's eight years ago and I've seen various threads mentioning that it's now solved.
The second is from 2013 -- four years ago -- largely seems to refer to MacOS X, and notes that 'the c-ares we're using *is* old, 1.7.1'. So an old version, on MacOS X, from four years ago. The main complaint there is general and unspecific unreliabilities.
The third issue you've already noted was half-solved. I'm not sure how the NSS/mDNS support has resolved, or how much of an issue it is.
Anyway, I'm not saying this to change your mind, just to update the set of issues you listed. I'll look at making an AUR package for curl with ares compiled in.