读书人

批改hosts复活Google

发布时间: 2012-09-14 11:53:44 作者: rapoo

修改hosts复活Google

原来虽然Google退出中国大陆,但它在北京的服务器还是在继续使用的。通过修改hosts文件(位于C:\Windows\System32\drivers\etc\),将Google各项服务的域名指向北京的服务器IP上,Google的各项服务大部分都能正常使用了。

修改了hosts后,正常打开Google,使用Google的网页快照,Pisaca网络相册,Google+等在墙外的服务,提升Gmail访问速度,用Google搜索也不会时不时地挂掉了。我试着搜索上届,并打开了他的维基词条的Google缓存。畅通无阻的感觉就是爽!

首先需要Google北京服务器的IP,打开cmd,ping www.google.cn或者ping www.g.cn。会得到IP地址,大概是203.208.46.XXX。我试出了四个地址,分别是:

203.208.46.145
203.208.46.146
203.208.46.147
203.208.46.148
这几个地址都是可以用的,当然也可以ping出新的地址。

然后着手修改hosts文件,一般的格式是在末尾行添加新行,内容为IP地址+空格+域名。比如:203.208.46.147 plus.google.com,然后保存。hosts文件中没行的“#”号后面的内容代表注释,没有作用。在Win7下可能不能直接保存,我的做法是先把修改后的hosts保存在其它文件夹,把原来的hosts文件改名,然后再把修改后的hosts文件复制到C:\Windows\System32\drivers\etc\里面。

我在hosts文件的末尾添加了如下行:

?

##Google Service##Chrome 网上应用店203.208.46.146 chrome.google.com203.208.46.146 clients0.google.com203.208.46.146 clients1.google.com203.208.46.146 clients2.google.com203.208.46.146 clients3.google.com203.208.46.146 clients4.google.com203.208.46.146 www.googleusercontent.com             203.208.46.146 lh0.googleusercontent.com203.208.46.146 lh1.googleusercontent.com203.208.46.146 lh2.googleusercontent.com203.208.46.146 lh3.googleusercontent.com203.208.46.146 lh4.googleusercontent.com203.208.46.146 lh5.googleusercontent.com203.208.46.146 lh6.googleusercontent.com203.208.46.146 clients1.googleusercontent.com                     203.208.46.146 clients2.googleusercontent.com##网页快照203.208.46.146 webcache.googleusercontent.com##Google SSL203.208.46.146 encrypted.google.com203.208.46.146 encrypted.google.com.hk##Google Docs203.208.46.146 docs.google.com203.208.46.146 docs0.google.com203.208.46.146 docs1.google.com203.208.46.146 docs2.google.com203.208.46.146 docs3.google.com203.208.46.146 spreadsheets.google.com203.208.46.146 spreadsheets0.google.com203.208.46.146 spreadsheets1.google.com203.208.46.146 spreadsheets2.google.com203.208.46.146 spreadsheets3.google.com#Gmail 203.208.46.146 mail.google.com 203.208.46.146 chatenabled.mail.google.com        #Gmail中Gtalk聊天服务##Google 搜索203.208.46.146 www.google.com##Google preview203.208.46.146 www.googlepreview.com##Google 翻译203.208.46.146 translate.google.com203.208.46.146 translate.googleapis.com##Google 搜索建议(IE9)203.208.46.146 clients5.google.com##Google code203.208.46.146 code.google.com##Picasa 网络相册203.208.46.146 picasaweb.google.com203.208.46.146 lh0.ggpht.com 203.208.46.146 lh1.ggpht.com 203.208.46.146 lh2.ggpht.com 203.208.46.146 lh3.ggpht.com 203.208.46.146 lh4.ggpht.com 203.208.46.146 lh5.ggpht.com 203.208.46.146 lh6.ggpht.com 203.208.46.146 lh7.ggpht.com 203.208.46.146 lh8.ggpht.com 203.208.46.146 lh8.ggpht.com 203.208.46.146 lh9.ggpht.com203.208.46.146 lh6.google.com##Google 个人资料203.208.46.146 profiles.google.com203.208.46.146 browsersync.google.com##Google+203.208.46.146 talkgadget.google.com                                     ##Google+中的聊天服务203.208.46.146 ssl.gstatic.com203.208.46.146 images-pos-opensocial.googleusercontent.com203.208.46.146 images1-focus-opensocial.googleusercontent.com203.208.46.146 images2-focus-opensocial.googleusercontent.com203.208.46.146 images3-focus-opensocial.googleusercontent.com203.208.46.146 images4-focus-opensocial.googleusercontent.com203.208.46.146 images5-focus-opensocial.googleusercontent.com203.208.46.146 images6-focus-opensocial.googleusercontent.com203.208.46.146 plus.google.com##Download 下载203.208.46.146 dl.google.com203.208.46.146 dl-ssl.google.com##Groups203.208.46.146 groups.google.com##Google URL Shortener203.208.46.146 goo.gl##Google app engine203.208.46.146 appengine.google.com
?另,通过修改hosts文件还能屏蔽各视频网站的广告。修改以后看优酷土豆奇艺的网站的视频时,再也不用忍受广告了。做法就是将广告的域名指定到回环IP地址127.0.0.1上,这样播放器就无法读取广告了,然后就会跳过广告,直接播放内容了。

读书人网 >操作系统

热点推荐