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 Summary
Fields Modifier and Type Field Description private static intWINHTTP_AUTO_DETECT_TYPE_DHCPUse DHCP to locate the proxy auto-configuration file.private static intWINHTTP_AUTO_DETECT_TYPE_DNS_AUse DNS to attempt to locate the proxy auto-configuration file at a well-known location on the domain of the local computer.
-
Constructor Summary
Constructors Constructor Description IEProxySearchStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.net.ProxySelectorcreateFixedProxySelector(IEProxyConfig ieProxyConfig)Parses the proxy settings into an ProxySelector.private PacProxySelectorcreatePacSelector(IEProxyConfig ieProxyConfig)Parses the settings and creates an PAC ProxySelector for it.java.lang.StringgetName()Gets the printable name of the search strategy.java.net.ProxySelectorgetProxySelector()getProxySelectorIEProxyConfigreadIEProxyConfig()Loads the settings from the windows registry.-
Methods inherited from class com.github.markusbernhardt.proxy.search.desktop.win.CommonWindowsSearchStrategy
buildProtocolDispatchSelector, parseProxyList, setByPassListOnSelector
-
-
-
-
Field Detail
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
-
Method Detail
-
getProxySelector
public java.net.ProxySelector getProxySelector() throws ProxyExceptiongetProxySelector- Returns:
- a ProxySelector, null if none is found.
- Throws:
ProxyException- on error- See Also:
ProxySearchStrategy.getProxySelector()
-
getName
public java.lang.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 java.net.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.
-
-