public static PotentialServer parseIP(String ipString, boolean whitelisted) {
        String[] parts = ipString.split(":");
        String[] parts2 = parts[0].split("\\.");

        try {
            // Parse IP
            short ip1 = Short.parseShort(parts2[0]);
            short ip2 = Short.parseShort(parts2[1]);
            short ip3 = Short.parseShort(parts2[2]);
            short ip4 = Short.parseShort(parts2[3]);
            if (ip1 > 255 || ip2 > 255 || ip3 > 255 || ip4 > 255) {
                return null;
            }
            InetAddress address = InetAddress.getByAddress(
                    new byte[] {(byte) ip1, (byte) ip2, (byte) ip3, (byte) ip4});

            // No port number
            if (parts.length == 1) {
                return new ResolvedServer(address, whitelisted);

            // Port number
            } else {
                int port = Integer.parseInt(parts[1]);
                if (port <= 65535) {
                    return new ResolvedServer(address, port, whitelisted);
                }
            }
        } catch (NumberFormatException e) { // nothing to do here
        } catch (UnknownHostException e) { /* shouldn't happen */ }

        return null;
    }