diff --git a/src/main/java/app/services/io/readers/GeoIPCity.java b/src/main/java/app/services/io/readers/GeoIPCity.java index 3884cf6..6deb20a 100644 --- a/src/main/java/app/services/io/readers/GeoIPCity.java +++ b/src/main/java/app/services/io/readers/GeoIPCity.java @@ -27,6 +27,7 @@ public class GeoIPCity extends BaseReader { public String GetCity(String ip) { try { if (ip == null || ip.isEmpty() || ip.startsWith("10.") || ip.startsWith("127.") || ip.startsWith("192.168")) return "Unknown"; + if (ip.startsWith("100.")) return "Local Provider Network"; return databaseReader.city(InetAddress.getByName(ip)).getCity().getName(); } catch (Exception e) { logger.error("[IGNORING] Cannot fetch city of ip: " + ip, e); diff --git a/src/main/java/app/services/io/readers/GeoIPCountry.java b/src/main/java/app/services/io/readers/GeoIPCountry.java index 7ff1bdd..434b188 100644 --- a/src/main/java/app/services/io/readers/GeoIPCountry.java +++ b/src/main/java/app/services/io/readers/GeoIPCountry.java @@ -27,6 +27,7 @@ public class GeoIPCountry extends BaseReader { public String GetCountry(String ip) { try { if (ip == null || ip.isEmpty() || ip.startsWith("10.") || ip.startsWith("127.") || ip.startsWith("192.168")) return "Unknown"; + if (ip.startsWith("100.")) return "Local Provider Network"; return databaseReader.country(InetAddress.getByName(ip)).getCountry().getName(); } catch (Exception e) { logger.error("[IGNORING] Cannot fetch country of ip: " + ip);