Class IEProxySearchStrategy

java.lang.Object
com.github.markusbernhardt.proxy.search.desktop.win.CommonWindowsSearchStrategy
com.github.markusbernhardt.proxy.search.browser.ie.IEProxySearchStrategy
All Implemented Interfaces:
ProxySearchStrategy

public class IEProxySearchStrategy extends CommonWindowsSearchStrategy
Extracts the proxy settings for Microsoft Internet Explorer. The settings are read by invoking native Windows API methods.
  • Field Details

    • WINHTTP_AUTO_DETECT_TYPE_DHCP

      private static final int WINHTTP_AUTO_DETECT_TYPE_DHCP
      Use DHCP to locate the proxy auto-configuration file.
      See Also:
    • WINHTTP_AUTO_DETECT_TYPE_DNS_A

      private static final int WINHTTP_AUTO_DETECT_TYPE_DNS_A
      Use DNS to attempt to locate the proxy auto-configuration file at a well-known location on the domain of the local computer.
      See Also:
  • Constructor Details

    • IEProxySearchStrategy

      public IEProxySearchStrategy()
  • Method Details

    • getProxySelector

      public ProxySelector getProxySelector() throws ProxyException
      getProxySelector
      Returns:
      a ProxySelector, null if none is found.
      Throws:
      ProxyException - on error
      See Also:
    • getName

      public String getName()
      Gets the printable name of the search strategy.
      Returns:
      the printable name of the search strategy
    • readIEProxyConfig

      public IEProxyConfig readIEProxyConfig()
      Loads the settings from the windows registry.
      Returns:
      WinIESettings containing all proxy settings.
    • createPacSelector

      private PacProxySelector createPacSelector(IEProxyConfig ieProxyConfig)
      Parses the settings and creates an PAC ProxySelector for it.
      Parameters:
      ieSettings - the IE settings to use.
      Returns:
      a PacProxySelector the selector or null.
    • createFixedProxySelector

      private ProxySelector createFixedProxySelector(IEProxyConfig ieProxyConfig) throws ProxyException
      Parses the proxy settings into an ProxySelector.
      Parameters:
      ieSettings - the settings to use.
      Returns:
      a ProxySelector, null if no settings are set.
      Throws:
      ProxyException - on error.