|
Hey there! Thanks for dropping by Iceman's Iceworld! Take a look around and grab the RSS feed to stay updated. See you around!
|
引:本来看被强的网站都用hotspot shield的,不知为何连不上服务器了。baidu来google去,发现改hosts内容是王道,不过因为只读属性无法保存,苦寻半天终于找到一贴解决办法。用代理的tx看看也无妨~修改hosts的好处是一劳永逸,除非ip地址被封~
发此贴也为自己方便使用。用text文件编辑的方法仅针对如何在os系统下进行hosts编辑,而编辑的内容和在win下是一样的。文章转自weiphone,作者harrygg
标题:三种方法更改MAC OS X下的HOSTS文件
由于众所周知的原因,有很多的网站现在都被”功夫墙”封死了,比如twitter,facebook等等.
我们经常会看到将一下IP地址和网站名添加到系统的hosts文件里,win系统下基本上很多人都
知道了,不知道的google一下也知道了.MAC系统下面更改hosts文件就有些困难了,经过我的
摸索和搜索,总结了三种方法:
1.终端更改
这种好像是网路上说的最多的方法.
在应用程序里面打开终端(terminal),输入
sudo vi /etc/hosts
然后提示输入系统密码
hosts文件就自动打开了
接着输入 i
进入编辑模式
将添加的网站,ip拷贝进去
编辑完成之后,按esc,输入 : wq
这样就更改完成了.
2.HostsWidget修改
mac下有一个HostsWidget,可以用不通过[终端]工具操作,方便一些 .界面如下:
http://www.douban.com/photos/photo/304849609/
http://www.douban.com/photos/photo/304852474/
输入密码后即可添加,不能拷贝,要一个一个添加,有些麻烦.
下载地址(去空格):www . apple . com / downloads / dashboard / networking _ security
3.直接修改本地文件
这个是我自己摸索出来的.
打开finder ,在前往里面选择前往文件夹(快捷键shift+command+g)
在弹出框里输入 etc 然后就到了etc目录下,找到hosts文件,打开(用文本编辑),拷贝或编辑,完成后保存即可.
有可能提示无法保存,这是因为权限问题.打开hosts文件的简介,里面有共享和权限一栏,点击右下角的那个锁,输入密码后即可更改权限.将你自己的用户权限改为读和写就行了.
http://www.douban.com/photos/photo/304849639/
如果还提示权限问题,你要修改etc和上级目录private两个文件夹的权限了,方法一样,都改为读和写.
hosts文件保存完成后再把权限改回来吧.
*楼下跟帖的方法有:
1.启动root帐户直接改
*推荐(此方法经本人试验非常好用)
2.打开终端,输入:sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts就可以用文本编辑来直观修改hosts了。
*ip地址附录:将以下地址复制并保存在hosts里面即可访问
youtube:(可正常登陆和显示,但无法打开视频)
203.208.39.104 www.youtube.com
203.208.33.100 gdata.youtube.com
203.208.39.99 upload.youtube.com
203.208.39.99 insight.youtube.com
203.208.39.160 help.youtube.com
203.208.39.104 youtube.com
203.208.39.104 s.ytimg.com
203.208.39.104 i1.ytimg.com
203.208.39.104 i2.ytimg.com
203.208.39.104 i3.ytimg.com
203.208.39.104 i4.ytimg.com
facebook:(未试验)
124.40.42.105 www.facebook.com
69.63.180.173 login.facebook.com
69.192.34.110 s-static.ak.facebook.com
69.63.176.69 secure-profile.facebook.com
69.63.176.59 secure-media-sf2p.facebook.com
69.63.178.13 ssl.facebook.com
96.6.122.57 profile.ak.facebook.com
64.211.21.152 b.static.ak.facebook.com
twitter:(未试验)
168.143.161.20 twitter.com
168.143.161.20 www.twitter.com
128.121.146.229 assets0.twitter.com
128.121.146.229 assets1.twitter.com
128.121.146.101 static.twitter.com
128.121.146.229 assets2.twitter.com
128.121.146.229 assets3.twitter.com
65.74.185.41 twitter.zendesk.com
65.74.185.41 help.twitter.com
168.143.162.107 search.twitter.com
picasa:(可正常使用)
#picasaweb.google.com
203.208.39.104 picadaweb.google.com
203.208.39.104 lh1.ggpht.com
203.208.39.104 lh2.ggpht.com
203.208.39.104 lh3.ggpht.com
203.208.39.104 lh4.ggpht.com
203.208.39.104 lh5.ggpht.com
203.208.39.104 lh6.ggpht.com
Ok, for those of you that are trying to use Greenpois0n to jailbreak 4.2.1 and getting the “Failed” error, here’s what I did and it worked. NOTE: The steps below assume that Greenpois0n.app is on your Desktop.
1. Make sure you’re using Greenpois0n RC5_2
2. Make sure device is connected to your Mac
3. Open Terminal
4. Type “cd Desktop” without quotes and hit enter
5. Type “open Greenpois0n.app/Contents/MacOS/greenpois0n” without quotes and hit enter. A second Terminal window will open and Greenpois0n will start
6. Follow the instructions in Greenpois0n to enter DFU mode and it will jailbreak
7. Once jailbroken, a green “Loader” will be added to your device. This is supposed to allow you to install Cydia, but mine would not. If yours is the same, go to step 8
8. Turn off your device
9. Open Redsn0w 0.9.7b6
10. Make sure the only option checked is “Install Cydia”
11. Follow the instructions in Redsnow
12. Voila! Cydia is installed, and you have an untethered 4.2.1 jailbroken device!