HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2019-10-04 8d017e93c754c097b8d1cda9a1c2be36f3b378f3
for testing purpose
1 files modified
9 ■■■■■ changed files
hsarback/src/de/hsadmin/core/util/IPv6Trick.java 9 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/core/util/IPv6Trick.java
@@ -7,6 +7,10 @@
public class IPv6Trick {
    
    private static final String IPv4_LOCALHOST = "127.0.0";
    private static final String IPv6_LOCALHOST = "::1";
    private static final String IPv6_LOCALHOST_ALT = "0:0:0:0:0:0:0:1";
    private static final String IPv4_83_223_79 = "83.223.79";     // Alboin-Kontor Berlin
    private static final String IPv4_83_223_91 = "83.223.91";     // Alboin-Kontor Berlin
    private static final String IPv4_83_223_95 = "83.223.95";     // Alboin-Kontor Berlin
@@ -42,6 +46,11 @@
    public static boolean isKnownRemote(final String remoteAddress) {
        boolean isKnown = false;
        System.out.print(remoteAddress + "\n");
        if (remoteAddress.startsWith(IPv4_LOCALHOST) || remoteAddress.startsWith(IPv6_LOCALHOST) || remoteAddress.startsWith(IPv6_LOCALHOST_ALT)) {
            // localhost
            isKnown = true;
        }
        if (remoteAddress.startsWith(IPv6_PREFIX_HS) || remoteAddress.startsWith(IPv6_PREFIX_HS_ALT)) {
            // Hostsharing IPv6
            isKnown = true;