[glib-networking/mcatanzaro/proxy-priority: 1/2] Drop environment proxy resolver to lowest priority




commit 9f10f0eade2ac824c2b848823691b5984efd8aeb
Author: Michael Catanzaro <mcatanzaro redhat com>
Date:   Fri Aug 5 13:02:18 2022 -0500

    Drop environment proxy resolver to lowest priority
    
    Currently the environment proxy resolver has 100 priority. The portal
    resolver in GLib has 90 priority, the GNOME settings resolver has 80
    priority, and the libproxy resolver is relegated to last place with 0
    priority. Making the new environment proxy resolver highest-priority
    seemed like a good idea to me because environment variables are for
    debugging and surely if an environment variable is set it's because you
    want it to be respected, right?
    
    Wrong. Problem is, Console and Terminal both inspect GNOME proxy
    settings and translate them into environment variables, see console#81.
    If we prioritize the environment variables, which are unable to fully
    express the desktop configuration, then we lose out on goodies like
    web proxy autoconfig and such. Worse, this will only happen when running
    from your terminal, meaning applications will break only when run in
    Console or Terminal. Imagine how frustrating that would be to debug.
    
    Although I'm usually reluctant to make major behavior changes in a
    stable release, we should revert back to longstanding historical
    behavior. The environment proxy resolver will be used only as the last
    fallback, useful in case libproxy is not available.
    
    Fixes #190

 proxy/environment/genvironmentproxyresolver.c | 2 +-
 proxy/libproxy/glibproxyresolver.c            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/proxy/environment/genvironmentproxyresolver.c b/proxy/environment/genvironmentproxyresolver.c
index cfbdbb8e..6b9150c9 100644
--- a/proxy/environment/genvironmentproxyresolver.c
+++ b/proxy/environment/genvironmentproxyresolver.c
@@ -204,6 +204,6 @@ g_environment_proxy_resolver_register (GIOModule *module)
   g_io_extension_point_implement (G_PROXY_RESOLVER_EXTENSION_POINT_NAME,
                                   g_environment_proxy_resolver_get_type(),
                                   "environment",
-                                  100);
+                                  0);
 }
 #endif
diff --git a/proxy/libproxy/glibproxyresolver.c b/proxy/libproxy/glibproxyresolver.c
index f31a8ba0..e1c5a60b 100644
--- a/proxy/libproxy/glibproxyresolver.c
+++ b/proxy/libproxy/glibproxyresolver.c
@@ -239,6 +239,6 @@ g_libproxy_resolver_register (GIOModule *module)
   g_io_extension_point_implement (G_PROXY_RESOLVER_EXTENSION_POINT_NAME,
                                   g_libproxy_resolver_get_type(),
                                   "libproxy",
-                                  0);
+                                  10);
 }
 #endif


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