After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 113222 - Allow some hosts to not use the proxy
Allow some hosts to not use the proxy
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: [obsolete] Backend:Mozilla
0.x
Other Linux
: Normal enhancement
: ---
Assigned To: Marco Pesenti Gritti
Marco Pesenti Gritti
Depends on: 112979
Blocks: 113219
 
 
Reported: 2003-05-18 13:07 UTC by Malcolm Tredinnick
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow proxy-ignorable hosts. (3.11 KB, patch)
2003-05-18 13:08 UTC, Malcolm Tredinnick
none Details | Review
Updated version of previous patch, taking into account all comments so far (5.12 KB, patch)
2003-05-19 03:52 UTC, Malcolm Tredinnick
none Details | Review
Updated patch (it did not apply cleanly anymore) (3.28 KB, patch)
2003-07-20 11:49 UTC, Marco Pesenti Gritti
none Details | Review
safer and respecting schemas patch (2.83 KB, patch)
2003-08-07 11:24 UTC, Marco Pesenti Gritti
none Details | Review

Description Malcolm Tredinnick 2003-05-18 13:07:57 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 Epiphany 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.
Comment 1 Malcolm Tredinnick 2003-05-18 13:08:42 UTC
Created attachment 16606 [details] [review]
Allow proxy-ignorable hosts.
Comment 2 Marco Pesenti Gritti 2003-05-18 16:14:40 UTC
It looks good, but I guess we need to reset mozilla pref to "" when
there the list is NULL ?
Comment 3 Dave Bordoley [Not Reading Bug Mail] 2003-05-18 20:03:29 UTC
Malcolm, 

Epiphany already has a

#define CONF_NETWORK_NO_PROXIES_FOR
"/apps/epiphany/network/no_proxies_for"

That has an associated schema entry. If your patch obsoletes this key,
can you remove it from the schema as well as from the code?
Comment 4 Malcolm Tredinnick 2003-05-18 23:53:26 UTC
With regards to Marco's comment, yes you are correct: I will fix the
patch. The "if (!hosts)..." portion can be removed and it should Just
Work(tm), I think. I will look at this further.

With regards to the gconf key: I had not noticed that there was
already a gconf key to do this. I think we still need to use the key I
am proposing so that it fits in with what the control-center will be
setting, etc. Do you want to obsolete the CONF_NETWORK_NO_PROXIES_FOR
key, which will have the side-effect of temporarily breaking the setup
for people who have found this hidden preference? Or do you want to
use that key as a fallback (if ignore_hosts is set, use that,
otherwise use the old key)? I would suggest going with the latter
option, at least until a new control-center is in wide-spread use that
allows the ignorable hosts to be set via a UI, rather than with gconftool.
Comment 5 Dave Bordoley [Not Reading Bug Mail] 2003-05-19 00:48:24 UTC
>I would suggest going with the latter
>option, at least until a new control-center is in wide-spread use that
>allows the ignorable hosts to be set via a UI, rather than with
gconftool.


Well my personal stance is that we are targetting gnome 2.4, and that
in most cases its fair for us to expect users to have this setup if
they want a fully supported app. Forcing the user to search for a
hidden control center key is really no worst than forcing them to
search for hidden epihpany key. Also i see a point of confusion if
users edit keys via gconfeditor for instance. They might set the
existing epiphany key and wonder why it doesn't work.

Perhaps for the time being we should keep the key but i think in the
final shipped version of epiphany we should remove both the key from
the schema and the internals. I'd really like us to have a clean
schema file with only prefs that we plan to support for a long time.
It makes the use of gconf editor much easier since we limit the amount
of cruft that is listed that actually does nothing.

Of course this is just my opinion, and the final decision is up to marco.
Comment 6 Malcolm Tredinnick 2003-05-19 01:16:46 UTC
Fair enough. By the way, to give you an idea of the timing on getting
everything together here: the gnome-vfs change that is relevant here
(the important bit being the schema change to initialise the key) is
about a day away from being submitted. The control-center change is a
day or two away (I will be debugging it this evening). So people won't
have to poke around with gconftool for very long.

In view of the time frame, you may decide to hold off on this patch
until the control-center patch is available (bug #44098).

Note also (and this pseudo-usability wart may affect your timing) that
the new key is a list of strings, not a string, so setting it cannot
be done via gconf-editor, you need to use gconftool-2. Using a string
would be nicer for reading in epiphany and galeon, but introduces
difficulties elsewhere (wherever you need to parse it into components).
Comment 7 Dave Bordoley [Not Reading Bug Mail] 2003-05-19 03:20:53 UTC
according to philip in bug 113221, the old pref wasn't being respected
anyway at least in galeon. If this is true for ephy as well (i assume
it is but marco would know better) we should probably just kill it. 
Comment 8 Malcolm Tredinnick 2003-05-19 03:43:59 UTC
I (somewhat heretically) doubt Philip's comment, though. It looks to
me like you were right initially. In
epiphany/embed/mozilla/mozilla-notifiers.cpp, look at the
conversion_table array. It maps CONF_NETWORK_NO_PROXIES_FOR from
epiphany onto the mozilla network.proxy.no_proxies_on preference
(since they are both in the same format). 
Comment 9 Malcolm Tredinnick 2003-05-19 03:52:44 UTC
Created attachment 16616 [details] [review]
Updated version of previous patch, taking into account all comments so far
Comment 10 Marco Pesenti Gritti 2003-05-19 06:49:34 UTC
Looks cool. Please commit this with the others patches. Thanks a lot !
Comment 11 Dave Bordoley [Not Reading Bug Mail] 2003-07-08 16:42:14 UTC
Marking 1.0 assuming all the other patches get into gnome 2.4
Comment 12 Christophe Fergeau 2003-07-18 15:27:07 UTC
The gnome-vfs patch didn't make it before the feature freeze, and I
tend to consider it as a feature. If you really need it in epiphany,
we could check with the release team what they think about it, imo
it's too late for it :(
Comment 13 Marco Pesenti Gritti 2003-07-18 15:48:00 UTC
But alex gave his ok to commit before the freeze, no ?
I'm not sure what's the status/complexity of the patch, I guess this
should be discussed with release team.
A possible solution would be to just install the key I guess and let
people configure it with gconf-editor. Better than nothing.
Comment 14 Christophe Fergeau 2003-07-18 16:08:01 UTC
That was after the "official" freeze, but before the postponed freeze,
but I think what counts is the commit of the patch, not its approval :)
If you want it in, I'll let you discuss that issue with the release
team :)
Comment 15 Marco Pesenti Gritti 2003-07-20 11:49:41 UTC
Created attachment 18453 [details] [review]
Updated patch (it did not apply cleanly anymore)
Comment 16 Marco Pesenti Gritti 2003-08-07 11:24:07 UTC
Created attachment 18996 [details] [review]
safer and respecting schemas patch
Comment 17 Marco Pesenti Gritti 2003-08-11 17:44:24 UTC
checked in
Comment 18 Marco Pesenti Gritti 2003-09-01 13:29:09 UTC
Unset milestone so I can remove them. Sorry for the spam.