Skip to content

feat: add missing PlusAnonymous fields and fix PlusMobile#73

Open
rbarrielabrystech wants to merge 1 commit intoipinfo:masterfrom
rbarrielabrystech:feat/plus-anonymous-extended-fields
Open

feat: add missing PlusAnonymous fields and fix PlusMobile#73
rbarrielabrystech wants to merge 1 commit intoipinfo:masterfrom
rbarrielabrystech:feat/plus-anonymous-extended-fields

Conversation

@rbarrielabrystech
Copy link

Summary

  • PlusAnonymous: Add IsResProxy, LastSeen, and PercentDaysSeen fields to match the IPinfo Max /lookup API response
  • PlusMobile: Replace incorrect Name field with CountryCode to match actual API response schema

Context

The IPinfo Max /lookup endpoint returns these fields in the anonymous object:

{
  "anonymous": {
    "is_proxy": false,
    "is_relay": false,
    "is_tor": false,
    "is_vpn": true,
    "is_res_proxy": true,
    "name": "NetNut",
    "last_seen": "2026-03-12",
    "percent_days_seen": 100
  }
}

The current PlusAnonymous struct only captures 5 of these 8 fields. The missing fields (is_res_proxy, last_seen, percent_days_seen) are silently dropped during JSON unmarshaling.

Similarly, PlusMobile.Name doesn't exist in the API response — the actual field is country_code.

Changes

  1. ipinfo/plus.go: Added 3 new fields to PlusAnonymous, replaced Name with CountryCode in PlusMobile
  2. example/lookup-plus/main.go: Updated example to demonstrate the new fields

Testing

  • Tested against live IPinfo Max API — all new fields correctly populated
  • go build ./... passes cleanly
  • Backwards compatible for PlusAnonymous; PlusMobile.Name.CountryCode is a correctness fix (Name was always empty)

PlusAnonymous: add IsResProxy, LastSeen, and PercentDaysSeen fields
to match the IPinfo Max /lookup API response. These fields provide
residential proxy detection and anonymiser recency/frequency signals
that were previously silently dropped during JSON unmarshaling.

PlusMobile: replace incorrect Name field with CountryCode to match
the actual API response schema (the mobile object returns mcc, mnc,
and country_code — not name).

Update lookup-plus example to demonstrate the new fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant