Showing posts with label GFW. Show all posts
Showing posts with label GFW. Show all posts

Saturday, August 25, 2007

使用自动配置代理脚本来跨越GFW

今天偶得一个很实用的pac文件,原帖见这里。详细的pac编写方法见这里。另外还有个有用的firefox插件torbutton。

pac的原理是,浏览器在加载一个页面前首先执行这个文件里的
function FindProxyForURL(url, host)
是用javascript的语法编写的,它返回一个代理服务器地址或直接连接。

因此只要先判断:
如果是访问带有".blogspot.com"字串的地址,即访问blogger,则使用blogger的备用代理服务器地址。否则,判断是否某些被gfwed的网址,是则使用tor的代理服务器,最后,直接链接。


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下会经常显示错误
}

Thursday, August 16, 2007

几种绕过GFW访问blogspot的方法

伟大的GFW使得我们无法访问位于blogger/blogspot上的优秀博客,但是人民群众的力量是不容小觑的。这里汇总一下自己现在知道的几种方法,以使得大家能顺利访问。


1.简单的方法:使用rss阅读器(在google reader上测试通过)
原理是,google reader读取我的feed再转发给浏览器,这样就利用google reader作为跳板绕过了GFW。事实上这个方法很方便,毕竟rss阅读器本身就可以做到信息汇集,其他提供feed的网站也可以如法炮制,那么就可以很方便地在google reader中看到被GFW的一堆网站了,其他阅读器按道理也应该能做到。

关于什么是rss,什么是feed,什么是rss阅读器,请参考wikipedia/百度百科或网上相关资料。

2.使用hosts列表
对于Linux等采用FHS(Filesytem Hierarchy Standard)的系统,修改/etc/hosts
对于Windows,修改%WINDIR%\system32\drivers\etc\hosts
其中%WINDIR%指windows安装目录,默认是安装在C:\Windows.

在文件最后面添加如下内容:
72.14.219.190 iveney.blogspot.com
保存后重新启动浏览器进行浏览。

其他blogspot的浏览器也可以依法炮制。

关于这个方法,是由ggpi发起的,可以到这里下载大家一起编辑的hosts列表,把里面的内容粘贴到自己的hosts文件中,就可以方便地访问到在这里“注册”了的blogspot玩家了。
当然,以上的办法都是不得已而折衷的办法。衷心希望有一天这堵墙会踏掉。

3.使用破网软件(不针对blogspot,适用于浏览被GFW网站)
关键字 torpark 火*凤*凰 无#界#浏#览 自@由@门
vIdalia(tor)
由于害怕被baidu等搜索引擎删除索引,所以以上加了点简单处理。推荐使用第一个,挺好用的。使用了tor技术与firefox浏览器打包,暂时不能被GFW完全封杀。
愤青们应该比较喜欢这种方法,可以上外国一些网站看反动言论,呵呵。