wissel.net

Usability - Productivity - Business - The web - Singapore & Twins

Hide my Ass on Linux


When you travel a lot in places with some habits, you want to keep your internet activity as private as possible (there are other reasons too) - besides making local access harder). One of the VPN services, aptly named after a gray fury animal is Hide my Ass. I like them, since they have both OpenVPN and PPTP as well as provide access points all over the planet and don't charge for switching between them. When overseas I frequently use the Singapore access point to "phone home".
They provide GUI installers for Windows and Mac, but just a command line script for Linux (anyway Linux user live on the command line, don't we?). So I whipped up a small script that provides a minimal GUI (with lots of room for improvement ). Enjoy:
#!/bin/bash
# HMA Dialog using the Zenity dialog
# (CC) 2012 St. Wissel, Creative Commons 2.0 Attribution, Share-Alike

if [ [ x $1x == 'xx' ] ]
then
selloc=$ ( eval zenity --width= 640 --height= 480 --list --text \"Pick a Location \" --radiolist \
    --column \" \" --column Location $ (curl -s https: //vpn.hidemyass.com /vpnconfig /countries.php |
        sed 's/.*/FALSE "&"/;1s/^FALSE /TRUE /' ) )

        echo "you selected ${selloc}"
else
    selloc= $1
fi

#Now fetch the config
COUNTRY= ` echo $selloc | sed 's/ /+/g' `
curl -s "https://vpn.hidemyass.com/vpnconfig/client_config.php?win=1&loc=$COUNTRY" > client.cfg
#Finally connect
sudo openvpn --config client.cfg --auth-user-pass secret
The script depends on zenity, but that shouldn't be more than an apt-get or yum away.
As usual: YMMV

Posted by on 07 December 2012 | Comments (0) | categories: Software

Comments

  1. No comments yet, be the first to comment