mirror of
https://github.com/xiaoqidun/qqwry.git
synced 2026-09-19 15:03:13 +08:00
fix(优化查询): 统一局域网IP地址的ISP字段
This commit is contained in:
1 parent
149532dea2
commit
90b4bdcfc3
1 file changed
+3
-3
@@ -183,9 +183,6 @@ func QueryIPIpdb(ip string) (location *Location, err error) {
|
||||
return
|
||||
}
|
||||
location = SplitResult(ret[0], ret[1], ip)
|
||||
if location.Country == "局域网" {
|
||||
location.ISP = location.Country
|
||||
}
|
||||
locationCache.Store(ip, location)
|
||||
return location, nil
|
||||
}
|
||||
@@ -231,5 +228,8 @@ func SplitResult(addr string, isp string, ipv4 string) (location *Location) {
|
||||
location.District = splitList[i]
|
||||
}
|
||||
}
|
||||
if location.Country == "局域网" {
|
||||
location.ISP = location.Country
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in new issue
Block a user