Wednesday 21 November 2012

An Easy Way to Access Hulu from Outside the US

Watch Hulu Outside the US
Hulu.com is one of the best places on the web where you can watch movies and popular TV shows for free. All you need is a web browser with the Flash Player and you are good to go.
Hulu at this is time is only available in US but there’s an a new browser add-on called MediaHint that makes it dead-simple for anyone to access Hulu from anywhere in the world. Just install the extension and there’s absolutely no configuration required.
MediaHint is available for Firefox and Google Chrome (how to install). I was looking at the source code of the Chrome add-on and turns out that it merely changes the proxy server settings of your browser when you try accessing a Hulu video. Here’s the relevant snippet:
function FindProxyForURL(url, host) {
    var usa = ['hulu.com', 'netflix.com', 'pandora.com'];

    var direct = ['assets.hulu.com', 'll.a.hulu.com', 'ads.hulu.com', 'stats.pandora.com', 'blog.netflix.com', 'nordicsblog.netflix.com', 'blog.pandora.com'];
    for (var i = 0; i < direct.length; i++) {
        if (host.indexOf(direct[i]) > -1) {
            return 'DIRECT';
        }
    }

    if (host.match(/audio.*\.pandora\.com/) || host.match(/const.*\.pandora\.com/) || host.match(/mediaserver.*\.pandora\.com/) || host.match(/cont.*\.pandora\.com/)) {
        return 'DIRECT';
    }

    for (var i = 0; i < usa.length; i++) {
        if (host.indexOf(usa[i]) > -1) {
            return 'PROXY 50.116.59.63:80';
        }
    }
    return 'DIRECT';
}
In addition to Hulu, the same add-on may also be used for accessing music site Pandora and movie-streaming site Netflix from outside the US.

No comments:

Post a Comment