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 684519 - Cannot use HTTPS direct if HTTP proxy is set
Cannot use HTTPS direct if HTTP proxy is set
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: network
2.33.x
Other Linux
: Normal critical
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-09-21 03:33 UTC by Michael Gratton
Modified: 2018-05-29 06:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test program (483 bytes, application/octet-stream)
2012-09-21 03:38 UTC, Michael Gratton
Details

Description Michael Gratton 2012-09-21 03:33:38 UTC
Setting an HTTP proxy but leaving HTTPS blank in gnome-control-center causes the glib-networking implementation of GProxyResolver to return the HTTP proxy for HTTPS connections, rather than "direct://"

This makes it impossible to use a HTTP proxy and a direct connection for HTTPS, as is required by my organisation, thus making HTTPS unusable.

In the short term, if there is a blank HTTPS proxy, no proxy should be used.

In the long term, most other clients have a preference "Use HTTP proxy for all protocols" preference (but only really apply it to HTTPS and maybe FTP), which is really what is needed here.
Comment 1 Michael Gratton 2012-09-21 03:38:08 UTC
Created attachment 224895 [details]
Test program

With glib-networking 2.33.14, running the test program results in the following:

> mjg@montbard:~/tmp$ gsettings list-recursively | grep -i proxy
> org.gnome.system.proxy mode 'manual'
> org.gnome.system.proxy.http host 'www-proxy.cse.unsw.edu.au'
> org.gnome.system.proxy.http port 3128
> org.gnome.system.proxy.https host ''
> org.gnome.system.proxy.https port 0
> [snip]
> mjg@montbard:~/tmp$ ./gproxy-resolver.py http://duckduckgo.com/?q=hello
> http://www-proxy.cse.unsw.edu.au:3128
> mjg@montbard:~/tmp$ ./gproxy-resolver.py https://duckduckgo.com/?q=hello
> http://www-proxy.cse.unsw.edu.au:3128

The last result should be "direct://".
Comment 2 Dan Winship 2012-09-21 11:02:49 UTC
(In reply to comment #0)
> Setting an HTTP proxy but leaving HTTPS blank in gnome-control-center causes
> the glib-networking implementation of GProxyResolver to return the HTTP proxy
> for HTTPS connections, rather than "direct://"

This is by design, and changing it would break existing users.

There ought to be some way to specify that though.
Comment 3 Michael Gratton 2012-09-23 01:37:50 UTC
If people are relying on that, it's understandable then. Perhaps a better short-term solution would be to add a "use-same-proxy" setting to the GNOME schema, by default set to true. Then have glib-networking look for this and if unset or set to true, retain the existing behaviour, else treat each protocol separately.

This is an existing setting for this for my login, perhaps migrated from an old GConf value, so there's perhaps some precedent.
> mjg@montbard:~$ gsettings list-recursively | grep -i use-same
> org.gnome.system.proxy use-same-proxy false
Comment 4 Nicolas Dufresne (ndufresne) 2012-09-27 17:08:01 UTC
This seems to be recent behavior, as libproxy would have return direct:// for https if an http proxy was set and not a secure one.

I did some test Firefox and Chrome. Firefox, when using system setting, seems to respect this behaviors, though if you configure manually it behave the way Mike have described (but it supports the use_same_proxy). Chrome can only use system settings and behave the way Mike is expecting.
Comment 5 Nicolas Dufresne (ndufresne) 2012-09-27 17:10:03 UTC
Mike, meanwhile, you can workaround this issue by using a PAC file. This way you can script the exact behavior you want.
Comment 6 Dan Winship 2012-09-28 16:12:48 UTC
From org.gnome.system.proxy.gschema.xml:

        If an http proxy is configured, but an https proxy is not,
        then the http proxy is also used for https.

and

    <key name="use-same-proxy" type="b">
      <default>true</default>
      <description>
        This key is not used, and should not be read or modified.
      </description>
    </key>

IIRC, use-same-proxy was supposed to be for the case where you use the HTTP proxy for non-HTTP protocols, but we ended up not supporting that. (But we can't remove the key from the schema because that would be an ABI break because of how GSettings works.) There was never any way (in gsettings or in the old GConf schema) to specify that http should use a proxy but https shouldn't.

At any rate, apparently some people have it set to true now and same have it set to false, so I'm not sure I'd want to suddenly start interpreting it as meaning something. We'd probably want a new key for that. Maybe /system/proxy/https/no-proxy or something. Alternatively, we could move the proxy settings again (ha ha) to get it properly namespaced (/org/gnome/something rather than /system) and fix things there...
Comment 7 GNOME Infrastructure Team 2018-05-24 14:38:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/608.
Comment 8 Michael Catanzaro 2018-05-25 16:36:45 UTC
Reopening. This bug was migrated to https://gitlab.gnome.org/GNOME/glib, but it should have been migrated to https://gitlab.gnome.org/GNOME/glib-networking.
Comment 9 Christoph Reiter (lazka) 2018-05-29 06:42:53 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib-networking/issues/23.