Another vote for FoxyProxy but I'll suggest using the PAC feature if your setup is complex. I have two proxy servers to choose from, but which one to choose gets very tricky sometimes. In order to setup FoxyProxy to use the PAC, go to the Proxy Details tab and select Automatic Proxy Configuration URL and enter something like file:///home/me/.myproxy.pac. Here's an example of a PAC file:
function FindProxyForURL(url, host)
{
var DIRECT = "DIRECT";
var PROXY = "PROXY myproxy.company.com:80";
var LOCAL = "PROXY localhost:8118";
var rc = "";
// alert("My IP Address is: " + myIpAddress());
// special: DIRECT / localhost
if (dnsResolve(host) == "127.0.0.1") {
rc = DIRECT;
}
// special: DIRECT / plain name (no domain name (i.e. no dots)) (e.g. http://foobar)
// (must be local to where I'm at)
else if (isPlainHostName(host)) {
rc = DIRECT;
}
else {
// special: LOCAL / not at home & restricted hosts
if ((dnsDomainIs(host, "frank.home.com")) ||
(dnsDomainIs(host, "firewall.home.com")) ||
(dnsDomainIs(host, "backupserver.home.com"))) {
// determine if we're at home or not; home can resolve the laser printer
var AT_HOME = (isResolvable("myprinter.home.com") ? true : false);
if (! AT_HOME) {
rc = LOCAL;
}
else {
rc = DIRECT;
}
}
// general: DIRECT / not at work
else {
// determine if we're at work or not; work can resolve proxy server
var AT_WORK = (isResolvable("myproxy.company.com") ? true : false);
if (! AT_WORK) {
rc = DIRECT;
}
// ASSUMED: AT_WORK
// special: LOCAL / at work & broken work links
// (must use local proxy server to connect)
else if ((host == "download.company.com") ||
(host == "search.company.com") ||
(host == "www.company.com")) {
rc = LOCAL;
}
// general: DIRECT / at work & work intranet links
else if ((dnsDomainIs(host, ".company.com")) ||
(dnsDomainIs(host, ".companylocal.com")) ||
(dnsDomainIs(host, ".legacycompany.com"))) {
rc = DIRECT;
}
// general: DIRECT / at work & 192.168.*
else if (isInNet(host, "192.168.0.0", "255.255.0.0")) {
rc = DIRECT;
}
// default: go through LOCAL
else {
rc = LOCAL;
}
}
}
// alert("Proxy for {" + host + "} is: " + rc);
return rc;
}
Note that the above example is fairly inefficient as it will usually wind up with a DNS lookup on myproxy.company.com for every single HTTP connection; I hard-code AT_HOME and AT_WORK in the .pac file via an external program at boot time. But it's an example of how complicated you can make your PAC script, if you need to.
Not a tab-by-tab solution but firefox Add-on "MM3-ProxySwitch" gives you an icon to toggle between direct/proxy with a single click. The icon turns gray when proxying is off to visually let you know the current state. The config file is kind of cryptic but something as short as this does the above toggle "[Direct ] [Privoxy http=myrouterip:8118 ssl=myrouterip:8118 noProxy=localhost, 127.0.0.1 ]" – yoyoma2 – 2017-10-12T02:13:47.270
6The answers thus far seem rather lame. To my limited knowledge, foxyproxy(which everybody suggests) doesn't operate on a per tab basis. Of the three answers so far I haven't seen any state whether they answer the question of per tab , I suspect that they don't. Perhaps a route to a solution would be if you can run different profiles in different tabs, and each profile is configured for a different proxy. foxyproxy may be ok as an alternative if you can't get exactly what you want but it's not what your question asks for(unless it does do different tabs which it probably doesn't). – barlop – 2011-02-26T17:28:44.657