From 4d0149327fd81d80a244e0215770e27a414ae6e0 Mon Sep 17 00:00:00 2001 From: gsd Date: Fri, 24 Jul 2026 13:43:38 +0300 Subject: [PATCH] cc 2.5 --- src/main/java/app/services/io/readers/GeoIPCity.java | 1 + src/main/java/app/services/io/readers/GeoIPCountry.java | 1 + 2 files changed, 2 insertions(+) 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);