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 621767 - [enh] add proxy to nm-connection-editor [th/proxy-bgo621767]
[enh] add proxy to nm-connection-editor [th/proxy-bgo621767]
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: API
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Jiri Klimes
NetworkManager maintainer(s)
: 583431 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-06-16 12:16 UTC by Felipe Contreras (banned)
Modified: 2016-12-16 14:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Felipe Contreras (banned) 2010-06-16 12:16:16 UTC
When switching a network (either by interface or VPN) that requires a proxy, the GConf configuration should switch as well.

I consider that kind of basic functionality, just like ip address, DNS server; requiring the user to do any of those steps in order to be able to use the network is burdensome.

Besides, at least GNOME proxy settings already provide the concept of locations.
Comment 1 Josh Triplett 2011-03-04 00:47:00 UTC
Adding an extra tab to the connection editor that allows specifying the GNOME proxy settings to switch to when using that connection would work nicely.
Comment 2 Jiri Klimes 2012-09-06 10:41:50 UTC
It's being forked on ...
Comment 3 Thomas Haller 2015-01-27 17:23:05 UTC
*** Bug 583431 has been marked as a duplicate of this bug. ***
Comment 4 David Woodhouse 2015-11-11 14:35:32 UTC
The central GNOME proxy settings should probably just die. It's entirely the wrong model.

Further thoughts at https://wiki.gnome.org/Projects/NetworkManager/Proxies
Comment 5 Taylor Braun-Jones 2015-11-11 17:32:59 UTC
Awesome! Finally a _real_ HTTP proxy solution! Looking forward to it...
Comment 6 Thomas Haller 2016-11-25 20:04:10 UTC
this was implemented in NetworkManager server side with 1.5.3

The main commit was here:  https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=6e9abe3d88148b92978400c5155c48ec29372f2e


It integerates proxy settings with pac-runner.


What is still missing is nm-connection-editor integration. For now, the new API is only exposed on D-Bus API and in nmcli.

I re-purpose the bug for the latter.
Comment 7 Thomas Haller 2016-11-25 20:14:11 UTC
btw, there were patches on the mailing list by Atul Anand (CC-ing).

https://mail.gnome.org/archives/networkmanager-list/2016-August/msg00079.html

I took them and applied them on a branch th/proxy-bgo621767, they would need some love.


One ~problem~ is, that current master of nm-applet requires only libnm-1-2 API (while the proxy API is libnm-1-6). So we would either have to
  
  (a) branch off a nm-1-2 stable branch and bump the required library version on 
      master to 1.6
  (b) add a capability workaround, preferably using runtime-detection of compile 
      time.

Of course, as time goes by, (a) becomes more and more attractive.
Comment 8 Thomas Haller 2016-11-25 20:15:14 UTC
using runtime-detection of compile time.
                        ^^ OR
Comment 9 Beniamino Galvani 2016-12-06 14:58:38 UTC
> nm-c-e/proxy: Support proxy handling similar to nmcli.

+               g_file_get_contents (filename, &script, &len, NULL);
+               if (   len > 100000
+                       || !strstr (script, "FindProxyForURL")

Maybe we should show a message telling why the file is not valid.

Pushed a fixup, otherwise looks good!
Comment 10 Thomas Haller 2016-12-06 21:15:54 UTC
(In reply to Beniamino Galvani from comment #9)
> > nm-c-e/proxy: Support proxy handling similar to nmcli.
> 
> +               g_file_get_contents (filename, &script, &len, NULL);
> +               if (   len > 100000
> +                       || !strstr (script, "FindProxyForURL")
> 
> Maybe we should show a message telling why the file is not valid.

In libnm, I did https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=92ea1bdb06eda77f3ec5bf6b8cd3bb54da739c77 so that nm_connection_verify() rejects such configurations.

Hence, I pushed a fixup commit that get's rid of the check in nm-c-e. 

Note however, there is still a bug that changing the script doesn't trigger a re-verification of the input values. Compare that with e.g. ethernet's cloned-mac-address input-field: while typing, the connection is validated and the "Save" button is disabled accordingly.
Comment 11 Thomas Haller 2016-12-06 21:36:56 UTC
(In reply to Thomas Haller from comment #10)


> Note however, there is still a bug that changing the script doesn't trigger
> a re-verification of the input values. Compare that with e.g. ethernet's
> cloned-mac-address input-field: while typing, the connection is validated
> and the "Save" button is disabled accordingly.

fixed too.