Class UrlUtil


  • public class UrlUtil
    extends Object
    • Constructor Detail

      • UrlUtil

        public UrlUtil()
    • Method Detail

      • urlSeemsPrivate

        public static boolean urlSeemsPrivate​(@NotNull
                                              String url)
        Tries to infer whether the given URL seems to be a non-public URL. Checks the hostname against known local hostnames and known special non-public TLDs. Checks IP-based URLs against loopback and private address ranges. There will be no connections opened or DNS queries issued. Configuration Properties:
        • teamcity.internal.connection.privateHostnames
        • teamcity.internal.connection.specialPurposeTlds
        Parameters:
        url - URL to check
        Returns:
        true if the URL seems to be private or is invalid