Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions example/lookup-plus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 12 additions & 5 deletions ipinfo/plus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, thanks. 🙏

}

// PlusAbuse represents the abuse object in Plus API response.
Expand Down
Loading