HTTP Proxy for Netflix, Hulu or other services for OS X

In this blog entry you’ll learn how to set up your own proxy into the USA so that you can easily view the same things that americans do. The post explains the bare minimum to get started for free.


  • An OS X installation - set up yourself
  • A DigitalOcean account – with this link you start out with $10 USD to play with. You’ll need to confirm your e-mail.
  • Homebrew - see below

1. Newbie - start here - installing homebrew

You need to open something called the Terminal. Press Cmd+Space to see Spotlight, and write ‘Terminal’, press Enter. Now you can install homebrew by pasting the following into the terminal and pressing Enter:

ruby -e "$(curl -fsSL"

It will take a few seconds, and then you can install almost any program using the Terminal. We’ll start by installing jq, which is a JSON parser (a thing that can help your computer talk with DigitalOcean).

When it asks for your password, it’s the password for your computer, not DigitalOcean.

If you want to ever ‘retry’ something in Terminal, just press up arrow and run the command again.

2. Installing jq

In the same Terminal that you have open, run (paste + Enter):

brew install jq

3. Setting up DigitalOcean

  1. Go to DigitalOcean and sign up.
  2. Go to and generate yourself an API write token, which you’ll use below.

Create a read-write token

Take the API key and run this in your Terminal:


replacing the text YOUR API KEY HERE with your API key.

4. Setting up SSH - the tunnel software

Still in your terminal, replace with your own e-mail and press Enter to all the questions asked by:

ssh-keygen -t rsa -C -f ~/.ssh/digitalocean

You can use the same “passphrase” as your digital ocean account, or you can just press ENTER to set an empty pass phrase. This is the ‘key’ you’ll unlock your new computer with.

Now you have a key for the tunnel. We have to let DigitalOcean know of this key, so that you can use the tunnel script:

KEY=$(ruby -e "require 'json'; puts ({ :name => 'digitalocean', :public_key => File.readlines('$HOME/.ssh/')[0].chomp }).to_json") && \
  export SSH_KEY_ID=$( \
    curl -X POST \
         -H 'Content-Type: application/json' \
         -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
         -d "$KEY" "" \
    | jq '')

The first part formats the key for the API, the second part (starting with export ...) calls the API and gets the key id from it.

With this command, DigitalOcean knows about your key, and you can use the actual script to create the tunnel - start by downloading the script:

curl -L -o digitalocean-proxy

Now, make it executable:

chmod +x digitalocean-proxy

5. Starting the tunnel

Again in your Terminal, write:


This will take about a minute or two to set up the proxy from scratch. When you’re done with it, you can press CTRL+C to stop it and it will be fully torn down and the data inside the proxy scrubbed.

You can navigate to and scroll down to see where you browser belives you are physically.

Now that you’re “in the states” you can might have some ideas about what online services that could entertain you.


If you liked this post and are new to either the Terminal or haven’t seen some of the commands used here, before, but thought it was cool that you can make computers do things like this, I recommend checking out Coursera - Learn to Program: The Fundamentals which goes through the basics.

As you progress in your knowledge, you’ll find that a world of possibilities opens up - programming is indeed the literacy of the 21’st century. If you have questions, you can find my e-mail at ;).

Post Scriptum - make it work the next Terminal session too

Run this:

echo "export SSH_KEY_ID=$SSH_KEY_ID" >>~/.bash_profile

And then:

echo "export DIGITALOCEAN_TOKEN=$DIGITALOCEAN_TOKEN" >>~/.bash_profile


Twitter @henrikfeldt

Twitter @logarylib

Henrik Feldt +46 737 53 27 18 haf