Class BaseURLs
java.lang.Object
org.eblocker.server.common.network.BaseURLs
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 Summary
ConstructorsConstructorDescriptionBaseURLs(NetworkInterfaceWrapper networkInterface, int httpPort, int httpsPort, String setupEblockerUrl, String controlBarHostName) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisSetupUrl(String url) booleanmatchesAny(String url) Returns true if the given URL matches any base URL.selectIpForPage(Boolean isVpnConnection, String scheme) selectURLForPage(String scheme)
-
Constructor Details
-
BaseURLs
@Inject public BaseURLs(NetworkInterfaceWrapper networkInterface, int httpPort, int httpsPort, String setupEblockerUrl, String controlBarHostName)
-
-
Method Details
-
getHttpURL
-
getHttpsURL
-
selectURLForPage
-
selectIpForPage
-
matchesAny
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
-