back to index

Method: Cheating YouTube region enforcement

Geopolitical borders are only an illusion and any degree of respect for them is fully unwarranted.

For some reason, globalization is more useful for the governments and industries than for the rank-and-file citizens. Such powers-that-be often resort to technological methods of enforcement of partitioning of the world to smaller areas, while they reap the benefits of global interconnection.

One of the effects of this unfairness is the "This video contains content from $ENTITY, who has blocked it in your country on copyright grounds" message. This is caused by geolocation of the user by his IP address, on the server side.

An enhancement for commonly used access by proxies exploits the YouTube player's region identification method, which (as of July 2nd 2011) occurs only at the start of video playback.


A popular workaround is to use a proxy server in a country where the access is permitted. The disadvantage is the unassured availability of such a proxy, limited bandwidth available (as too many people tend to compete for a limited resource), and general unreliability. There are many proxy lists on the Interent. One of them that seems to work fairly well as of beginning of July 2011 is the HideMyAss proxy list.

A browser add-on for comfortable changing of proxies is advisable. Chrome's "Switchy" is a good one (you can keep the options page opened in a tab, changing the ad-hox proxy you are currently using easily by just entering the new IP/port and saving the configuration without closing the tab), Firefox's "FoxyProxy" is another, and there are many more to choose from.

YouTube URL rewrite

YouTube can be told to show the video in a full-browser-screen Flash player, without images and other HTML crap around. This lowers the amount of data to be transferred through the proxy and limits the number of requests (some proxies from the HideMyAss list limit requests and their length). It also reportedly used to work as a geolocation workaround on its own, but does not work anymore.

For example, let's check the "Seconds from Disaster - Explosion in the North Sea" video. This one does not allows access from a region in East Europe, and prompted the search for a workaround. The URL of a full episode is (the ID of the video is written in bold).

This can be rewritten to (replace the video ID string with the desired one). The player still complains that the video is not available in your region. However, it now does not perform the superfluous HTTP requests for other page objects, saving a lot of proxy capacity on page reloads.

Proxy without bandwidth limits

Now set up the connection through the proxy, and reload the page. In optimal case, the player appears and the video starts playing. Now you are past the region-authorization and further transactions on this one player session will not be hampered by your location (situation as-of June/July 2011).

Pause the video and set the connection back to no-proxy. Now you are back on the fast (hopefully), high-bandwidth low-lag direct connection, but the player still thinks you are region-authorized. Scroll the video to a random point, make sure it plays, scroll it back. (This is to break the original connection through the proxy and establish a new direct one.) Continue watching.

This way even slow, lousy proxies with limited amount of available bandwidth can be used for relatively comfortable watching of "restricted" videos.

Further improvements

Automate the above, by the means of a browser add-on or a custom-written simple forwarding proxy called from Squid proxy or a completely standalone one running as a script called from e.g. xinetd. Allow easy manual or perhaps even automatic entry of new proxies for this connection forwarder.

If you have any comments or questions about the topic, please let me know here:
Your name:
Your email:
Leave this empty!
Only spambots enter stuff here.