Non exhaustive list of proxy settings for your regular linux distro

As you generally use very few app, you just switch proxy for the one you use ( commonly package manager such as apt-get/rpm, plus firefox)... So when you want to use another, for instance konqueror, you get trap most of the time in the wrong proxy. So, you keep using the old ones, wasting all the very spirit of having a fully Free Software distro such as Linux...

To make my point here is a short list of app that requires proxy settings:

  1. Skype,Lynx and many other uses the env
  2. KDE apps uses the KDE proxy settings
  3. 'apt-get' ( and most likely 'rpm' commands) has its own proxy settings
  4. Maven 1 and 2
  5. Firefox and Thunderbird use there own proxy settings.
  6. ... and so on, and so on,...

How it works

When you launch the app, it basicly does :
  • Finds and read it's own configuration file.
  • Applies what i call a 'forensics technics' to identify in which network your computer is ( What is my IP adress, Is this server accessible,...)
  • Once the network identified, it loads the network profile ( What are the proxy for this network ?)
  • To all specified app, it sets the proprer proxy.
  • Well... We're done here

Why Java for a script app ? ? ?

Many people, especially Linux fanatics may argue that this app is basicly a script and should have been in such language as Bash, or Perl, Python or Ruby. To those of you who enjoy a good all fashion debate on 'which is the best programming language ever', here is some food for you:
  1. Why Java ? I know Java, and Java deals very well with both XML files and Bean object. I wanted to have a Bean Model to base my app, because when i try to do it in bash i got quite stuck because of it. Morever, I know very well Java tools such as Ant,Maven,JUnit,Log4j,ect...
  2. Why not Bash ?Basicly, because i failed ! I found it quite difficult to store, parse and apply all the different network configurations,...
  3. Why not perl ? I don't know Perl, i dislike is weak Object model and I hate all his "magical features".
  4. Why not python or ruby ? Those are very great programming language, but i don't know theirs API very well. Someday i'll probably try to rewrite it Python or Ruby !

Which Java does it required ?

Java 5 of course :)