NAME

Geo::Location::IP::Model::AnonymousIP - Anonymity details

VERSION

version 0.002

SYNOPSIS

use Geo::Location::IP::Database::Reader;
my $reader = Geo::Location::IP::Database::Reader->new(
  file => '/path/to/Anonymous-IP.mmdb',
);
eval {
  my $anon_ip_model = $reader->anonymous_ip(ip => '1.2.3.4');
  if ($anon_ip_model->is_anonymous) {
    printf "%s is anonymous\n", $anon_ip_model->ip_address;
  }
};

DESCRIPTION

This class contains details about the anonymity of an IP address.

SUBROUTINES/METHODS

new

my $anon_ip_model = Geo::Location::IP::Model::AnonymousIP->new(
  ip_address           => $ip_address,
  is_anonymous         => 0,
  is_anonymous_vpn     => 0,
  is_hosting_provider  => 0,
  is_public_proxy      => 0,
  is_residential_proxy => 0,
  is_tor_exit_node     => 0,
);

Creates a new object with data from an IP address query in an Anonymous-IP database.

ip_address

my $ip_address = $anon_ip_model->ip_address;

Returns the IP address the data is for as a Geo::Location::IP::Address object.

is_anonymous

my $is_anonymous = $anon_ip_model->is_anonymous;

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

is_anonymous_vpn

my $is_anonymous_vpn = $anon_ip_model->is_anonymous_vpn;

Returns true if the IP address is known to belong to an anonymous VPN provider.

is_hosting_provider

my $is_hosting_provider = $anon_ip_model->is_hosting_provider;

Returns true if the IP address belongs to a hosting provider.

is_public_proxy

my $is_public_proxy = $anon_ip_model->is_public_proxy;

Returns true if the IP address belongs to a public proxy.

is_residential_proxy

my $is_residential_proxy = $anon_ip_model->is_residential_proxy;

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

is_tor_exit_node

my $is_tor_exit_node = $anon_ip_model->is_tor_exit_node;

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

DIAGNOSTICS

None.

CONFIGURATION AND ENVIRONMENT

None.

DEPENDENCIES

None.

INCOMPATIBILITIES

None.

BUGS AND LIMITATIONS

None known.

AUTHOR

Andreas Vögele <voegelas@cpan.org>

LICENSE AND COPYRIGHT

Copyright (C) 2025 Andreas Vögele

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.