Class BaseURLs

java.lang.Object
org.eblocker.server.common.network.BaseURLs

public class BaseURLs extends Object
Since the HTTP server listens on HTTP and HTTPS ports, we have two different base URLs. This class should simplify selecting the right URL.
  • Constructor Details

  • Method Details

    • getHttpURL

      public String getHttpURL()
    • getHttpsURL

      public String getHttpsURL()
    • selectURLForPage

      public String selectURLForPage(String scheme)
    • selectIpForPage

      public String selectIpForPage(Boolean isVpnConnection, String scheme)
    • matchesAny

      public boolean matchesAny(String url)
      Returns true if the given URL matches any base URL. NOTE: this method does not handle default ports 80 and 443 well.
      Parameters:
      url -
      Returns:
      true if the given URL matches
    • isSetupUrl

      public boolean isSetupUrl(String url)