Skip to content

Commit 94fea58

Browse files
authored
Merge pull request #666 from maxmind/greg/stf-1005-add-residential-to-anonymizer
Add residential field to Anonymizer response
2 parents 1b3a6b9 + 55d7081 commit 94fea58

7 files changed

Lines changed: 115 additions & 41 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
CHANGELOG
22
=========
33

4+
4.4.0 (unreleased)
5+
------------------
6+
7+
* Added `residential` field to the `Anonymizer` response record. This is
8+
an `AnonymizerFeed` record containing `confidence`, `networkLastSeen`,
9+
and `providerName` fields with residential proxy data for the network.
10+
`residential` may be populated even when none of the other fields on
11+
`Anonymizer` are set.
12+
413
4.3.0 (2026-05-12)
514
------------------
615

lychee.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
# Run locally with:
55
# lychee './**/*.md' './src/**/*.java' './pom.xml'
66

7-
# Include URL fragments in checks
8-
include_fragments = true
7+
# Include URL fragments in checks. lychee 0.24 replaced the boolean flag with
8+
# an enum; "full" checks both anchor fragments (`#section`) and text fragments
9+
# (`#:~:text=`).
10+
include_fragments = "full"
911

1012
# Don't allow any redirects, so links that have moved are surfaced and updated
1113
# to their canonical destination.

mise.lock

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

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<dependency>
7474
<groupId>com.maxmind.geoip2</groupId>
7575
<artifactId>geoip2</artifactId>
76-
<version>5.1.0</version>
76+
<version>5.2.0</version>
7777
</dependency>
7878
<dependency>
7979
<groupId>org.junit.jupiter</groupId>

src/test/java/com/maxmind/minfraud/response/InsightsResponseTest.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import static org.junit.jupiter.api.Assertions.assertTrue;
77

88
import com.fasterxml.jackson.jr.ob.JSON;
9+
import com.maxmind.geoip2.record.AnonymizerFeed;
910
import java.time.LocalDate;
1011
import java.util.UUID;
1112
import org.junit.jupiter.api.Test;
@@ -39,6 +40,11 @@ public void testInsights() throws Exception {
3940
.put("is_tor_exit_node", true)
4041
.put("network_last_seen", "2025-01-15")
4142
.put("provider_name", "TestVPN")
43+
.startObjectField("residential")
44+
.put("confidence", 82)
45+
.put("network_last_seen", "2026-05-11")
46+
.put("provider_name", "quickshift")
47+
.end()
4248
.end()
4349
.startObjectField("country")
4450
.put("iso_code", "US")
@@ -152,5 +158,24 @@ public void testInsights() throws Exception {
152158
"correct networkLastSeen"
153159
);
154160
assertEquals("TestVPN", insights.ipAddress().anonymizer().providerName(), "correct providerName");
161+
162+
AnonymizerFeed residential = insights.ipAddress().anonymizer().residential();
163+
164+
assertNotNull(residential, "anonymizer.residential() returns null");
165+
assertEquals(
166+
Integer.valueOf(82),
167+
residential.confidence(),
168+
"correct anonymizer.residential().confidence()"
169+
);
170+
assertEquals(
171+
LocalDate.parse("2026-05-11"),
172+
residential.networkLastSeen(),
173+
"correct anonymizer.residential().networkLastSeen()"
174+
);
175+
assertEquals(
176+
"quickshift",
177+
residential.providerName(),
178+
"correct anonymizer.residential().providerName()"
179+
);
155180
}
156181
}

src/test/resources/test-data/factors-response.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
"is_residential_proxy": true,
2525
"is_tor_exit_node": true,
2626
"network_last_seen": "2025-01-15",
27-
"provider_name": "TestVPN"
27+
"provider_name": "TestVPN",
28+
"residential": {
29+
"confidence": 82,
30+
"network_last_seen": "2026-05-11",
31+
"provider_name": "quickshift"
32+
}
2833
},
2934
"city": {
3035
"confidence": 42,

src/test/resources/test-data/insights-response.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
"is_residential_proxy": true,
2525
"is_tor_exit_node": true,
2626
"network_last_seen": "2025-01-15",
27-
"provider_name": "TestVPN"
27+
"provider_name": "TestVPN",
28+
"residential": {
29+
"confidence": 82,
30+
"network_last_seen": "2026-05-11",
31+
"provider_name": "quickshift"
32+
}
2833
},
2934
"city": {
3035
"confidence": 42,

0 commit comments

Comments
 (0)