class MaxMind::GeoIP2::Model::AnonymousIP

Model class for the Anonymous IP database.

Public Instance Methods

anonymous?() click to toggle source

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

@return [Boolean]

# File lib/maxmind/geoip2/model/anonymous_ip.rb, line 13
def anonymous?
  get('is_anonymous')
end
anonymous_vpn?() click to toggle source

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.

@return [Boolean]

# File lib/maxmind/geoip2/model/anonymous_ip.rb, line 23
def anonymous_vpn?
  get('is_anonymous_vpn')
end
hosting_provider?() click to toggle source

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

@return [Boolean]

# File lib/maxmind/geoip2/model/anonymous_ip.rb, line 31
def hosting_provider?
  get('is_hosting_provider')
end
ip_address() click to toggle source

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

@return [String]

# File lib/maxmind/geoip2/model/anonymous_ip.rb, line 38
def ip_address
  get('ip_address')
end
network() click to toggle source

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.

@return [String]

# File lib/maxmind/geoip2/model/anonymous_ip.rb, line 47
def network
  get('network')
end
public_proxy?() click to toggle source

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

@return [Boolean]

# File lib/maxmind/geoip2/model/anonymous_ip.rb, line 54
def public_proxy?
  get('is_public_proxy')
end
residential_proxy?() click to toggle source

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

@return [Boolean]

# File lib/maxmind/geoip2/model/anonymous_ip.rb, line 62
def residential_proxy?
  get('is_residential_proxy')
end
tor_exit_node?() click to toggle source

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

@return [Boolean]

# File lib/maxmind/geoip2/model/anonymous_ip.rb, line 69
def tor_exit_node?
  get('is_tor_exit_node')
end