From Fedora Project Wiki
No edit summary
Line 37: Line 37:


====Gnome Applications====
====Gnome Applications====
Use key-values in org.gnome.system.proxy from gsettings:
Gnome applications use values in org.gnome.system.proxy from gsettings.<br>
<source lang="bash">
gnome-terminal goes further by setting the $PROTOCOL_PROXY variables using them for the child process.
 
<pre>
gsettings list-recursively  org.gnome.system.proxy
gsettings list-recursively  org.gnome.system.proxy
</source>
 
<source>
org.gnome.system.proxy autoconfig-url ''
org.gnome.system.proxy autoconfig-url ''
org.gnome.system.proxy ignore-hosts ['localhost', '127.0.0.0/8']
org.gnome.system.proxy ignore-hosts ['localhost', '127.0.0.0/8']
Line 58: Line 59:
org.gnome.system.proxy.socks host ''
org.gnome.system.proxy.socks host ''
org.gnome.system.proxy.socks port 0
org.gnome.system.proxy.socks port 0
</source>
</pre>




====KDE Applications====
====KDE Applications====
Use kioslaverc data configures using kwriteconf:
KDE applications use kioslaverc data configured using kwriteconf.<br>
 
<pre>
[Proxy Settings]
NoProxyFor=
Proxy Config Script=
ProxyType=1
ReversedException=false
ftpProxy=proxy.iiit.ac.in 8080
httpProxy=proxy.iiit.ac.in 8080
httpsProxy=proxy.iiit.ac.in 8080
socksProxy=proxy.iiit.ac.in 8080
</pre>




====Console Applications====
====Console Applications====
$PROTOCOL_PROXY variables are sourced from /etc/profile.d/ scripts.
$PROTOCOL_PROXY variables are sourced from /etc/profile.d/ scripts.<br>
These variables have to be set:
These variables have to be set:<br>
ALL_PROXY HTTP_PROXY HTTPS_PROXY FTP_PROXY SOCKS_PROXY NO_PROXY
ALL_PROXY HTTP_PROXY HTTPS_PROXY FTP_PROXY SOCKS_PROXY NO_PROXY<br>
all_proxy http_proxy https_proxy ftp_proxy socks_proxy no_proxy
all_proxy http_proxy https_proxy ftp_proxy socks_proxy no_proxy<br>
 


===Building NetworkManager on Fedora===
===Building NetworkManager on Fedora===

Revision as of 15:21, 28 April 2013

Integrate Proxy Settings with NetworkManager

Overview

Currently Proxy Settings are handled separately (by gnome-control-center in gnome) from NetworkManager. However, since proxy settings are connection dependent, they have to be updated as connections get (de-)activated. NetworkManager which handles that is the perfect place to do it.


Needs Addressed

It makes proxy setting configuration and its propagation to all desktop and console processes automated on a per-connection basis instead of the user setting them each time manually on connection changes.

Relevant Experience: I understand the D-BUS architecture and NetworkManager's code base. I have also thoroughly investigated how applications (of gnome, kde and terminal) seek proxy information as a first step. That said, I understand the concepts of networking and can effortlessly read and write programs in C\C++\bash.


Implementation

An NMProxyManager Gobject derivative class will be added to NetworkManager and initialized during start. This new module will expose the proxy settings over DBUS and call relevant executables to set the proxy settings, as connections get activated\deactivated. For settings, an NMSettingProxy subclass of NMSetting has to be implemented.


Timeline

  • Find proxy setting propagation sources DONE!
  • Get NetworkManager & build on Fedora DONE!
  • Understand NetworkManager codebase DONE!
  • Implement NMSettingProxy DOING!
  • Implement NMProxyManager and its DBUS Interfaces
  • Write dispatcher scripts (using gsettings, kwriteconfig, profile.d scripts)
  • Make them build-configurable (update Makefiles)
  • Test it on gnome, kde and console applications
  • Send a pull request


Current Progress

This section will be changing continuously.

Proxy Setting Propagation sources

Gnome Applications

Gnome applications use values in org.gnome.system.proxy from gsettings.
gnome-terminal goes further by setting the $PROTOCOL_PROXY variables using them for the child process.

gsettings list-recursively  org.gnome.system.proxy

org.gnome.system.proxy autoconfig-url ''
org.gnome.system.proxy ignore-hosts ['localhost', '127.0.0.0/8']
org.gnome.system.proxy mode 'manual'
org.gnome.system.proxy use-same-proxy false
org.gnome.system.proxy.ftp host 'proxy.iiit.ac.in'
org.gnome.system.proxy.ftp port 8080
org.gnome.system.proxy.http authentication-password ''
org.gnome.system.proxy.http authentication-user ''
org.gnome.system.proxy.http enabled false
org.gnome.system.proxy.http host 'proxy.iiit.ac.in'
org.gnome.system.proxy.http port 8080
org.gnome.system.proxy.http use-authentication false
org.gnome.system.proxy.https host 'proxy.iiit.ac.in'
org.gnome.system.proxy.https port 8080
org.gnome.system.proxy.socks host ''
org.gnome.system.proxy.socks port 0


KDE Applications

KDE applications use kioslaverc data configured using kwriteconf.

[Proxy Settings]
NoProxyFor=
Proxy Config Script=
ProxyType=1
ReversedException=false
ftpProxy=proxy.iiit.ac.in 8080
httpProxy=proxy.iiit.ac.in 8080
httpsProxy=proxy.iiit.ac.in 8080
socksProxy=proxy.iiit.ac.in 8080


Console Applications

$PROTOCOL_PROXY variables are sourced from /etc/profile.d/ scripts.
These variables have to be set:
ALL_PROXY HTTP_PROXY HTTPS_PROXY FTP_PROXY SOCKS_PROXY NO_PROXY
all_proxy http_proxy https_proxy ftp_proxy socks_proxy no_proxy

Building NetworkManager on Fedora

Codebase: files to change

Adding NMSettingProxy

Currently doing.