改hosts文件
网上流行改/etc/hosts文件来翻墙的方法。这个方法很不靠谱。就算GFW不更新封锁的IP,服务商也会经常改变IP映射。比如我抄了个Twitter的hosts列表,号称不封:
199.59.148.13 oauth.twitter.com
199.59.148.13 twitter.com
199.59.148.13 www.twitter.com
199.59.148.13 api.twitter.com
199.59.148.201 search.twitter.com
199.59.148.139 userstream.twitter.com
199.59.148.13 ssl.twitter.com
199.59.148.13 status.twitter.com
199.59.148.13 assets0.twitter.com
199.59.148.13 assets1.twitter.com
199.59.148.13 assets2.twitter.com
199.59.148.13 assets3.twitter.com
199.59.148.13 static.twitter.com
184.29.36.124 platform.twitter.com
219.76.10.138 platform0.twitter.com
199.59.148.206 help.twitter.com
199.59.148.206 support.twitter.com
209.84.4.102 si0.twimg.com
209.84.4.102 si1.twimg.com
209.84.4.102 si2.twimg.com
209.84.4.102 si3.twimg.com
209.84.4.102 si4.twimg.com
209.84.4.102 si5.twimg.com
其实还是封的,上不去,TCP连接一直是SYN-SENT状态:
State Recv-Q Send-Q Local Address:Port Peer Address:Port
SYN-SENT 0 1 192.168.1.101:56458 199.59.148.13:https users:(("chromium-browse",25541,108))
SYN-SENT 0 1 192.168.1.101:56501 199.59.148.13:https users:(("firefox-bin",23984,50))
SYN-SENT 0 1 192.168.1.101:56455 199.59.148.13:https users:(("firefox-bin",23984,96))
SYN-SENT 0 1 192.168.1.101:41176 199.59.148.13:www users:(("w3m",25517,4))
SYN-SENT 0 1 192.168.1.101:56505 199.59.148.13:https users:(("opera",25636,42))
SYN-SENT 0 1 192.168.1.101:56459 199.59.148.13:https users:(("chromium-browse",25541,116))
SYN-SENT 0 1 192.168.1.101:56457 199.59.148.13:https users:(("firefox-bin",23984,100))
SYN-SENT 0 1 192.168.1.101:56491 199.59.148.13:https users:(("seamonkey-2.0-b",25898,55))
要注意的是,改hosts文件光改一个twitter.com这样的记录是不够的。这些网站往往需要会有多个域名的服务支持才能完整加载,而这些域名也都被封。所以必须都加上这些记录才能正常显示。其实开头的文件至少还少了scribe.twitter.com的记录。