Package com.jsql.util

Class ProxyUtil

java.lang.Object
com.jsql.util.ProxyUtil

public class ProxyUtil extends Object
Utility class managing proxy settings. The proxy configuration is saved as preferences and applied to the JVM.
  • Constructor Details

  • 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 proxy
      proxyAddressHttp - IP address or name of the proxy
      proxyPortHttp - port number of proxy
    • initializeProxy

      public void initializeProxy()
      Initialize proxy information from JVM already saved preferences.
    • isNotLive

      public boolean isNotLive(GitUtil.ShowOnConsole showOnConsole)
      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

      public String getProxyAddressHttp()
    • setProxyAddressHttp

      public void setProxyAddressHttp(String proxyAddressHttp)
    • getProxyPortHttp

      public String getProxyPortHttp()
    • setProxyPortHttp

      public void setProxyPortHttp(String proxyPortHttp)
    • isUsingProxyHttp

      public boolean isUsingProxyHttp()
    • setUsingProxyHttp

      public void setUsingProxyHttp(boolean isUsingProxyHttp)
    • getProxyAddressHttps

      public String getProxyAddressHttps()
    • setProxyAddressHttps

      public void setProxyAddressHttps(String proxyAddressHttps)
    • getProxyPortHttps

      public String getProxyPortHttps()
    • setProxyPortHttps

      public void setProxyPortHttps(String proxyPortHttps)
    • isUsingProxyHttps

      public boolean isUsingProxyHttps()
    • setUsingProxyHttps

      public void setUsingProxyHttps(boolean isUsingProxyHttps)