mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Add coordinates to intel.Entity
This commit is contained in:
parent
304879b6da
commit
aa8156badc
1 changed files with 4 additions and 0 deletions
|
@ -65,6 +65,9 @@ type Entity struct {
|
||||||
// located in.
|
// located in.
|
||||||
Country string
|
Country string
|
||||||
|
|
||||||
|
// Coordinates holds the approximate coordinates of the IP address.
|
||||||
|
Coordinates *geoip.Coordinates
|
||||||
|
|
||||||
// ASN holds the autonomous system number of the IP.
|
// ASN holds the autonomous system number of the IP.
|
||||||
ASN uint
|
ASN uint
|
||||||
|
|
||||||
|
@ -247,6 +250,7 @@ func (e *Entity) getLocation(ctx context.Context) {
|
||||||
}
|
}
|
||||||
e.location = loc
|
e.location = loc
|
||||||
e.Country = loc.Country.ISOCode
|
e.Country = loc.Country.ISOCode
|
||||||
|
e.Coordinates = &loc.Coordinates
|
||||||
e.ASN = loc.AutonomousSystemNumber
|
e.ASN = loc.AutonomousSystemNumber
|
||||||
e.ASOrg = loc.AutonomousSystemOrganization
|
e.ASOrg = loc.AutonomousSystemOrganization
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue