Windows
- 下載并安裝 Tor & Privoxy
http://www.vidalia-project.net/dist/vidalia-bundle-0.1.1.21-0.0.5.exe
安裝完之后,在localhost:8118有http代理(privoxy提供),localhost:9050有socks5代理(tor提供)
如果這時候可以配置Firefox使用8118和9050這兩個端口,那就所有的Internet訪問都將通過tor訪問,會很慢。所以這種方式不推薦,要自己編輯一下代理配置腳本 - 編輯proxy.pac
可以在某個地方創建代理配置腳本, 比如說c:\proxy.pac, 下面是我用的內容, 可以上一些比較常用的網站, 比如wikipedia和google網頁快照. 如果查詢google也經常有問題, 可以把第一條 nosite.google.com 改成 .google.com 記得google.com前面有個點, 這樣所有訪問google的請求都會通過代理,不過做好心理準備,會很慢function FindProxyForURL(url, host)
{
url = url.toLowerCase();
host = host.toLowerCase();
if(dnsDomainIs(host,"nosite.google.com")) return "PROXY localhost:8118";
else if(dnsDomainIs(host,".blogspot.com")) return "PROXY localhost:8118";
else if(dnsDomainIs(host,".wordpress.com")) return "PROXY localhost:8118";
else if(dnsDomainIs(host,"wikipedia.org")) return "PROXY localhost:8118";
else if(shExpMatch(url,"*q=cache:*")) return "PROXY localhost:8118";
else return "DIRECT";
} - 配置IE使用代理配置腳本
上面那個Firefox配置界面中,選擇Aotumatic proxy configuration URL, 填入file://c:/proxy.pac
IE的配置類似.每次重新修改proxy.pac,都應該到上面的界面Reload代理配置腳本(比較討厭,好在這個文件修改次數不會很多)
Debian Linux
這里主要講Debian下的安裝配置,其他版本的Linux可以參考tor的官方說明
- 安裝 tor privoxy
apt-get install tor privoxy
Debian下面的privoxy需要額外的配置,因為privoxy需要使用tor提供的9050 socks5端口.具體是配置/etc/privoxy/config,加一行
forward-socks4a / localhost:9050 .
不要漏掉最后的點.然后重起一下privoxy
/etc/init.d/tor restart
參考
http://www.linuxsir.org/bbs/showthread.php?t=232436
http://tor.eff.org/docs/tor-doc-win32.html.en