Version: 3.2.2 Update

This commit is contained in:
gh0stkey
2024-06-19 22:16:57 +08:00
parent 54973d9f4f
commit e5f55b6c4c
9 changed files with 190 additions and 190 deletions

View File

@@ -119,17 +119,6 @@ public class StringProcessor {
return host;
}
public static String getBaseDomain(String host) {
int lastIndex = host.lastIndexOf('.');
if (lastIndex > 0) {
int secondLastIndex = host.substring(0, lastIndex).lastIndexOf('.');
if (secondLastIndex >= 0) {
return host.substring(secondLastIndex + 1);
}
}
return host;
}
public static boolean matchHostIsIp(String host) {
return host.matches("\\b(?:\\d{1,3}\\.){3}\\d{1,3}\\b");
}