星期三, 十一月 15, 2006

tor + privoxy

1. Linux(Fedora Core 6):
tor 依赖于 libevent
# rpm -Uvh /mnt/iso/Fedora/RPMS/libevent-devel-1.1a-3.2.1
安装 tor
# userpack install -f tor-0.1.1.25.tar.gz
crablfs> cmd tar xfz tor-0.1.1.25.tar.gz
crablfs> cmd cd tor-0.1.1.25
crablfs> cmd ./configure
crablfs> cmd make
crablfs> cmd make install
crablfs> cmd cd ..
crablfs> cmd rm -rf tor-0.1.1.25
crablfs> cmt
privoxy 在 tor 之上运行
# userpack install -f privoxy-3.0.3-stable-src.tar.gz privoxy-3.0.3
crablfs> cmd tar xfz privoxy-3.0.3-stable-src.tar.gz
crablfs> cmd cd privoxy-3.0.3-stable
crablfs> cmd autoheader
crablfs> cmd autoconf
crablfs> cmd ./configure
crablfs> cmd make
crablfs> cmd make install
crablfs> cmd cd ..
crablfs> cmd rm -rf privoxy-3.0.3-stable
crablfs> cmt

然后运行 tor + privoxy
# tor &
# cd /usr/local/etc/privoxy
# vi config
forward-socks4a / 127.0.0.1:9050 .
// 增加这一行
# privoxy

对 firefox,安装 torbutton 扩展即可,这样在右下角的状态栏会出现一个 toggle button 以开闭 tor,设置其使用 privoxy。

也可以设置 torbutton 使用手工的设置,注意 tor 使用的是 SOCKS 代理,所以只需要在 SOCKS host 一栏设置 localhost:9050 即可。但这样可能存在安全问题,tor 的官方网站也建议使用 privoxy。

使用 torbutton 和手工直接填写代理是一个意思,打开 torbutton 之后,可以看到代理设置实际上发生了变化:
HTTP: localhost:8118
SSL: localhost:8118
SOCKS: localhost:9050

2. Windows:
在 tor 的官方网站上下载 vidalia bundle,它包含了 tor + privoxy,直接安装即可,以后只要启动 vidalia 和 privoxy 即可(默认设置为开机启动的),firefox 同理安装 torbutton 扩展。只是要注意 vidalia 和 privoxy 使用的端口要配合。

感觉上,tor + privoxy 比 torpark 还是要快一些的。

没有评论: