MCPcopy
hub / github.com/XTLS/RealiTLScanner / GetGeo

Method GetGeo

geo.go:29–41  ·  view source on GitHub ↗
(ip net.IP)

Source from the content-addressed store, hash-verified

27}
28
29func (o *Geo) GetGeo(ip net.IP) string {
30 if o.geoReader == nil {
31 return "N/A"
32 }
33 o.mu.Lock()
34 defer o.mu.Unlock()
35 country, err := o.geoReader.Country(ip)
36 if err != nil {
37 slog.Debug("Error reading geo", "err", err)
38 return "N/A"
39 }
40 return country.Country.IsoCode
41}

Callers 1

ScanTLSFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected