GNOME Bugzilla – Bug 113221
Allow some hosts to not use the proxy
Last modified: 2004-12-22 21:47:04 UTC
As part of bug #112979, a new key is going to be added to gconf (/system/http_proxy/ignore_hosts). This key is a list of strings containing hostnames and IP addresses that should be connected to directly, rather than via the specified proxy. By default, the key will contain localhost and 127.0.0.0/8. The patch attached to this bug report allows Galeon to process this key and pass it to gtkmozembed for retrieving web pages. The simplest way to test this patch is to run: gconftool-2 --type=list --list-type=string --set /system/http_proxy/ignore_hosts [localhost,127.0.0.0/8] (all on one line), configure a web browser to talk to a proxy and then browser http://localhost/ from a machine that is not the proxy. Without the patch, this browsing will not work. With the patch, it correctly connects directly to the local machine. Note that the patch that is coming in the #112979 will correctly handle IPv6 addresses as well and things are stored in the same format that mozilla expects them, so IPv4 and IPv6 will both work transparently.
Created attachment 16605 [details] [review] Patch to allow proxy-ignorable hosts.
Patch applied to cvs. Many thanks, Malcolm!
OK, that was amusing: I filed essentially the same bug against epiphany and those guys pointed out two problems with the patch (nothing major; we haven't broken Galeon or anything like that). You might want to have a read of the comments in bug #113222. Exactly the same comments apply to the galeon version: when the list is empty, it is not reset in mozilla and there is already a secret gconf key for ignoring certain hosts, which now becomes deprecated. Fixing the empty list part is easy; I will submit another patch to do that. How to handle the deprecated gconf key (and it should be deprecated so that all of GNOME uses the same key) is something you will need to make a call on Philip. I have given a couple of possibilities in #113222.
The old local no_proxy gconf entry does not really need to be worried about. It is not actually respected by the code (one has to ask why) so I don't see any need to provide backward compatibility for it. I await your confirmation that taking out the null check will result in the desired behaviour.
Created attachment 16614 [details] [review] Fine-tuning the previous patch
This new patch fixes the case when the gconf key is empty or missing -- in both cases mozilla is correctly informed of the value. It also removes the older gconf key and corrects the schema file. I think this key was being used, Philip, but since it was already in the format mozilla expected (a comma-separated string), it was just trivially mapped to a mozilla preference. I don't think removing this old key should cause too much trauma, but I will leave it up to you.
Updated patch applied. Thanks. Trying to close again :-)