Monday, January 5, 2009

Watch hulu.com outside the US on Mac OS X

It's fairly easy to go around most ip geolocation systems like on pandora.com, you just need a proxy located in the US.

But hulu.com made it a bit trickier, by using Flash's RTMP connection to get the real IP of the viewer. Using a socks proxy inside your browser won't be enough to get around this. We need a way to "socskify" transparently the whole browser. This way all the tcp connection (including flash RTMP) will appear to come from the US.

I tried tsocks/dsocks/dante from macports, none of them worked well.
I finally found proxifier a native cocoa application which let you tunnel a whole application through various kinds of proxies.

Let's see how this works:
A friend of mine gave me an access to a ssh server in the US. I use it as a local socks proxy.
But you can probably use any public http or socks proxy located in the US.

First create an local socks proxy on the port 8800 using ssh. In a terminal type :
ssh -D 8800 USER@SSH_SERVER_IN_THE_US
Leave the terminal open.

Then go to Proxifier > Options > Proxy Settings > Add
Add the address, port, andtype of the proxy you want to use.
In this case, localhost:8800 and socks5

Finally go to Proxifier > Options > Proxification Rules
Select "Process Only the Following" option and add a rule for the applications you want to tunnel through the proxy (by default it'll try to socksify everything, and in my case I need the ssh connection to be direct).
The configuration should look somewhat like that :

That should do the trick, you can now enjoy your favorite series.

7 comments:

Parneix said...

The quest for Hulu outside the U.S. I've just tried your trick with the trial version of Proxifier, but still, it won't work. I'm using Meerkat to open an SSH tunnel based on a US server. I know it's working since my IP adress is changed. But I can't get Hulu to work. Any other thought? Thanks for the tip though.

fahimzahid said...

works perfectly, have been using for quite some time. Pandora,last.fm works too.

senseless said...

I was browsing around for alternate ways to watch hulu. It looks like the only decent way to do it, is to purchase a private VPN account. I highly doubt hulu can ban them all. I purchased mine from www.hidemynet.com , they provide UK and US servers currently, so I can also login to the UK server to access online video offered in the UK :). Like, Iplayer, Channel 4 on demand, bbc, etc. And it's only 5$/month, beats having to deal with the hassles of using hotspot shield (which is now banned anyway).

Matthieu Tourne said...

@Parneix: Having your IP changed is not enough. If you configure a traditional proxy into safari the proxy will be used for HTTP connections, but not for the flash connexion to hulu. This trick helps "proxifying" Safari in whole, thus flash connections will go through the proxy as well.

I haven't been outside of the US since January, so I can't tell if the hulu system still works the same way. Maybe they've also added a list of popular proxy system IP adresses that they refuse. I was using a friend's box to ssh onto.

asdfasdfsdfa said...

I had this working on Tiger but I upgraded to Snow Leopard and Proxifer doesnt work on it. Cant install it i mean. Have you tried running it on SL? thanks

Matthieu Tourne said...

If anyone is willing to give me a vpn access outside of the US, I can try to recreate the use case, and maybe find another way :)

senseless said...

Quit cheaping out looking for free hack/proxy methods and just buy a VPN Account from a decent provider for a low 5$/month. The 5$ is worth it for the time you save scanning the internet for new proxy servers, or hack methods to use.