Modify the hosts file to access YouTube, Picasa, Twitter, and Facebook without using a proxy.
Last week, I modified the hosts file and was able to use Twitter.
Last night, I found that Picasa could upload files again, but I couldn't view albums online. After some thought, I decided to look for a method to modify the hosts file, and it worked again.
Using a proxy server, such as bypassing restrictions to access these sites, is too slow. Modifying the hosts file is more convenient.
Last night, while uploading photos, Picasa automatically attempted to upload video files to YouTube, but modifying the hosts file didn’t work. This morning, I came across an article that summarized how to log into commonly used websites after modifying the hosts file, so I decided to share it:
Latest modification of the hosts file to access YouTube, Picasa, Twitter, and Facebook.
The function of the hosts file is similar to a DNS (what is DNS can be looked up online). When you go online, the system first checks the hosts file. If it exists, it directly converts the domain name into the saved IP address; if not, it uses the DNS server for resolution. In other words, if your hosts file contained all the domain names and their corresponding IP addresses in the world, then your computer would be a super DNS. Of course, no one can achieve this.
Previously, I wrote separately about accessing YouTube, Picasa, and Twitter. Here, I summarize them. The previous method of accessing Twitter by modifying the hosts file seems to have become invalid, so here's the latest method that still works.
Users of Windows Vista and Windows 7 should note! These systems have UAC (User Account Control) functionality, which is enabled by default. Therefore, you need to right-click and select "Run as Administrator" to make changes and save them. If you've turned off the UAC feature like me, you don't need to do this, just open it directly.
Windows users can open the C:\Windows\System32\Drivers\etc\hosts file with Notepad (the original text had an error, which I corrected),
Mac users can open the Terminal in Utilities and type sudo nano /etc/hosts (if prompted that editing is not allowed, you may need to log out of the current user and switch to the Administrator account),
Linux users can open the terminal and type sudo gedit /etc/hosts, adding the following entries:
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
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.33.100 s.ytimg.com
203.208.35.101 www.youtube.com
203.208.39.160 m.youtube.com
203.208.35.101 gdata.youtube.com
203.208.35.101 youtube.com
203.208.35.101 upload.youtube.com
203.208.35.101 insight.youtube.com
203.208.35.101 help.youtube.com
203.208.35.101 s.ytimg.com
203.208.35.101 i1.ytimg.com
203.208.35.101 i2.ytimg.com
203.208.35.101 i3.ytimg.com
203.208.35.101 i4.ytimg.com
203.208.39.160 s.ytimg.com
203.208.39.104 picasaweb.google.com
203.208.39.99 lh1.ggpht.com
203.208.39.99 lh2.ggpht.com
203.208.39.99 lh3.ggpht.com
203.208.39.99 lh4.ggpht.com
203.208.39.99 lh5.ggpht.com
203.208.39.99 lh6.ggpht.com
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
Note that at this point, you need to use an encrypted HTTPS secure connection. The Twitter address should be https://twitter.com.
Similarly, Facebook also requires an HTTPS encrypted secure connection, so the Facebook address will be https://www.facebook.com. Note that Facebook's HTTPS certificate has not been verified, so the browser will prompt you. For Firefox, you can add an exception, and for Opera, you can proceed through the prompt.