Class: MaxMind::GeoIP2::Model::AnonymousIP

Inherits:
Abstract
  • Object
show all
Defined in:
lib/maxmind/geoip2/model/anonymous_ip.rb

Overview

Model class for the Anonymous IP database.

Instance Method Summary collapse

Instance Method Details

#anonymous?Boolean

This is true if the IP address belongs to any sort of anonymous network.

Returns:

  • (Boolean)


13
14
15
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 13

def anonymous?
  get('is_anonymous')
end

#anonymous_vpn?Boolean

This is true if the IP address is registered to an anonymous VPN provider. If a VPN provider does not register subnets under names associated with them, we will likely only flag their IP ranges using the hosting_provider? method.

Returns:

  • (Boolean)


23
24
25
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 23

def anonymous_vpn?
  get('is_anonymous_vpn')
end

#hosting_provider?Boolean

This is true if the IP address belongs to a hosting or VPN provider (see description of the anonymous_vpn? method).

Returns:

  • (Boolean)


31
32
33
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 31

def hosting_provider?
  get('is_hosting_provider')
end

#ip_addressString

The IP address that the data in the model is for.

Returns:

  • (String)


38
39
40
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 38

def ip_address
  get('ip_address')
end

#networkString

The network in CIDR notation associated with the record. In particular, this is the largest network where all of the fields besides ip_address have the same value.

Returns:

  • (String)


47
48
49
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 47

def network
  get('network')
end

#public_proxy?Boolean

This is true if the IP address belongs to a public proxy.

Returns:

  • (Boolean)


54
55
56
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 54

def public_proxy?
  get('is_public_proxy')
end

#residential_proxy?Boolean

This is true if the IP address is on a suspected anonymizing network and belongs to a residential ISP.

Returns:

  • (Boolean)


62
63
64
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 62

def residential_proxy?
  get('is_residential_proxy')
end

#tor_exit_node?Boolean

This is true if the IP address is a Tor exit node.

Returns:

  • (Boolean)


69
70
71
# File 'lib/maxmind/geoip2/model/anonymous_ip.rb', line 69

def tor_exit_node?
  get('is_tor_exit_node')
end