FoxyProxy for Firefox FAQ

General

What is FoxyProxy?

FoxyProxy is a Firefox extension which automatically switches an internet connection across one or more proxy servers based on URL patterns. Put simply, FoxyProxy automates the manual process of editing Firefox's Connection Settings dialog. Proxy server switching occurs based on the loading URL and the switching rules you define.

Here is a list of free proxy servers. We have some tutorials on configuring
these here. Free proxy servers are slow and unreliable (try them, you'll see what I mean). So we sell fast & reliable servers here. They are quite inexpensive and have no bandwidth caps.

No. FoxyProxy will not fail over to another proxy. Instead, the URL(s) simply won't load. The only exception to this rule are proxies which use automatic proxy configuration (PAC) files that specify proxy failovers.

Many web pages are composed of images, javascript files, and CSS files from different URLs. How does FoxyProxy handle this?

All of the component parts of a webpage are routed through FoxyProxy and subjected to its rules engine. If part of a webpage doesn't match any patterns, it is loaded through whichever proxy server (or none) is defined for the "Default" proxy. Read this for more information. Some people consider this a "privacy leak". Please read the thread entitled, "Firefox through Tor" for more information. However, please note that you define a nonsense IP/port for the "Default" proxy (e.g., localhost:64111); then unmatched patterns simply fail to load.

What is foxyproxy.xml and where is it stored?

foxyproxy.xml is the file in which FoxyProxy stores all of the settings you define. By default, it is located in the Firefox Profile directory, but you can direct FoxyProxy to use any directory and filename you like by changing the Settings Storage Location in the Global Settings Tab.

DNS prefetching is a feature of Firefox which increases page-load performance. You can read about it
here. FoxyProxy disables DNS prefetching under certain
conditions. It does this because DNS prefetching does not respect proxy rules. In other words, if DNS pretching is enabled but
you want DNS lookups to occur through a proxy server, you're out-of-luck. As of FoxyProxy 2.21, DNS prefetching is disabled
if:

1. FoxyProxy is not disabled

AND

2a. FoxyProxy is set to "Use Proxy XXXX for All URLs". Proxy XXXX has the checkbox (on the "General" tab) "Perform remote DNS lookups on hostnames loading through this proxy" checked

OR

2b. FoxyProxy is set to "Use proxies based on the pre-defined patterns and priorities". One or more of the ENABLED proxies have the checkbox (on the "General" tab) "Perform remote DNS lookups on hostnames loading through this proxy" checked. An enabled proxy is one whose "Enabled" checkbox is checked (this checkbox is also on the General tab)

The FoxyProxy source code is released under the GPL license. The FoxyProxy name, logo, graphics, art work, website, styles, and documentation are proprietary works and are NOT open-source.

How do I uninstall FoxyProxy?

FoxyProxy can be uninstalled just like any other Firefox extension. Here are instructions.
If you want to uninstall the Tor/Vidalia/Privoxy software bundle, please refer to the
Tor website for instructions.

The FoxyProxy Rules Engine: Whitelists, Blacklists, and Patterns

What are patterns?

FoxyProxy patterns are rules that define a group of URLs. These rules
are expressed with wildcards and regular expressions.
For example, http://*.yahoo.com/* is wildcard pattern that defines all HTTP (but not HTTPS) URLs that are subdomains of .yahoo.com.
The FoxyProxy rules engine uses the patterns you define to determine which URLs should be loaded through proxies and which should be
loaded through a direct internet connection.

FoxyProxy only respects patterns when it is set to "Use proxies based on their pre-defined patterns and priorities". When
set to any other mode, such as "Use proxy ABC for all URLs", all patterns -- black and white -- are ignored. The solution to this problem
often is to change FoxyProxy to "Use proxies based on their pre-defined patterns and priorities".

FoxyProxy is set to "Use proxies based on their pre-defined patterns and priorities" but it still ignores my blacklists. Why?

You're probably not using the right pattern syntax. Patterns such as localhost or 127.0.0.1, used in Firefox's Connection Settings, are invalid when used with FoxyProxy. All wildcard patterns should terminate with /*. For example, if you are trying to prevent all localhost URLS from using a proxy, use these blacklist wildcard patterns: *localhost/**127.0.0.1/*. Please read this and the pattern tutorial
for further information. This behavior will likely change in a future release because it has been the source of much confusion for new FoxyProxy users,
often leading them to claim that blacklists don't work.

What is the Default proxy?

The Default Proxy defines the settings used to load any resource or web page that doesn't match a whitelisted pattern. In other words, the Default Proxy is a catchall. When first installed, FoxyProxy automatically configures the Default Proxy so that pages load through your direct internet connection (i.e., it's not using a proxy at all). However, you can change this setting to use any proxy server or PAC file you like, just like any other proxy settings in FoxyProxy.

What happens if more than one pattern matches a URL?

If two or more patterns for different proxies match a URL, the proxy which is ordered higher (from top to bottom) is used to load that URL. This is what is meant by "priorities" in FoxyProxy. You can reorder proxy priorities with the Move buttons. The Default Proxy always matches all URLs and cannot be moved. In this sense, the Default Proxy is a catchall.

There are many flavors of regular expression syntax (grep, egrep, awk, sed, vim, perl, pure posix, etc). Which one should I use for FoxyProxy?

FoxyProxy adheres to the JavaScript 1.5 regular expression syntax. When in doubt, refer to this guide. Do not surround regular expressions with forward slashes like this: /abc/

What happens if a URL matches both a whitelist pattern and blacklist pattern for the same proxy?

Blacklist patterns have priority over whitelist patterns. In this scenario, the URL is not loaded through the proxy.
It is compared with the patterns of other proxies further down the list, including the Default, until a matching pattern
is found. Note the Default proxy matches all URLs (i.e., it uses the whitelist wildcard pattern *)

How can I match all URLs?

Use this wildcard pattern: *

How can I match URLs by protocol?

Use wildcard patterns of this style: http://*, ftp://*, feed://*, etc.

How can I match files by extension?

Use this regular expression pattern .*\.(?:bz2|gz|rar|zip|tgz|bundle|deb|pdf|run)$ (The $ ensures that no other characters follow the extension)

Can you summarize how FoxyProxy matching works?

If FoxyProxy is set to Use Proxies based on their pre-defined patterns and priorities, FoxyProxy matching working this way:

FoxyProxy attempts to match each URL against the whitelist patterns for each proxy in descending order from top to bottom.

A URL matches a whitelist pattern for a proxy IF AND ONLY IF there isn't a blacklist pattern for that same proxy which does not also match the URL. In other words, if a whitelist and blacklist pattern both match a URL, the blacklist "wins" and the URL is not regarded as matched.

URLs that don't match any whitelist pattern are loaded by the Default proxy settings. The Default proxy settings may or may not be configured to use your direct internet connection; this is up to you.

If FoxyProxy is set to Use proxy "xyz" for all URLs, FoxyProxy matching working this way:

All URLS are loaded through proxy "xyz" regardless of blacklists or whitelists.

Other modes of operation are coming soon (e.g., Random and Round-Robin)

Why doesn't my whitelist/blacklist pattern match a URL?

Ensure that your pattern matches the entire URL. For example, if you want to match http://google.com/, you can't write the regular expression ^https?://google\.com. You must write ^https?://google\.com.*.

Do I have to specify every subdomain of a website in my list of patterns? I want http://google.com/*, http://news.google.com/*, and http://images.google.com/* to load through a proxy. Must I write a pattern for each?

No. You can use the whitelist regular expression pattern http://.*\.?google\.com/.*. If you want all protocols to load through the proxy -- not just http, then use the regular expression pattern .*://.*\.?google\.com/.* or (.*\.)*google\.com/.*. You can substitute other domains for google.com.

How can I prevent proxy use on my intranet (local network) and on my local computer (127.0.0.1)?

Look for the checkbox "Do not use this proxy for internal IP addresses" in the Proxy Settings window, URL Patterns tab.

PAC files

What is a proxy auto-configuration (PAC) and where can I read more about them?

A PAC is a text file containing a small piece of logic which determines how URLs are loaded by the browser. It is comprised of a single javascript function FindProxyForURL(url, host) that you implement. This function returns a string with one or more proxy specifications: multiple specifications provide a fallback when a proxy fails to respond. An example of a PAC file is:

Proxy auto-configuration files are described in complete detail here, here, and here.

When does FoxyProxy use my PAC file?

When you configure a proxy in FoxyProxy and select "Automatic proxy configuration URL" on the "Proxy Details" page, you're specifying that FoxyProxy use a PAC for any patterns associated with this proxy configuration. In other words, for each URL that matches a URL pattern defined by a proxy configuration specified to use a PAC, FoxyProxy calls that PAC's FindProxyForURL() implementation. The return value of FindProxyForURL() determines which proxy (if any) is used.

Privacy

How does FoxyProxy secure my privacy?

FoxyProxy does not inherently secure your privacy or anonymize you. FoxyProxy does not change/mask/hide your IP address.
Privacy and anonymity are dependent upon a number of factors, including but not limited to the proxies you use. Please be careful using FoxyProxy if you are expecting complete anonymity because some have argued that FoxyProxy -- when used in patterns mode (identified by the orange FoxyProxy icon and the Use proxies based on their pre-defined patterns and priorities text) -- can actually make you more susceptible to privacy breaches.

The crux of the issue is this. Most web pages are comprised of resources from multiple domains. When FoxyProxy is used in patterns mode, unless you define whitelist patterns which match all resources on a page, then some of those resources won't load through proxies. The easiest way around this issue is to change FoxyProxy's mode from patterns to dedicated. In dedicated mode (identified by the blue FoxyProxy icon and the Use proxy "xyz" for all URLs text), FoxyProxy ignore all patterns, loading all resources through a single proxy... just like SwitchProxy, TorButton, and most other Firefox proxy extensions. For another solution that permits you to continue using patterns with FoxyProxy, read on.

Let's demonstrate the issue with an example. This page includes an image from the domain img217.imageshack.us and also an image from getfoxyproxy.org. Let's say you visit the page with FoxyProxy in patterns mode and have defined the single whitelisted, wildcard pattern http://getfoxyproxy.org/* associated with a proxy named Behemoth. The image on the top of the page, hosted on getfoxyproxy.org, will load through Behemoth, but the other image, hosted at img217.imageshack.us, won't load through any proxy. It will load through your direct internet connection (assuming the Default Proxy is configured to use your direct internet connection). If you have any cookies for imageshack.us, those will be sent by your browser to imagshack.us. I hope you can see the issue more clearly now.

Patterns mode is one of FoxyProxy's greatest strengths and is what sets FoxyProxy apart from most other Firefox proxy extensions. However, it can also be its greatest weakness if not used appropriately. If you are using a proxy for complete privacy and anonymity, there are two recommended ways to use FoxyProxy so this privacy and anonymity is maintained:

Forego patterns and use FoxyProxy in dedicated (non-patterns) mode; i.e., "Use Proxy XXX for all URLs". This is indicated by the blue FoxyProxy icon in the statusbar and toolbar.

Use FoxyProxy in patterns mode but change the settings for the Default Proxy from using your direct internet connection to a bogus (i.e., non-existent) proxy such as localhost:55555. When a URL is reached which doesn't match a whitelisted pattern, the URL will attempt load through this non-existent proxy. The attempt will time out and fail. In this way, you can still leverage patterns but not compromise privacy and anonymity.

Do not use add-ons like Google Toolbar that interfere with remote DNS lookups.

Tor

What is the relationship between FoxyProxy and Tor?

There is a common misunderstanding that Tor is required to use FoxyProxy. This is not true. FoxyProxy has nothing to do with Tor. FoxyProxy is not Tor. FoxyProxy does not require Tor (this list has FoxyProxy's requirements). If used with Tor, FoxyProxy efficiently loads only the URLs you define through the slow Tor network. All other URLs load through your direct internet connection or other proxies, as you define. The benefit of using FoxyProxy with Tor is simply that you can use your fast internet connection to load normal URLs and the Tor network to load sensitive URLs without constantly changing Firefox proxy settings.

Run the Tor Wizard (File->Tor Wizard) and answer the questions appropriately.

If Firefox complains that it can't load pages (connection has timed out or similar error), then the Tor network is down or responding too slowly.
This is not a FoxyProxy bug or FoxyProxy error. Please file your complaints with the Tor community.

Miscellaneous

Yes. FoxyProxy correctly proxies Flash-, Shockwave-, and Java-initiated connections. They are routed through proxies in the same way any other connection/request is routed. Moreoever, these connections/requests are visible in the FoxyProxy Logging Tab if logging is enabled. Please note that some of these plugins may choose to ignore proxy settings and connect directly to the internet. There is no way for FoxyProxy to prevent them from doing this. The only way to make sure all the traffic is going through the proxy is to use FoxyProxy VPN Service.

I don't want FoxyProxy's icon to change back to the default after page finishes loading in Use proxies based on their pre-defined patterns and priorities.

You can disable resetting of icon colors after URLs finish loading with a "hidden preferenence" (i.e., no GUI currently). Open foxyproxy.xml and look for resetIconColors="true". Change true to false, and restart Firefox. This enables you to easily see which proxy was last used (instead of having to use the FoxyProxy Logging tab).
To undo the change, change it back to true and restart Firefox.

Video and Audio sites

Many video sites permit their videos to be viewed only from certain countries. A common way to avoid such restrictions is to find a proxy server in the appropriate country and use FoxyProxy to load the video through that proxy server.

In order to proxify video content without any lags and delays, the proxy you are using should be capable of high bandwidth. To obtain such a proxy in the US, UK, EU, Canada, or any other country, please see this link.

Known Issues

These errors almost always means FoxyProxy cannot find the file where your personal settings are saved, foxyproxy.xml. Most likely you moved or renamed your Firefox profile. FoxyProxy is looking for foxyproxy.xml in the old path, but it either no longer exists or is write-protected. You can manually change the path where FoxyProxy looks for foxyproxy.xml by opening Firefox, going to about:config, entering extensions.foxyproxy.settings in the filter box, and changing the value to a new path that exists; for example: file:///C:/foxyproxy.xml on windows or file://usr/local/home/foxyproxy.xml on linux/mac/unix. Restart Firefox and you should no longer see the error. If foxyproxy.xml is in the Firefox profile, you can tell FoxyProxy to look for it there by using the special value " " (a single space without the quotes). In this case, FoxyProxy won't use any absolute paths to get foxyproxy.xml.

Future versions of FoxyProxy won't store the absolute path to foxyproxy.xml in preferences to avoid this problem.

You must edit the profile's preferences. In Firefox, type about:config in the address bar. Enter extensions.foxyproxy.settings as a filter. If the preference doesn't exist, create it as a new string (open the context menu (right-click) on any existing preference, go to the New menu, and select String). Enter extensions.foxyproxy.settings for the preference name. For the value of the string, enter the location of foxyproxy.xml in the form: file:///c:/path/to/file/foxyproxy.xml. For example: file:///C:/Documents%20and%20Settings/
EricJung/Application%20Data/Mozilla/Firefox/Profiles/
r0yrkjob.prod/foxyproxy.xml. Note that the path must be URL-encoded (e.g., space becoems %20). You can use this URL encoding calculator to easily URL encode a path. If foxyproxy.xml is in the Firefox profile, you can tell FoxyProxy to look for it there by using the special value " " (a single space without the quotes). In this case, FoxyProxy won't use any absolute paths to get foxyproxy.xml.

If you are using Portable Firefox, the value of extensions.foxyproxy.settingsshould be a single space (" "). This tells FoxyProxy to look for foxyproxy.xml in the profile directory of the current drive. This is important because the drive letter of a USB drive can change.

Why does FoxyProxy sometimes use the wrong SOCKS proxy for 15 seconds?

When using multiple SOCKS proxy servers, Firefox "remembers" the last SOCKS proxy used for a particular domain for roughly 15 seconds. For example,
suppose you configure FoxyProxy rules such that http://foo.com/a.gif loads through SOCKS proxy #1 and http://foo.com/b.gif loads through proxy #2. Now you visit http://foo.com/a.gif, forcing the resource to load through SOCKS proxy #1. A moment later you visit http://foo.com/b.gif. Unfortunately, Firefox will load http://foo.com/b.gif through SOCKS proxy #1 instead of #2. Note that this only occurs when the domains are the same (foo.com in this case). Waiting approximately 15 seconds makes Firefox "forget" the last SOCKS proxy used for that domain.

This is a Firefox issue and has nothing to do with FoxyProxy. If you uninstall FoxyProxy, Firefox will exhibit the same behavior natively. FoxyProxy does, however, report on its logging tab that the correct proxies were used to load the resources, slightly confusing the issue.

Possible workarounds:

For each remote SOCKS proxy, run a local SOCKS or HTTP proxy on localhost that is configured to chain to the remote SOCKS proxy (instances of SocksChain or ProxyChains, for example). Point FoxyProxy to the local proxies, not the remotes. Have the local proxies drop their remote (chained) connections after every request/response. Hopefully, Firefox will be cognizant of the dropped connection and no longer remember it. This idea has not been tested.

Use a single SOCKS proxy. If other proxies are required, they should be HTTP proxies.

Wait 15 seconds before loading resources on the same domain that would normally load through different proxies.

Work on a Firefox patch to resolve this.

This issue has been confirmed on Mac OS X 10.4.11 and Windows XP SP2 with both Firefox 2.0.0.11 and 3.0b2. It was discussed here.

I can't talk to my HTTP proxy over port 80.

Transparent proxies (i.e., proxies on port 80) aren't well-supported. Use any other port besides 80. This problem was discussed here.

Double-clicking a local HTML file on Windows displays the message "Windows can not find the file. Please check the file name and try again."

This problem only seems to occur on non-English installations. The solution is here.

Many FoxyProxy buttons don't have icons on my linux installation. But on Windows and OS/X, I see button icons.

Screenshot of the problem. Button icons are hidden depending on the corresponding GTK setting. To change the GTK setting: gconf-editor and /desktop/gnome/interface/buttons_have_icons. This topic is discussed here. Thanks to Georg Koppen for this answer.

Hidden Settings

I don't want FoxyProxy's icon to change back to the default after page finishes loading in Use proxies based on their pre-defined patterns and priorities.

You can disable resetting of icon colors after URLs finish loading with a "hidden preferenence" (i.e., no GUI currently). Open foxyproxy.xml and look for resetIconColors="true". Change true to false, and restart Firefox. This enables you to easily see which proxy was last used (instead of having to use the FoxyProxy Logging tab). To undo the change, change it back to true and restart Firefox.