Re: about name resolving under proxy



璐王 wrote:
> First, my network environment is somewhat interesting, the DNS server
> isn't working actually, but fortunately there's a HTTP proxy.

> In theory, we don't need to resolve the address if we're using a proxy,
> right, so I wonder if it's a bug or as designed.

Yeah, someone else filed a bug about this
(http://bugzilla.gnome.org/show_bug.cgi?id=577532).

The reason we resolve the hostname before connecting to the proxy, is
that you might have your proxy settings configured to bypass the proxy
for local hosts. So, eg, if your "ignore_hosts" is set to
192.168.0.0/16, then when you try to connect to www.google.com, we first
have to make sure that that name doesn't resolve to an address on 192.168.

But given that two people have reported this behavior as a bug now, I
guess the right thing is to try the DNS resolution, and if it fails,
just assume the host must be non-local, and so use the proxy. (And
probably, if the ignore_hosts list doesn't have any non-127 netmasks on
it, then just skip the DNS step altogether.)

This will probably get fixed for 2.26.2.

-- Dan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]