PortableTor

About

This document describes how to install Tor and Privoxy on a USB Flash Drive. This will allow anonymous browsing in a more public location.

I've prebuilt an installer which you can use to install specifically to flash drives, if you don't want to follow these instructions. If you'd like to follow the instructions anyway, more power to you!

Support

This has been proven to work on Windows XP and all versions of Windows Vista. If you should encounter a problem, I'll try to help. Post your information on http://sourceforge.net/projects/portabletor forum.

Installation Procedures

Lets get it Started: Installing

NOTE: My flash drive letter in this guide will be known as E:. You can install to your desktop, another location, etc. though. It really doesn't matter. When you're done, you'll be able to move the installation directory wherever you want.

Windows XP

Windows Vista

Editing the Config

Now we have to edit our configuration files to point to the right place.

Creating the Startup Launcher

We now need to create a batch file that will start our programs and load the custom configuration files.

start /min /b .\PortableTor\Privoxy\privoxy.exe ".\PortableTor\Privoxy\config.txt"
start /b .\PortableTor\Vidalia\vidalia.exe --datadir ".\PortableTor\Vidalia\"

Running the programs

Just doubleclick PortableTor.bat in E:\. Remember that the program expects the following layout:

E:\
 |-- PortableTor.bat (Main Launcher File)
 |
 |-- PortableTor
     |
     |-- Privoxy
     |    |-- config.txt (File)
     |
     |-- Tor
     |    |-- torrc (File)
     |    |
     |    |-- DataDirectory
     |    |
     |    |-- (Other Files)
     |
     |-- Vidalia
          |-- vidalia.conf (File)

Everything should be working fine now. Make sure you can get Portable Firefox on your flash drive, and configure it with the proxy addresses as outlined in the win32 documentation!

Setting up Browsing

Extra Things You Can Do

To start, you can parse down documentation to save space. A great thing to do is also use UPX packer on all executables and dll's in the package; makes everything so much smaller. You can make your launcher pretty by using Exescript to first make it into an .exe that doesn't show the DOS box (Silent Mode), then use ResHack to change the icon and UPX to pack it.

External links

Notes

Some libraries have their own proxies setup on their computers, and while they are on Windows XP, which is beneficial for your flash drive's detection in the system, you will not be able to get the computer to use the Tor proxy. The solution to this problem is to get a portable web browser on your flash drive. http://portableapps.com has PortableFirefox, which should do the job just fine! --Silivrenion

Section 2) (its easier than it looks)

I. Setting up tor only

            for %%x in (%0) do set BatchPath=%%~dpsx
            cd %BatchPath%
            echo %BatchPath%>currentpath.txt
            for /f "tokens=1 delims=:" %%i in (currentpath.txt) do set letter=%%i
            tor -f %letter%:\Applications\Tor_0.1.2.18a\torrc datadirectory %letter%:\Applications\Tor_0.1.2.18a\AppData
            cls
            exit

II. Setting up Vidalia to use portable tor

           DataDirectory=E:\\Applications\\Tor_0.1.2.18a\\AppData
           TorExecutable=E:\\Applications\\Tor_0.1.2.18a\\tor.exe
           Torrc=E:\\Applications\\Tor_0.1.2.18a\\torrc

           @echo off
           for %%x in (%0) do set BatchPath=%%~dpsx
           cd %BatchPath%
           echo %BatchPath%>currentpath.txt
           for /f "tokens=1 delims=:" %%i in (currentpath.txt) do set letter=%%i
           type conf_part1.txt>vidalia.conf
           echo DataDirectory=%letter%:\\Applications\\Tor_0.1.2.18a\\AppData>>vidalia.conf
           echo TorExecutable=%letter%:\\Applications\\Tor_0.1.2.18a\\tor.exe>>vidalia.conf
           echo Torrc=%letter%:\\Applications\\Tor_0.1.2.18a\\torrc>>vidalia.conf
           vidalia.exe -datadir "."
           cls
           exit

            CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

           @echo off
           for %%x in (%0) do set BatchPath=%%~dpsx
           cd %BatchPath%
           wscript.exe "%BatchPath%invisible.vbs" "%BatchPath%resetVidalia.bat"
           cls
           exit

ps. Someone mind formatting this for me?

noreply: TheOnionRouter/Portable Tor (last edited 2007-12-09 16:38:39 by cypherpunks)