Posts tagged Exit
One or two years ago I was fortunate enough to register for a Spotify-Account while they could be registered for free from the UK. I grabbed myself a UK based Proxy and registered. Normally the only way to get an Account still is to be invited by existing users as far as I know.
For those who don’t know Spotify: Spotify is a music service connected to a Jukebox by the same name (downloadable for Windows and Mac so far), much like iTunes, the main difference however is that with Spotify the music inside this Jukebox doesn’t primarily come from your hard drive but from Spotify’s servers. So as a layman, just imagine the joy of being able to listen to millions of songs, on demand, for free, whenever you want to listen to them.
Of course this comes with a few downsides. Unless you have a Premium Account, Spotify is Ad-Supported. This includes both Banners inside the application and Sound clips that interrupt your music-experience for a few seconds. I personally still believe this offering is worth all the trouble, which lets me come to a second major downside: Spotify is only usable from a few select European countries so far. Once you log into the application from one of these countries you can use it from anywhere for 14 days, even with a non-Premium Account.
So yesterday after installing Spotify the login-screen told me, as expected, that my country of residence doesn’t match the one in my profile. (Updating the profile as suggested isn’t really an option at this point)
Solution: Part 1
So without going further into detail about the Tor-Project and what it does, I thought this could do the trick. One major difficulty about this, however, was that I didn’t really know a way to “choose” which identity from the Tor Network I wanted to use. But a little bit of googling around and reading the Tor documentation brought me an answer that would spare me the pain of having to use netcat to connect to the Tor Control Port (9051), having to learn and punch in some commands and so on. (Or even worse: Click “Use new Identity” over and over again and pray to god for the right IP Address)
All you have to do is download a complete Tor Package for your Operating System and follow these steps:
- Find your torrc file. (If you use Vidalia, it is configured under Settings > Advanced)
- Open it with the text editor of your choice.
- In a new line, enter ExitNodes $fingerprint, $fingerprint, … where $fingerprint is the fingerprint of a Node from the Tor Network. These can be found and copied to the clipboard in Vidalia by clicking on “View the Network” and right-clicking on any Node.
- (Re)Start Tor/Vidalia.
Unless you write StrictNodes 1 into the torrc file (which I don’t recommend) this declaration of Exit Nodes is just a list of preferred Nodes, it is still possible that your Tor Route will have its exit at another Node. Information about all the other possible entries for the torrc can be found in the Tor Manual.
Solution: Part 2
So now that we have found a way to guarantee almost 100% that we are able to surf through an IP in the country of our choice, all that is left is to log in to the Spotify application through this proxy. Tor in combination with Polipo offers us the possibility to surf through an HTTP(S) Proxy on Port 8118 or through a SOCKS Proxy on Port 9050 but of course you can use whichever proxy you prefer. However it doesn’t seem like the login screen of Spotify offers any ability to change the proxy settings (it would be a lot easier to change these settings as soon as we got past the login-screen of course).
But all is not lost. For the lazy ones this is the moment where you disconnect yourself from the internet. (I didn’t try it, but I guess it should work. If not, the lazy ones might as well jump over their dusty shadows for once.) Of course my rather “complicated” solution was to configure my firewall to block Spotify from accessing the internet, only later did I realize that unplugging my network cable for a few seconds could have done the same job. However, this is what you’ll find:
And the holy grail of configurability has been revealed. A click on “proxy settings” will show us what we wanted to see.
If you’ve successfully configured Tor to surf over an IP Adress that matches the country in your Spotify Profile, you should now be able to log into the application. Of course you can then deactivate the use of a proxy in Spotify again for 14 days so you can stream the music at full speed.
The main reason why I wanted to post this to my blog is that I didn’t find any tutorial on the internet that described to me what Part 1 of my solution contains. Going through the Tor Manual taught me this but hopefully I can assist someone else by not having to read through it in its entirety. And of course finding a good use for Tor beside its awesome possibilities of surfing the web anonymously gave this a very neat context.