I live in an institute where two proxies work. Lets say they are proxy A and proxy B. A works well for almost all websites, however my institution has blocked many of the essential sites in B using a very poor filtering mechanism. The problem is that A is live for only select periods of time (which is unpredictable), however B remains live 99% of the time. Hence, I use tor-browser for that proxy, which provides me a tunnel to access all the banned websites. Now, every time A is down, I need to go to apt.conf in the etc/apt/ folder and configure the socks proxy of the tor browser there. This obviously takes up most of the time and reopening shell instances again and again is a headache. So, is there any way I could easily switch between proxies using a GUI / shell (and apply them system-wide)in a way similar to  that of proxyswitchy extension of chrome.
How to resolve issue of system proxy?
apt;proxy;tor