diff --git a/example/lookup-plus/main.go b/example/lookup-plus/main.go index a25a548..eb25134 100644 --- a/example/lookup-plus/main.go +++ b/example/lookup-plus/main.go @@ -40,8 +40,13 @@ func main() { info.Mobile.Name, info.Mobile.MCC, info.Mobile.MNC) } if info.Anonymous != nil { - fmt.Printf("Anonymous - Proxy: %v, Relay: %v, Tor: %v, VPN: %v\n", - info.Anonymous.IsProxy, info.Anonymous.IsRelay, info.Anonymous.IsTor, info.Anonymous.IsVPN) + fmt.Printf("Anonymous - Proxy: %v, Relay: %v, Tor: %v, VPN: %v, ResProxy: %v\n", + info.Anonymous.IsProxy, info.Anonymous.IsRelay, info.Anonymous.IsTor, + info.Anonymous.IsVPN, info.Anonymous.IsResProxy) + if info.Anonymous.Name != "" { + fmt.Printf("Anonymous Service: %s (last seen: %s, %d%% of days)\n", + info.Anonymous.Name, info.Anonymous.LastSeen, info.Anonymous.PercentDaysSeen) + } } fmt.Printf("Anonymous: %v\n", info.IsAnonymous) fmt.Printf("Anycast: %v\n", info.IsAnycast) diff --git a/ipinfo/plus.go b/ipinfo/plus.go index 1a3abc3..3873882 100644 --- a/ipinfo/plus.go +++ b/ipinfo/plus.go @@ -98,11 +98,18 @@ type PlusMobile struct { // PlusAnonymous represents the anonymous object in Plus API response. type PlusAnonymous struct { - IsProxy bool `json:"is_proxy"` - IsRelay bool `json:"is_relay"` - IsTor bool `json:"is_tor"` - IsVPN bool `json:"is_vpn"` - Name string `json:"name,omitempty"` + IsProxy bool `json:"is_proxy"` + IsRelay bool `json:"is_relay"` + IsTor bool `json:"is_tor"` + IsVPN bool `json:"is_vpn"` + IsResProxy bool `json:"is_res_proxy"` + Name string `json:"name,omitempty"` + LastSeen string `json:"last_seen,omitempty"` + + // PercentDaysSeen is the percentage of days the IP was seen using an + // anonymous service over the trailing 90 days. Higher values indicate + // more persistent anonymiser usage. + PercentDaysSeen int `json:"percent_days_seen"` } // PlusAbuse represents the abuse object in Plus API response.