Class: MaxMind::GeoIP2::Record::Anonymizer
- Inherits:
-
Abstract
- Object
- Abstract
- MaxMind::GeoIP2::Record::Anonymizer
- Defined in:
- lib/maxmind/geoip2/record/anonymizer.rb
Overview
Contains data indicating whether an IP address is part of an anonymizing network.
This record is returned by the Insights web service.
Instance Method Summary collapse
-
#anonymous? ⇒ Boolean
This is true if the IP address belongs to any sort of anonymous network.
-
#anonymous_vpn? ⇒ Boolean
This is true if the IP address is registered to an anonymous VPN provider.
-
#confidence ⇒ Integer?
A score ranging from 1 to 99 that represents our percent confidence that the network is currently part of an actively used VPN service.
-
#hosting_provider? ⇒ Boolean
This is true if the IP address belongs to a hosting or VPN provider (see description of the anonymous_vpn? property).
-
#network_last_seen ⇒ Date?
The last day that the network was sighted in our analysis of anonymized networks.
-
#provider_name ⇒ String?
The name of the VPN provider (e.g., NordVPN, SurfShark, etc.) associated with the network.
-
#public_proxy? ⇒ Boolean
This is true if the IP address belongs to a public proxy.
-
#residential_proxy? ⇒ Boolean
This is true if the IP address is on a suspected anonymizing network and belongs to a residential ISP.
-
#tor_exit_node? ⇒ Boolean
This is true if the IP address is a Tor exit node.
Instance Method Details
#anonymous? ⇒ Boolean
This is true if the IP address belongs to any sort of anonymous network. This property is only available from Insights.
27 28 29 |
# File 'lib/maxmind/geoip2/record/anonymizer.rb', line 27 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? property. This property is only available from Insights.
38 39 40 |
# File 'lib/maxmind/geoip2/record/anonymizer.rb', line 38 def anonymous_vpn? get('is_anonymous_vpn') end |
#confidence ⇒ Integer?
A score ranging from 1 to 99 that represents our percent confidence that the network is currently part of an actively used VPN service. This property is only available from Insights.
19 20 21 |
# File 'lib/maxmind/geoip2/record/anonymizer.rb', line 19 def confidence get('confidence') end |
#hosting_provider? ⇒ Boolean
This is true if the IP address belongs to a hosting or VPN provider (see description of the anonymous_vpn? property). This property is only available from Insights.
47 48 49 |
# File 'lib/maxmind/geoip2/record/anonymizer.rb', line 47 def hosting_provider? get('is_hosting_provider') end |
#network_last_seen ⇒ Date?
The last day that the network was sighted in our analysis of anonymized networks. This value is parsed lazily. This property is only available from Insights.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/maxmind/geoip2/record/anonymizer.rb', line 82 def network_last_seen return @network_last_seen if defined?(@network_last_seen) date_string = get('network_last_seen') if !date_string return nil end @network_last_seen = Date.parse(date_string) end |
#provider_name ⇒ String?
The name of the VPN provider (e.g., NordVPN, SurfShark, etc.) associated with the network. This property is only available from Insights.
99 100 101 |
# File 'lib/maxmind/geoip2/record/anonymizer.rb', line 99 def provider_name get('provider_name') end |
#public_proxy? ⇒ Boolean
This is true if the IP address belongs to a public proxy. This property is only available from Insights.
55 56 57 |
# File 'lib/maxmind/geoip2/record/anonymizer.rb', line 55 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. This property is only available from Insights.
64 65 66 |
# File 'lib/maxmind/geoip2/record/anonymizer.rb', line 64 def residential_proxy? get('is_residential_proxy') end |
#tor_exit_node? ⇒ Boolean
This is true if the IP address is a Tor exit node. This property is only available from Insights.
72 73 74 |
# File 'lib/maxmind/geoip2/record/anonymizer.rb', line 72 def tor_exit_node? get('is_tor_exit_node') end |