NAME

OpenVPN::ProxyManager::HMA - connect to HideMyAss.com (HMA) proxy servers using OpenVPN.

SYNOPSIS

use Net::OpenVPN::ProxyManager::HMA;

my $pm_hma = Net::OpenVPN::ProxyManager::HMA->new;
my $servers = $pm_hma->get_servers({ name => 'usa', proto => 'tcp'});
$pm_hma->connect_to_random_server($servers);

DESCRIPTION

Net::OpenVPN::ProxyManager::HMA is an object oriented module that automatically downloads the latest list of available HMA proxy servers and the OpenVPN connection configuration (this is done on construction of the Net::OpenVPN::ProxyManager object).

Dependencies (non-Perl)

This module has been tested on Ubuntu linux 12.04 with OpenVPN version 2.2.1 built from Ubuntu package. It should work on other Linux distros, perhaps OSX but probably not Windows.

To login to the HMA proxy servers, you will need to have an active account with HMA (http://hidemyass.com). I am not affiliated with HMA other than as a customer.

You will also need an internet connection!

get_servers

This method returns an arrayhash of HMA servers available (the list is downloaded upon construction - Net::OpenVPN::ProxyManager::HMA->new). If no arguments are passed to this method, it will return the entire arrayhash of available servers (approximately 350).

The method accepts two optional string arguments as key value pairs: -Name, this is a string of the location name. HMA provide a location name string in the format: "Canada, Ontario, Toronto (LOC1 S1)". -Proto, this is the protocol option and can be either TCP or UDP. Many of the HMA servers accept both protocols.

Example my $usa_tcp_servers_arrayhash = $pm_hma->get_servers({name => 'usa', proto => 'tcp'});

connect_to_random_server

This method will invoke the hma_connect method on a random server when this method is called with an arrayhash of servers (as returned by the get_servers method).

Example $pm_hma->connect_to_random_server($arrayhash_of_servers);

hma_connect

The hma_connect method will initialise the OpenVPN program to a server with the HMA configuration. This method requires a hashref containing the attributes of the server (this is the same hashref format that is returned by the get_servers method).

Example my $pm_hma->hma_connect({ 'ip' => '104.202.33.5', 'name' => 'Canada, Ontario, Toronto (LOC1 S1)', 'country_code' => 'ca', 'tcp_flag' => 'TCP', 'udp_flag' => 'UDP', 'norandom_flag' => undefined });