Use proxy only for some sites

User Help for Mozilla Firefox
Post Reply

Use proxy only for some sites

Post by Guest »

I'm residing in a country where some sites are blocked. I'm using privoxy (a proxy server) and TOR (an anonymizer) to bypass the blocking.

The combination of privoxy and TOR is slower than a direct internet connection, so I'd prefer to use the proxy only for sites which are blocked.

Is there anyway to configure firefox so that it uses the proxy only for selected sites? Firefox allows me to specify sites for which the proxy is not required, but doesn't seem to allow the reverse i.e. to use the proxy only for certain sites.

JR Majen

Post by JR Majen »

I'm currently working on an extension that "masks" users IP address for Mozilla, Firefox and Netscape. It can be toggled on and off, the option for certain websites . and you make your own IP string... It's working good right, I'll release it when Firefox 1.1 but it will be compatable on 1.0-1.1 of firefox, 8.0-8.+ on netscaoe and on mozilla 1.+

It's called IP Mask. testing available at http://www.angelfire/ace2/puncho/ip_mask.html
Posts: 55
Joined: November 7th, 2004, 8:18 pm

Post by scissor »

You need a PAC (Proxy Auto Configugation) file. It's a file containing JavaScript that can adjust the proxy used for individual URLs.

Basically, in your case, you want to create a simple text file that looks just like this:

Code: Select all

function FindProxyForURL(url, host) {
  host = host.toLowerCase();
  if (dnsDomainIs(host, "") ||
      dnsDomainIs(host, ""))
    return "PROXY"; // (IP:port)

  return "DIRECT";
I assume you're able to adjust it as necessary. Save it to your local hard disk.

Anonymous wrote:Firefox allows me to specify sites for which the proxy is not required
At the bottom of the Options Dialog you're thinking of, activate Automatic proxy configuration and type in the file://etc. URL to that text file you just created.

See PAC file user guide and PAC file format for more info.
Post Reply