If you’re nothing like me, you watch a lot of shows and movies, which means you must have heard of the wonder that is Netflix. Tens of movies and shows, all ready to stream in high definition at a moment’s notice for a very cheap monthly fee, what’s not to love? Well, apart from the MPAA not letting them have a larger selection, and the MPAA not letting them work outside the US, not much!
There’s a bunch of services like Netflix that don’t work outside the US, which is an affront to my human rights and sense of entitlement, so I took it upon myself to make watching Netflix and listening to Pandora just a bit easier. To this end, I created a very small Docker script that will allow you to set up and run a proxy on your VPS with a single command (okay, maybe two commands). Read on for a description.
First of all, you can download the Dockerfile and assorted files from my Github account:
What the script does is use the excellent tunlr-style-dns-unblocking script to generate the configuration for HAProxy and Dnsmasq, and Docker to run the whole shebang in. It supports quite a few sites, like Netflix, Pandora, Hulu, and some more things I don’t remember now.
To run this, you will need to have a Linux VPS located in the US. I had one already, but if you’re looking for a nice cheap one, I recommend RamNode (that’s an affiliate link, but I actually genuinely recommend them, they’re what I use because it costs like $1/mo). Your VPS will need to support Docker, but that’s about the extent of the software you need for this.
Basically, what happens is that the Dockerfile downloads the tunlr script, fiddles with the config a bit to make it suitable for running in a container, and then executes it. As I mention in the README, you can either use the Dnsmasq server in the container (not recommended because of speed and security considerations), or forgo that entirely and only use HAProxy. The latter is done by generating a hosts file with a small script I have written, and appending the resulting output to your machine’s hosts file.
There are a few inefficiencies I would like to address (for example, you have to edit the config to enter your IP), but this can be done later on. Maybe trick77, who wrote the tunlr script, would like to cooperate and come up with a better method of generating the configurations.
At any rate, let me know if you have any ideas, comments or considerations, and happy watching/listening!