@maxmind/geoip2-node
Version:
Node.js API for GeoIP2 webservice client and database reader
21 lines (20 loc) • 667 B
JavaScript
export default class AnonymousIP {
ipAddress;
isAnonymous;
isAnonymousVpn;
isHostingProvider;
isPublicProxy;
isResidentialProxy;
isTorExitNode;
network;
constructor(response, ipAddress, network) {
this.ipAddress = ipAddress;
this.isAnonymous = !!response.is_anonymous;
this.isAnonymousVpn = !!response.is_anonymous_vpn;
this.isHostingProvider = !!response.is_hosting_provider;
this.isPublicProxy = !!response.is_public_proxy;
this.isResidentialProxy = !!response.is_residential_proxy;
this.isTorExitNode = !!response.is_tor_exit_node;
this.network = network;
}
}