This commit is contained in:
77
2024-04-15 01:00:02 +08:00
parent 05c9cacf70
commit 2b1b256c79
4 changed files with 102 additions and 3 deletions

View File

@@ -25,8 +25,12 @@ public class AddressUtils {
}
// 内网不查询
ip = StringUtils.contains(ip, "0:0:0:0:0:0:0:1") ? "127.0.0.1" : HtmlUtil.cleanHtmlTag(ip);
if (NetUtil.isInnerIP(ip)) {
return "内网IP";
try {
if (NetUtil.isInnerIP(ip)) {
return "内网IP";
}
}catch (Exception e){
return UNKNOWN;
}
return RegionUtils.getCityInfo(ip);
}