1

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.

2 Answers 2

1

We're just talking about manipulating the "HTTP_PROXY" environment variable, right? Depending on what GUI/OS you're using (you didn't mention), there are many ways to set an environment variable.

For example, in Ubuntu/gnome (and maybe others) you could make browser shortcuts for each setting of the variable, as described here under "Launching desktop application with an environment variable"

0

You can set aliases for the environmental variable.

alias p1="export http_proxy=http://proxy1.domain.local:3128"

alias p2="export http_proxy=http://proxy2.domain.local:3128"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .