mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2025-08-12 06:26:39 +00:00
fix: route-path 显示不全的问题
This commit is contained in:
@@ -62,15 +62,19 @@ func (r *reporter) generateRouteReportNode(ip string, ipGeoData ipgeo.IPGeoData)
|
||||
rpn.asn = ipGeoData.Asnumber
|
||||
}
|
||||
// 无论最后一跳是否为存在地理位置信息(AnyCast),都应该给予显示
|
||||
if ipGeoData.Country == "" || ipGeoData.City == "" || ipGeoData.City == "-" && ip != r.targetIP {
|
||||
if (ipGeoData.Country == "" || ipGeoData.Country == "LAN Address" || ipGeoData.Country == "-") && ip != r.targetIP {
|
||||
return rpn, errors.New("GeoData Search Failed")
|
||||
} else {
|
||||
if ipGeoData.City == "" {
|
||||
rpn.geo = []string{ipGeoData.Country, ipGeoData.Country}
|
||||
rpn.geo = []string{ipGeoData.Country, ipGeoData.Prov}
|
||||
} else {
|
||||
rpn.geo = []string{ipGeoData.Country, ipGeoData.City}
|
||||
}
|
||||
}
|
||||
if ipGeoData.Asnumber == "" {
|
||||
rpn.asn = "*"
|
||||
}
|
||||
|
||||
if ipGeoData.Isp == "" {
|
||||
rpn.isp = ipGeoData.Owner
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user