Skip to content

Commit 55588d6

Browse files
authored
Merge pull request #1805 from maxmind/greg/eng-3902
Add anonymizer property to IpAddress interface
2 parents cc3388d + 121477e commit 55588d6

File tree

7 files changed

+51
-6
lines changed

7 files changed

+51
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
CHANGELOG
22
=========
33

4-
8.3.0
4+
8.3.0 (2026-01-20)
55
------------------
66

77
* Added `Banquest`, `SummitPayments`, and `Yaadpay` to the `Processor` enum.
8+
* Added `anonymizer` property to the `IpAddress` interface. This contains
9+
information about whether the IP address is an anonymous network, including
10+
confidence score, VPN provider name, and various anonymizer type flags.
811

912
8.2.1 (2025-11-25)
1013
------------------

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,6 @@ This API uses [Semantic Versioning](https://semver.org/).
299299

300300
## Copyright and License
301301

302-
This software is Copyright (c) 2019-2025 by MaxMind, Inc.
302+
This software is Copyright (c) 2019-2026 by MaxMind, Inc.
303303

304304
This is free software, licensed under the Apache License, Version 2.0.

fixtures/insights.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@
2525
"reason": "Suspicious activity has been seen on this IP address across minFraud customers."
2626
}
2727
],
28+
"anonymizer": {
29+
"confidence": 99,
30+
"is_anonymous": true,
31+
"is_anonymous_vpn": true,
32+
"is_hosting_provider": true,
33+
"is_public_proxy": true,
34+
"is_residential_proxy": false,
35+
"is_tor_exit_node": true,
36+
"network_last_seen": "2025-01-15",
37+
"provider_name": "TestVPN"
38+
},
2839
"city": {
2940
"confidence": 25,
3041
"geoname_id": 54321,

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@maxmind/minfraud-api-node",
3-
"version": "8.2.1",
3+
"version": "8.3.0",
44
"description": "Node.js API for MaxMind minFraud web services",
55
"main": "dist/src/index.js",
66
"homepage": "https://github.com/maxmind/minfraud-api-node",

src/response/models/insights.spec.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,25 @@ describe('Insights()', () => {
6363
const model = new Insights(response as InsightsResponse);
6464
expect(model.email?.domain?.visit?.hasRedirect).toBe(false);
6565
});
66+
67+
it('allows /ip_address/anonymizer to be accessed', () => {
68+
const model = new Insights(response as InsightsResponse);
69+
expect(model.ipAddress?.anonymizer).toEqual({
70+
confidence: 99,
71+
isAnonymous: true,
72+
isAnonymousVpn: true,
73+
isHostingProvider: true,
74+
isPublicProxy: true,
75+
isResidentialProxy: false,
76+
isTorExitNode: true,
77+
networkLastSeen: '2025-01-15',
78+
providerName: 'TestVPN',
79+
});
80+
});
81+
82+
it('handles empty anonymizer responses', () => {
83+
delete response.ip_address.anonymizer;
84+
const model = new Insights(response as InsightsResponse);
85+
expect(model.ipAddress?.anonymizer).toBeUndefined();
86+
});
6687
});

src/response/records.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { CountryRecord, Insights, LocationRecord } from '@maxmind/geoip2-node';
1+
import {
2+
AnonymizerRecord,
3+
CountryRecord,
4+
Insights,
5+
LocationRecord,
6+
} from '@maxmind/geoip2-node';
27
import {
38
CreditCardType,
49
DispositionAction,
@@ -62,6 +67,11 @@ export interface IpRiskReasons {
6267
* Model for minFraud GeoIP2 Insights data.
6368
*/
6469
export interface IpAddress extends Insights {
70+
/**
71+
* Anonymizer object for the requested IP address. This contains information
72+
* about whether the IP address is associated with an anonymizing service.
73+
*/
74+
readonly anonymizer?: AnonymizerRecord;
6575
/**
6676
* Country object for the requested IP address. This record represents the
6777
* country where MaxMind believes the IP is located.

0 commit comments

Comments
 (0)