Network management idea: proxy settings

My wife has a netbook I sometimes “steal” to have a tiny and light pc at work. (My 13 inches need at least a bag, my wife’s netbook stays… everywhere).
At work we have an http proxy that I have to set to browse and I usually forget to reset when I go back home🙂
So, my wife cannot browse with and cannot easily fix the problem herself.
So, my question is: do you have two different network sharing the same proxy settings? Do you know something sharing? Do you know networks enabling/disabling their proxy to access the net? I don’t.
Hence, the idea and the proposal: can our network management code save/set proxy settings together with network (ip, mask, route, dns) ones?

18 responses to “Network management idea: proxy settings

  1. you can have two ‘profiles’ on the browser, one with the proxy, other without it. in firefox this is -p yourprofile.

    you can default to her, and use your at work.

    • Tomaz, thanks for your suggestion.
      I’m in fact realizing I never cited KDE in my article. I’m aware of that firefox feature, but I’d like to have it on each browser: I was in fact referring to system-wise settings. In fact I’m a big “browser-switcher”…🙂

  2. Berend De Schouwer

    Try the proxydriver plugin for NetworkManager.

    It lets you configure different proxy settings per-network, and it then sets Gnome and KDE settings per-network, as the networks become available. Then configure Firefox to use the system settings.

    http://sourceforge.net/projects/proxydriver/

  3. Proxy settings really need to be in the network settings. There are only few people who use a proxy that is available on the net (and hopefully that’s authenticated). Another category I can think of are anonymisers, which are in fact proxies too.

    Those are usually browser settings and browsers supposedly will not drop the override options.

    The system proxy should be in NM, ConnMan or similar software.

  4. +1

    not sure, but i think connman already has the support for this

  5. +1
    Thanks, I need it!

  6. I was just thinking about this yesterday! IMO what is needed is, as you say, per connection proxy settings. I t should be directly in the network configuration tab. What is also needed is a common configuration interface : GNOME/KDE applications + any other that wants to hook into it (firefox comes to mind). Otherwise you’d end up with half the applications working fine, the other needing complex configuration.
    Another thing I’d like to see is support for per network firewall rules. Fedora’s firewalld project : https://fedoraproject.org/wiki/FirewallD/ seems to make that available. (Not sure about its status though)

  7. Sounds a lot like the network profiles that Windows 7 (or Vista) already provide. They allow to switch between various settings for “work”, “office”, etc.. Might be useful to take a look at that for some inspiration

  8. I agree with Thiago, that should go to the network backend (NetworkManager,
    Wicd, connman, etc). There is an entry in bugs.kde.org with this wish
    (https://bugs.kde.org/show_bug.cgi?id=248387). What would be cool is if the backend changed the firewall settings to transparently redirect the traffic to the proxy. Ok, cool and security risky too🙂

    Proxy driver worked here with kioslave and Chromium, but not with Firefox.
    Here proxydriver worked with KDE and Chromium, but not Firefox.

  9. I often find myself in that situation, since I sometimes use my private notebook at work, where I need to set a proxy – and I end up setting this in several applications and my profile.

    Making this a backends task (nm in my case) which can be adopted by gnome/kde and the applications would be really nice.

  10. IIRC, i had read somewhere that GNOME 3 is already moving in this exact direction – of tying proxy settings with network manager. And this was on my wishlist for a long time. Will look forward to it being implemented. I use two connections – one at home (proxyless, ethernet) and one at my college (http proxy, ethernet). I hate having to switch between the two.

    Another thing that I’d like to bring up (though I’m not entirely sure this is relevant here) is that the networkmanager should not only change the KIO settings, but have an option to globally change the appropriate environment variables like http_proxy. This way, its much easier to use software like apt-get and yum without having to manually change it at multiple places. This behaviour was the default in GNOME 2.

  11. Why don’t you set the proxy to “proxy” and then have scripts that alter the hosts file to point “proxy”at the correct IP (a “home” script and a “work” script).

    No change is necessary in firefox.

    • i actually do, but it’s not what I call a proper integrated networking configuration for end users.

      Most of us here are probably developers, but our usebase will not know how to write this scripts and say “it just does not work”, what is true of their pov.

  12. I proposed something like this in the KDE brainstorming forum. Further to this it should be possible to to figure out which network one is connected to based on the IP address of the DHCP server, IP address assigned by DHCP and a quick ping test of the proxy’s IP address to confirm that the expected proxy exists.

    All this should be in the same settings dialog box as the other network settings in the network manager -> Manage connections dialog (ie the “network settings”->”network connections” system settings) on a per connection basis.

    Well that’s my 2 bits

  13. Robert, the problem is how to apply the settings for every program in the system. The only way I can think of to achieve that is adding rules to iptables to configure transparent proxy, which requires root permissions. That is why I am saying this problem belongs to NetworkManager, Wicd, etc. They run as root and NM already changes iptables rules when it activates a shared connection.

  14. I found myself in the same pickle, having to switch between a proxy at work and no proxy at home. What I’ve done, is install a proxy on my notebook (tinyproxy) and set that as a system-wide default. When connecting to the network in the office, NM then changes tinyproxy’s configuration to use my work’s proxy as upstream proxy. When connecting to any other network, it uses no upstream proxy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s