Normally Web browsers such as Firefox take their proxy settings from the system through the
http_proxy environment variable but this can be changed from the menu:
"Edit" > "Preferences"
If from a terminal you enter
firefox -ProfileManager you can create a separate profile for each of the proxies you want to use.
You can then open firefox with a specific profile with
firefox -P "profile1"
replacing profile1 with the profile for the proxy server you want.
That said the better way to do this is to use the http_proxy variable.
See here for more information on http_proxy