Re: about name resolving under proxy



thanks for your reply again

I tried the address pattern matching strategy of Firefox:

Suppose the ip of www.google.com is 1.2.3.4, and I set Firefox to ignore proxy for 1.2.0.0/16, and made it connect through a fake HTTP proxy

Then I navigated http://www.google.com, and got 'proxy server refused', but http://1.2.3.4 worked.

So the strategy of Firefox is intuitive string pattern matching.

Actually until got your email, I've always treated 127.0.0.1 and locahost as different hosts, and often I set Firefox to connect to 127.0.0.1 through proxy, but directly to localhost -- for some ugly http server testing :P

However I found your design also make sense, so maybe we need an extra option ?


regards,

Lu
2009.04.17


On Fri, Apr 17, 2009 at 10:29 PM, Dan Winship <danw gnome org> wrote:
璐王 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]