Package com.jsql.util
Class ProxyUtil
java.lang.Object
com.jsql.util.ProxyUtil
Utility class managing proxy settings.
The proxy configuration is saved as preferences and applied to the JVM.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Initialize proxy information from JVM already saved preferences.boolean
isNotLive
(GitUtil.ShowOnConsole showOnConsole) Check if enabled proxies are up when application starts, injection begins,- checking IP, sending reports.boolean
boolean
void
setPreferences
(boolean isUsingProxyHttp, String proxyAddressHttp, String proxyPortHttp, boolean isUsingProxyHttps, String proxyAddressHttps, String proxyPortHttps) Save proxy configuration into the JVM preferences.void
setProxyAddressHttp
(String proxyAddressHttp) void
setProxyAddressHttps
(String proxyAddressHttps) void
setProxyPortHttp
(String proxyPortHttp) void
setProxyPortHttps
(String proxyPortHttps) void
setUsingProxyHttp
(boolean isUsingProxyHttp) void
setUsingProxyHttps
(boolean isUsingProxyHttps)
-
Constructor Details
-
ProxyUtil
-
-
Method Details
-
setPreferences
public void setPreferences(boolean isUsingProxyHttp, String proxyAddressHttp, String proxyPortHttp, boolean isUsingProxyHttps, String proxyAddressHttps, String proxyPortHttps) Save proxy configuration into the JVM preferences.- Parameters:
isUsingProxyHttp
- whether the connection is using a proxyproxyAddressHttp
- IP address or name of the proxyproxyPortHttp
- port number of proxy
-
initializeProxy
public void initializeProxy()Initialize proxy information from JVM already saved preferences. -
isNotLive
Check if enabled proxies are up when application starts, injection begins,- checking IP, sending reports. Display logs except when sending unhandled exception.- Parameters:
showOnConsole
- whether the message should be presented to the user- Returns:
- true if enabled proxies are up
-
getProxyAddressHttp
-
setProxyAddressHttp
-
getProxyPortHttp
-
setProxyPortHttp
-
isUsingProxyHttp
public boolean isUsingProxyHttp() -
setUsingProxyHttp
public void setUsingProxyHttp(boolean isUsingProxyHttp) -
getProxyAddressHttps
-
setProxyAddressHttps
-
getProxyPortHttps
-
setProxyPortHttps
-
isUsingProxyHttps
public boolean isUsingProxyHttps() -
setUsingProxyHttps
public void setUsingProxyHttps(boolean isUsingProxyHttps)
-