Add the network name, like "EED-II' and the proxy associated with it , say "172.16.24.2" into the "proxy.dbase" file , so when the script is run, and your computer is connected to any given network already specified in the proxy.dbase file then system proxy is set accordingly.
in the /etc/environment file all the proxy settings are written automatically
Since several distros like Kubuntu, Xubuntu, Linux Mint, etc do not respect system proxy for "apt" utility, settings are also made for them in a /etc/apt/apt.conf file
Instead of matching the name, we will ping all the proxies simultaneously. The proxy which will give the best response is automatically set to be the system proxy.
This script will automatically be triggered when a connection is made (either wireless or wired)
The second feature which we were thinking was to sniff the tor browser port and if the connnection is made we will be continuously sending some packets through it, so that the connection is maintained.