Firefox and Switchproxy: An Easy Way to Use Tor
Introduction
As demonstrated by this manual, the Mozilla Firefox browser can easily be configured to use the Tor network. Most of the time you will not need to change your proxy settings, however, there are some Web applications (notably online forums) that do not work well with Tor. The reason for this is that since Tor connections frequently change paths, a web server's cookies do not persist; thus you may frequently find yourself having to log on to the same site again and again. Of course, one can avoid this problem by going back in Firefox's Options menu and setting the connection back to "Direct" every time you experience issues. However, this is definately a pain in the butt, and can luckily be avoided with the help of browser "extensions".
Prerequisites
Extensions are essentially small plug-ins or add-ons for your browser that enable it to do something it would not be able to do as-is. Think of them as mini "sub programs" that you can build into your main browser program. Before you begin the steps below, please download and install Switchproxy. After installation, you will need to restart Firefox for the new plugin(s) to appear.
Setting Up SwitchProxy
In it's default configuration, Switchproxy will appear as a thin toolbar beneith your Links Menu and address bar. Some people like it, but I find it rather redundant and screen hogging. If you want to remove this, click Options --> Preferences and uncheck the "Show Toolbar" option on that menu. After clicking "OK", the toolbar will be gone, and you can access Switchproxy by using the right-click menu from anywhere on a page.
Now let's discover how to add a proxy server (Tor via Privoxy). To do this, go to right click menu --> Switchproxy --> Manage Proxies. The appearing menu is blank, but will soon display any and all servers you set up Firefox to work with. Click "Add", then select "Standard" as your configuration type. "Anonymous" can be used to create a proxy "chain", but Tor itself does the same thing, and MUCH more securely! Clicking "Next" will give you a menu very similar to the standard proxy configuration menu in Options. Fill in "localhost" or 127.0.0.1 for the hostname of all protocols, then specify Privoxy's port (8118 by default) in the rightmost column. Click "OK" and you'll now see your proxy in the "Manage Proxies" list (I just named mine 'Tor').
Using The Extension
After Tor is correctly set up with Switchproxy, you can now easily switch between using the Tor client and going direct by clicking on the desired title in right click menu --> Switchproxy --> Proxies. Eureka! Now you won't have to go through the whole song and dance of reconfiguring your connection every time you want to enable or disable Tor in your browser.
Further Reading
Switchproxy can also be used in conjunction with a PAC, or browser automatic configuration file. Like Privoxy, a Javascript based PAC file is useful for blocking annoying ads and potentially intrusive "web bugs" and cookies. The advantage of using this is that there is no second program needed in conjunction with Tor, assuming that you're using a browser that correctly supports SOCKS 4a or SOCKS 5 (avoids DNS lookup give-aways). If you cannot use an application that does SOCKS right, I recommend staying with Privoxy, as it is SOCKS 4a compliant.
Please see the documentation (PACfile) for detailed information on how to utilize the PACfile option. It is especially efficient for users who proxy through Squid to remove certain HTTP headers before sending data out to the Web via Tor. Please note, however, that if you don't know what this refers to, you should probably stick with something like Privoxy or Socat :).