curl-library
Re: libcurl custom dns not failing (when bad dns ip configured with CURLOPT_DNS_SERVERS )
Date: Mon, 9 Dec 2013 10:49:58 +0100 (CET)
On Thu, 28 Nov 2013, Stefan Rogin wrote:
> A feature that could allow local dns would be nice:
> for example:
>
> 1. set url "http://site.com/page" and dns "8.8.8.8"
> 2. curl would first resolve the site.com to 123.123.123.123
> 3. forward the url to the proxy as "http://123.123.123.123/page" and
> with the request-url set to "http://site.com/page" (dose http proxy
> support this? could the CONNECT command be used if available?) as with
> shared hosting an IP is not enough to get the requested domain page.
You can do the name resolving locally and then pass in a URL with an IP number
and a correct Host: to the proxy. That's perfectly possible, although you'd
miss out on proper handling of multiple addresses for a name and happy
eyeballs etc.
> So in my case am I stuck using the proxy's dns?.
Yes, unless you do the manual fiddling to make the above happen.
I would say that your use case sounds very unusual.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2013-12-09