Class: HideMyAss::Proxy::Hidester

Inherits:
Base
  • Object
show all
Defined in:
lib/hidemyass/proxy/hidester.rb

Overview

Represent one proxy instance from hidester.com/proxylist

Instance Attribute Summary

Attributes inherited from Base

#row

Instance Method Summary collapse

Methods inherited from Base

#anonym?, #http?, #https?, #initialize, #inspect, #protocol, #rel_url, #secure?, #socks?, #ssl?, #url

Constructor Details

This class inherits a constructor from HideMyAss::Proxy::Base

Instance Method Details

#anonymityString

The level of anonymity in downcase letters. (low, medium, high, …)

Returns:

  • (String)


47
48
49
50
51
52
53
# File 'lib/hidemyass/proxy/hidester.rb', line 47

def anonymity
  case @row['anonymity']
  when 'Elite'     then 'high'
  when 'Anonymous' then 'medium'
  else 'no'
  end
end

#countryString

The country where the proxy is hosted in downcase letters.

Returns:

  • (String)


24
25
26
# File 'lib/hidemyass/proxy/hidester.rb', line 24

def country
  @row['country'].downcase
end

#ipString

The IP of the proxy server.

Returns:

  • (String)


10
11
12
# File 'lib/hidemyass/proxy/hidester.rb', line 10

def ip
  @row['IP']
end

#last_checkInt

Time in minutes when its been last checked.

Returns:

  • (Int)


58
59
60
61
# File 'lib/hidemyass/proxy/hidester.rb', line 58

def last_check
  require 'time'
  ((Time.now - Time.at(@row['latest_check'])) / 60).round
end

#portInt

The port for the proxy.

Returns:

  • (Int)


17
18
19
# File 'lib/hidemyass/proxy/hidester.rb', line 17

def port
  @row['PORT']
end

#speedInt

The average response time in milliseconds.

Returns:

  • (Int)


31
32
33
# File 'lib/hidemyass/proxy/hidester.rb', line 31

def speed
  @row['ping']
end

#typeString

The network protocol in in downcase letters. (https or http or socks)

Returns:

  • (String)


39
40
41
# File 'lib/hidemyass/proxy/hidester.rb', line 39

def type
  @row['type']
end