Using ProxyManager - Tahaan/proxymanager GitHub Wiki

This is the getting started quick with ProxyManager document.

ProxyManager is primarily used by means of the main command, but before it will do anything you need to choose which modules to be enabled. Refer to the list of standard modules for a reference.

ProxyManager uses modules to Control the Proxy settings in individual programs. Since everybody's needs are different, it is up to you to decide which modules to enable.

If you are a KDE or Gnome user you can start by enabling the module for your desktop environment, eg:

/usr/local/proxymanager/proxymanager-module enable kde

Users of Gnome and other similar GTK based desktop environments would substitute gnome for kde in the above command.

Note that the setup script will conveniently prompt you for which of the available modules to be enabled. Refer to the Configuration page and included docs/MANUAL document for details.

With at least a single enabled module you can now start using ProxyManager.

Controlling Proxy settings in individual Programs directly

This is the main function of ProxyManager - it saves you the effort when moving between networks or locations where a Proxy is needed or not needed. In many cases it also saves you from hainv to log off and back, or even from having to reboot to get "global config settings" to take effect. The problem with many mechanisms for global config settings, is that many intermediate subsystems only read the global config settings once. These intermediate subsystems will continue to supply the configuration settings they were given at startup, to child-processes. A typical example is a Shell process starting commands like wget, curl, google-earth, etc. After changing the shell configuration file, all existing shell processes needs to be re-started for the setting to take effect. By changing the configuration setting for specific individual programs (curl, wget, etc) directly, this problem is eliminated.

###Turning the Proxy setting On The command will invoke each enabled module to activate (turn on) the "Use Proxy" setting for each program

proxymanager on

###Turning the Proxy setting Off The opposite of turning the Use Proxy setting on, this will cause the programs to try to connect to the internet directly.

proxymanager off

###Checking the current state The check function will report on whether each program currently have its Use Proxy setting turn On or Off.

proxymanager check

##Accessing the ProxyManager command(s) There are essentially four ways of running the ProxyManager commands.

###Full Path Entering the full path is inconvenient as it requires more typing, but at least it always works. Assuming you installed ProxyManager in a directory named /usr/local/proxymanager/ the commands would look like this: /usr/local/proxymanager/proxymanager check

A variation on the above is to first make the installation directory the working directory, and then explicity run the command from the current working directory using the prefix ./ , eg:

cd /usr/local/proxymanager/

./proxymanager check

The advantage of this is when you want to run multiple ProxyManager commands, for subsequent commands you do not need to CD again - simply prefix each command with ./ to refer to the current directory.

###Using the search PATH This is a common method and works well enough. The existing search PATH is changed to add the ProxyManager installation directory. For every command executed that means the shell will also search in this directory and run the found commands from there. This "change" is commonly saved in your Shell Profile file, so it gets re-affected every time you log in. A guide on how to add a directory to your PATH can be found here (It works for non Ubuntu users too).

The disadvantage is that a search path can become cumbersome and forces the system to search for commands through directories stored on disk, eg it involves disk I/O for every command being run.

###Using aliases This is a very efficient method in that it eliminates searching though disk directories for. You can also make the aliases as short (or as long) as you want. I recommend this method and the setup script will display aliases that you may add to your shell profile file (eg your .bashrc file).

###Using Soft Links Strangely this is not a commonly employed method. Essentially you add soft links to a directory which is part of your existing search PATH. It therefore does not create (much) extra I/O and can be easily made available to many users, for example by adding the links to /usr/bin. You can give the links any name you want. The method to do this would be, the example below names the link pman in the /usr/bin directory:

ln -s /usr/local/proxymanager/proxymanager /usr/bin/pman

Note: You must be root to create files or links in a system directory, such as /usr/bin

Using the link is then done by entering the link file name, but the program arguments still must be supplied (unlike the case of the alias where each alias is pre-set to supply a specific argument)