Archive

Travel

If you have a server you can ssh to in the UK, you can use it to bypass the region restrictions imposed by itvplayer and BBC iPlayer.

Christmas generally means (amongst other things, you understand) lounging around watching Downton Abbey with my parents. As they live abroad, I just take along the DVDs and all is well. However, the annual Christmas special poses a bit of a conundrum.

Last year we watched it on filmon.com, but that requires you to watch it live at the time of broadcast, and this year we couldn’t.

Fortunately, it was still available for viewing via itv’s online catch-up service, itvplayer. However, this does some geolocation to determine where you are, and refuses to play if it detects you’re outside the UK. (It seems the BBC iPlayer does the same.)

My first thought was to use an HTTP proxy running on my server in Blighty. Back in the day, we used a squid proxy in the office; all browsers were set up to proxy through the squid server, which forwarded HTTP requests to the outside world and funnelled the responses back to the browser. So the plan was to set up such a proxy on my home server back in the UK, then point Safari on my laptop at it. This would mask my foreign IP address, making traffic to itvplayer appear to originate in the UK.

These days I’d use haproxy as a lightweight proxy, but for the life of me I couldn’t work out how to make it forward requests to arbitrary destination servers rather than a pre-configured set. (haproxy is mainly used for load balancing. If anyone knows whether haproxy can do simple old-school web proxying, I’d appreciate a note in the comments)

After an hour or so of fruitless googling and experimentation I thought perhaps trusty old ssh might offer something in this area, given that I use it for all other tunneling jobs. And it turns out it does indeed, as outlined in this blog post at linuxjournal.com.

Concretely, the steps were:

  • in a terminal window, run: ssh -D 12345 your-uk-server
  • in Safari, in Preferences > Advanced > Proxies, click the button to change settings (this opens the proxies pane of the Network system preferences panel for your current network interface)
  • enable the SOCKS proxy, using localhost as the server and 12345 as the port (see screenshot)

socksproxy

That’s it – Safari supports the SOCKS protocol and will send its traffic over the ssh connection.

One caveat – your download speed will be capped at the upload speed of the remote server, since it is in effect uploading the itvplayer content to you. UK residential ADSL broadband tends to have rubbish up speed (fibre ought to be ok), so you may have trouble with playback. (Unfortunately itvplayer at least doesn’t appear to do much buffering, so you can’t just pause it for a bit to let it load up the content; you’ll have to put up with the stuttering.)

For Windows users: you can probably achieve the same thing with PuTTY. Google up “putty dynamic tunnel socks” and you should get most of the way there.

If you don’t have an ssh server available to you, or your upload speed isn’t up to it, then you may be able to google  a cheap or free UK-based VPN or HTTP proxy service which will similarly route all your traffic through the UK. Good luck!

UPDATE: BBC iPlayer download tip

It seems the Beeb have a downloader application which you can use to download stuff for later viewing. (You can get to it via the “download” options when on an iPlayer programme.) If you kick this off while the SOCKS proxy is enabled, then pause the download and turn off the SOCKS proxy in network preferences, then resume the download, it’ll download at your full broadband speed rather than being limited by the upload speed of your SOCKS proxy.

Advertisements

Every year I go skiing for a week in Austria. It’s nice to be able to get online to check mail and more, but wi-fi is still inexplicably not universal in holiday apartments, and roaming data charges are preposterous. However, it turns out that Austria has one of the most competitive mobile markets, and prices for mobile services seem really reasonable (compared to the UK at least).

After a bit of research, I settled on a “3SuperSIM” from Three (“Drei”). The tariffs seemed really good – 10GB for €9 would do just fine for a week, letting me surf and use Spotify etc without having to worry. I have an Android phone, so popping in the SIM and turning on the wi-fi hotspot function meant everyone on the trip could use it just like normal wi-fi internet.

Incidentally – it also turns out that you can use it in a few other countries. At the time of writing: the UK, Denmark, Sweden, Italy and Hong Kong.

So how does it work?

Firstly, you need to get hold of a SIM packet. You can order them online, but I doubt you can get them to ship it to an overseas address. Three have shops dotted about in major cities, but I bought mine in a general telecomms shop in Landeck. I think it cost me about €10. If they ask you (I can’t remember whether they did), opt for “Wertkarte” (pay-as-you-go) rather than “mit Anmeldung” (monthly contract).

IMG_20130311_094815

You’ll also need some credit (“Guthaben” in German), which comes in multiples of €10. You can buy it online with a credit card, but for the first trip you might want to buy it from the person who sells you the SIM. It’s also available in lots of other places (petrol stations, supermarkets etc). It’s sold in the form of a code on a printed till receipt which you load up online, and is called a “Ladebon”. Have a look at the tariffs and decide what you want, and get enough to cover that. Be aware though that the tariff rolls over automatically every month. (In other words, if you get the €4 tariff and load up €10 credit, it’ll eat €4 for the first month and then another €4 the next month when you’re probably long gone.) You can’t stop it – I phoned and asked them, because I’d initially loaded up €20.

Next, you’ll need to activate it and choose your tariff. When you put it in your phone (or your unlocked computer USB modem thingy if you have one) you’ll be asked for the PIN. This is printed on the plastic card you detached the SIM from. Once it’s in your phone, you’ll be able to at least get to the Three Austria website in your phone’s web browser, where you can do the activation. This is where you have to choose your tariff; you can’t change it later, so choose wisely.

You can also load up your credit on the site. If you’re not already logged in, you can log in with your phone number and your PIN. (If you’re having trouble logging in, try entering the phone number without the leading zero.)

In theory the SIM expires if you don’t use it for 12 months, but I popped it into my phone in the UK a few months beforehand to check, and got a “welcome to the UK” SMS from Three, so maybe that was enough to keep it alive.

That should be just about everything you need to know. The main downside I guess is that you’ll probably need a fair bit of German to be able to navigate the website.

%d bloggers like this: