Thursday, January 19, 2012

Get Wikipedia blackout back online via hosts file work around

Wikipedia is on blackout for 24 hours. The blackout code is delivered via JS from the domain meta.wikimedia.org.

To get wikipedia back online during their blackout append "127.0.0.1 meta.wikimedia.org" to your hosts file.

The line:

127.0.0.1 meta.wikimedia.org

will make the domain  meta.wikimedia.org resolve to your loopback interface for IPv4 (your local machine). It will thus NOT render the HTTP response delivering the JavaScript code that will blackout the wikipedia page. Thus you can use wikipedia as normal.

If you're not familiar with what a hosts file is, here is a short overview. http://onwebdevelopment.blogspot.com/2008/06/blocking-advertisements-with-hosts-file.html
Or look here on how to edit your hosts file: http://www.windowsreference.com/windows-7/edit-hosts-file-in-windows-7-windows-vista/

These are for windows, however if you're on Linux then it's a lot simpler - like most things Linux.

echo "127.0.0.1 meta.wikimedia.org" >> /etc/hosts



You need to be root to do this, so either do "sudo" or "su root" or "sudo su" etc.

Other workarounds to wikipedia blackout

If you have foxyproxy you can also use that to block meta.wikimedia.org specifically by specifying that it proxy to some blackhole.

If you use a proxy configuration script, that would also work. Modify your script to proxy meta.wikimedia.org to your favorite blackhole.With a proxy script you can match just the JavaScript file URL, so it is more specific.

There is a number of other ways to block meta.wikimedia.org and they should all deliver the same results. 

If you're interested in the JS file delivering the blackout code then with firebug or chrome, inspect the source and then go to "Network" tab. You should see two HTTP requests for meta.wikimedia.org. The second one is delivering the JavaScript file.You can also use Wireshark to inspect the network traffic and create a Wireshark filter for meta.wikimedia.org. 



No comments: