2007年3月29日星期四

GFW、TOR、自动代理配置脚本

昨天 blogger 再获解封,但谁又知道下次什么时候撞墙呢?其实不仅仅 Google 的服务,还有 Technorati wikipedia.org等其他网站呢。Tor不失为一劳永逸的解决方案。

前几天曾经提起过上网要戴套(Tor),Tor 阻挡了 GFW 想要发现或影响你的通信目的地,但是某些程序如 Java、Flash、ActiveX、RealPlayer、Quicktime、Adobe 的 PDF插件依旧可以揭示你的真实ip地址。同时也使新的攻击成为可能:Tor 网络与通信目的地之间的数据不是加密数据, Tor 网络传输数据时你电脑上的 cookie 仍能用来确认你的身份,恶意的或配置错误的 Tor 出口节点会将错误的页面发送给你。

Tor不会自动地将数据发送程序,你还需要进行一些配置:

1、在选择安装 Tor & Privoxy & Vidalia bundle 情况下,一般需要将浏览器或者其他程序的代理服务器设置为 “127.0.0.1:8118”。

2、Firefox有个 Torbutton 扩展使用非常方便,在浏览被GFW屏蔽的网站时,点击 Torbutton 按纽即可。

3、结合自动代理配置脚本,还可以在浏览时自动选择Tor与否,实现被Gfwed页面用Tor网络,正常页面直接浏览。

Tor现在的稳定版本是0.1.1.26,可以在这里下载。
自动代理配置脚本文件下载 tor.pac

function FindProxyForURL(url,host)
{

// ==================================================
// Automatic proxy configuration Script Paradigm V0.1
//
// Author : zdpress
// Blog : Blog Behind GFW
// URL : http://behindgfw.blogspot.com
// Email : zdpress+blog at Gmail.com
// Thanks : super1 from zh.wikipedia.org
// Note : Under Firefox the URL should be like
// file:///C:/TOR.pac
// Under IE the URL should be like
// file://C:\TOR.pac
// ==================================================

url = url.toLowerCase();
host = host.toLowerCase();

if(dnsDomainIs(host, ".blogspot.com"))
return "PROXY 72.14.219.190:80";
//使用blogspot服务器后备IP
else if
(
//域名匹配.
dnsDomainIs(host,"lefkada.eecs.harvard.edu")
//通过http://lefkada.eecs.harvard.edu/cgi-bin/ipaddr.pl?tor=1检验是否已登陆Tor.
|| dnsDomainIs(host,"technorati.com")
|| dnsDomainIs(host,"wikipedia.org")
|| dnsDomainIs(host,"mediawiki.org")
|| dnsDomainIs(host,"wikimedia.org")
|| dnsDomainIs(host,"wiktionary.org")
|| dnsDomainIs(host,"wikibooks.org")
|| dnsDomainIs(host,"wikisource.org")
|| dnsDomainIs(host,"wikiquote.org")
|| dnsDomainIs(host,"wikinews.org")
|| dnsDomainIs(host,"wikimediafoundation.org")
|| dnsDomainIs(host,"voanews.com")
|| dnsDomainIs(host,"bbc.co.uk")
|| dnsDomainIs(host,"xys.org")
|| dnsDomainIs(host,"mindmeters.com")
|| dnsDomainIs(host,"gpass1.com")
|| dnsDomainIs(host,"pbwiki.com")
|| dnsDomainIs(host,"ice.citizenlab.org")
|| dnsDomainIs(host,"greatfirewallofchina.net")
|| dnsDomainIs(host,"civisec.org")
|| dnsDomainIs(host,"solog.org")
|| dnsDomainIs(host,"zuola.com")
|| dnsDomainIs(host,"im.tv")
//想增加网址在这里复制增加一行即可
|| shExpMatch(url, "http://*/search?q=cache*")
//匹配google网页快照
)
// return "PROXY 145.97.39.139:80;PROXY 125.241.38.130:8080;PROXY 127.0.0.1:8118";
// 注:IE支持代理列表,但FF不支持。为防止Tor滥用,有时因出口地址相同,
// 而不能编辑维基,所以有必要换用专用维基代理或者其他普通代理地址。
// 145.97.39.139:80为维基专用代理中一个,后者125.241.38.130:8080为普通代理。
// 维基专用代理: 145.97.39.156:80 145.97.39.142:80 145.97.39.140:80 145.97.39.135:80
// 145.97.39.132:80 145.97.39.138:80 145.97.39.133:80 145.97.39.139:80
// 145.97.39.134:80 145.97.39.136:80 145.97.39.131:80 145.97.39.137:80
return "PROXY 127.0.0.1:8118";
//使用tor+privoxy
else return "DIRECT";
//如缺少这句在IE下会经常显示错误
}

2 条评论:

匿名 说...

难道是你这篇文章使我的域名被和谐了吗?

behindGFW 说...

不明白说什么?!