Posted in November 2009

Part 3 of 3: Pandora in Canada – A step-by-step workaround

This is the last part of a three part post on Pandora in Canada.  The three parts were as follows:

  1. The History (or how we got to this sad state :( )
  2. Technical Background (or how Pandora blocks us)
  3. A step-by-step workaround (or a purely technical and not condoned by the author path to having Pandora work in Canada)

A step-by-step workaround

Disclaimer:  Attempting to circumvent the restrictions put in place to prevent Pandora from playing in your region may be a violation of your regional laws.  I don’t condone the use of this method, and this is rather a technical demonstration of the method currently used to filter regions.  Also depending on your web host, using this method may be a violation of your terms of service.


Step 1. Find a webhost

The first thing you need to find is a suitable web host.  Almost any old web host will do, but there are two crucial requirements.  They *must* be located in the US, and they *must* allow you to connect to their servers through something called “SSH”.  If you don’t know what that is don’t worry about it, but if there’s any doubt if a host you are considering will provide this ability, ask before you buy.  I personally am currently using Dreamhost.  As far as I know any hosts that will meet our requirements will be a pay service, but it is possible to find them for very cheap (Dreamhost, for example, occasionally has sales with very good prices).  If anyone finds a free offering that they’re able to get working let me know and I’ll add it to this post.

Step 2. Configure PuTTY

There is only one piece of software (in addition to a web browser) which you will need to setup your own personal proxy; an SSH client.  My personal preference is a free offering called “PuTTY”, which can be downloaded here.  For the purposes of this post my steps will assume that you are using PuTTY, though the explanation should be in principle transferable to other SSH clients if you have another preference.

To configure PuTTY, first open the application.  You should see a window that looks like screenshot below, though if this is your first experience with PuTTY you won’t have any “Saved Sessions” yet.

Puttyblank

Now we need to enter the information for the server that we will be connecting to for our proxy.  You will need to get this information from webhost; it will probably be listed as the SSH server.  If you can’t find this information, send an e-mail to your host asking the server hostname for SSH.  In my case as I’m using Dreamhost the host name is xxxxxx.dreamhost.com, where I have blanked out the subdomain for security reasons.  We’ll also want to put a name in the “Saved Sessions” box, though we won’t want to click the Save button yet as we have a few more things to configure first!  Your window should look like the screenshot below, with the hostname for your Host Name and you’re session name of choice instead of my information:

Puttypresets

Now we want to setup our username, so we won’t need to enter it manually each time we login to the server.  To do this we go the “Connection” menu in the “Category” window in PuTTY.  Click on the arrow beside “Connection”, and in the menu that expands click on the “Data” option.  Here we will want to fill in the “Auto-login username” field with the username for our webhost.  This is often the same username you use to login to their website, but if there is any doubt ask your webhost!  Fill your username into the field, and it should look like the screenshot below.  (as an FYI my username is not actually snuffles)

Autousername

Finally we need to actually configure something called our “Tunnel” which will allow our connection to act as a proxy.  Contrary to common sense we don’t go the “Proxy” options to configure this, but into the “SSH” submenu “Tunnels”.  Once in this window write “8080” in the “Source port” field, and change the radio option which is by default set to “Local” to “Dynamic”.  Your window should appear like the screenshot below.

Addtunnelbefore

Once this is completed, click the “Add” button.  After clicking this button, your window should look like this:

Addtunnelafter

Step 3. Connecting to the server

We’re done configuring PuTTY!  Not that tough was it?  At this point go back to the “Session” window and click the “Save” button.  This will save us from having to reconfigure PuTTY everytime we want to connect to our proxy.  Now we’re reading to connect to the server.  The easiest way to connect to the server in PuTTY is to double click on the sessions name in the “Saved Sessions” list.  Alternatively we can select the session, click the “Load” button on the right side, and then the “Open” button at the bottom of the screen.  Once you have completed these steps, a window that looks like a command prompt should open with a login prompt, similar to the one below.

Puttylogin

Here you need to enter the password for your webhost, and if everything has gone correctly you should see a message telling you you’re logged in.  This will differ depending on your webhost, but if you’re also using Dreamhost it should look similar to the own below.  If you either are not able to connect to the server, or are not able to login, make sure that everything is configured properly, and then contact your webhost’s support for help logging into their SSH server.

Puttyloginafter

Step 4. Configuring the web browser

If everything above has worked correctly, we’re almost ready to try connecting to Pandora.  The last step needed is to configure the web browser to use the proxy connection we have created.  For the purposes of this demo I’m going to assume you are using Firefox.  If there is sufficient demand for instructions for other web browsers I might add explanations for them in a later post.  In Firefox you need to go into the “Tools” menu, and click on “Options”.  You will then need to navigate to the “Advanced” section, and the “Network” tab.  It should look something like the screenshot below, depending on your version of Firefox.

Firefoxoptionsnetwork

Here we need to click on the “Settings…” button to get the proxy settings.  Once this window pops up you will need to change the Radio button from “No proxy” to “Manual proxy configuration”.  Lastly you need to fill in the “SOCKS Host” to “127.0.0.1”, and the “Port” field next to it to “8080”.  This should look like the screenshot below.

Firefoxoptionsconnectionsettin

At this point you can click the “OK” button and return to Firefox.  

Step 5. Connecting to Pandora’s Site

If everything has gone as planned, we are now ready to connect to Pandora’s website.  Go to your address bar and enter www.Pandora.com.  Remember that the legality of using this procedure will vary depending on  your region, and I don’t endorse using this method to use Pandora’s site where it’s use is restricted, but rather present this as a technical discussion.

Pandora

 

 

 

 

 

 

 

 

Part 2 of 3: Pandora in Canada – Technical Background

This is the second part of a three part post on Pandora in Canada.  The three parts will be as follows:

  1. The History (or how we got to this sad state :( )
  2. Technical Background (or how Pandora blocks us)
  3. A step-by-step workaround (or a purely technical and not condoned by the author path to having Pandora work in Canada)
Technical Background

IP addresses are effectively addresses for computers (or any network enabled device for that matter).  They consist of 4 8-bit numbers, commonly written in decimal notation as XXX.XXX.XXX.XXX.  For example, Google’s IP at the time of writing is 74.125.45.100.  You can find your own IP address by going here.  These addresses are issued by an organization called IANA (Internet Assigned Number Authority), and by correlating an IP address with the location of the company which has registered it, it is possible to get a rough idea of the physical location of a device.  You can try this out by using this site: http://www.ipligence.com/geolocation.  You can enter Google’s IP or your own IP, and it will tell you where the company that registered the IP address is located.

If, like me, you are not currently located in the US, when you find the location for your current IP address it will similarly not be located in the US.  This is what Pandora uses to decide that you are not authorized to access their content.  If you attempt to visit Pandora’s site at www.pandora.com you will be forwarded to a landing page telling you that you are not eligible to use their site due to your current location.

Based on the information above, it is probably not difficult to see that if it appeared our traffic was coming from a US location, then Pandora would allow access to their stream.  There are ways to accomplish this, and one is by using what is called an “internet proxy”.  Basically, what a proxy does is act as an intermediary between us and our destination.  We send all our requests to our proxy, which in turn forwards our requests onto their targets.  As far as the final destination is concerned all the requests are coming from the proxy’s location, and not our own location. 

Now that we know we are looking for a proxy, how do we go about finding one?  There are numerous free proxies available (try searching “free proxy” in google), however I haven’t had any luck with these.  Typically it appears that the flash application that is the interface for Pandora doesn’t load properly through this sites.  I am not sure if this is because Pandora is actively blocking these proxies, or if the proxies just don’t have enough bandwidth to load them.  You can try yourself and see if you have better luck.  If not, however, there is still another possibility, and this is to create our own proxy.

In the next post in this series I will go over the steps of configuring our own personal proxy in the US that will allow us to make our traffic appear to be from a US source, and consequently allow us to use Pandora in a normal fashion.