Class WinProxySearchStrategy
java.lang.Object
com.github.markusbernhardt.proxy.search.desktop.win.CommonWindowsSearchStrategy
com.github.markusbernhardt.proxy.search.desktop.win.WinProxySearchStrategy
- All Implemented Interfaces:
ProxySearchStrategy
Extracts the proxy settings from the windows registry. This will read the
windows system proxy settings.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
Resolves all host names directly without a proxy.(package private) static final int
Passes requests to the proxy unless a proxy bypass list is supplied and the name to be resolved bypasses the proxy.(package private) static final int
Retrieves the static proxy or direct configuration from the registry. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ProxySelector
createFixedProxySelector
(WinProxyConfig winProxyConfig) Parses the proxy settings into an ProxySelector.getName()
Gets the printable name of the search strategy.getProxySelectorMethods inherited from class com.github.markusbernhardt.proxy.search.desktop.win.CommonWindowsSearchStrategy
buildProtocolDispatchSelector, parseProxyList, setByPassListOnSelector
-
Field Details
-
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY
static final int WINHTTP_ACCESS_TYPE_DEFAULT_PROXYResolves all host names directly without a proxy.- See Also:
-
WINHTTP_ACCESS_TYPE_NO_PROXY
static final int WINHTTP_ACCESS_TYPE_NO_PROXYRetrieves the static proxy or direct configuration from the registry. WINHTTP_ACCESS_TYPE_DEFAULT_PROXY does not inherit browser proxy settings. WinHTTP does not share any proxy settings with Internet Explorer.The WinHTTP proxy configuration is set by one of these mechanisms.
- The proxycfg.exe utility on Windows XP and Windows Server 2003 or earlier.
- The netsh.exe utility on Windows Vista and Windows Server 2008 or later.
- WinHttpSetDefaultProxyConfiguration on all platforms.
- See Also:
-
WINHTTP_ACCESS_TYPE_NAMED_PROXY
static final int WINHTTP_ACCESS_TYPE_NAMED_PROXYPasses requests to the proxy unless a proxy bypass list is supplied and the name to be resolved bypasses the proxy. In this case, this function uses WINHTTP_ACCESS_TYPE_NAMED_PROXY.- See Also:
-
-
Constructor Details
-
WinProxySearchStrategy
public WinProxySearchStrategy()Constructor
-
-
Method Details
-
getProxySelector
getProxySelector- Returns:
- a ProxySelector, null if none is found.
- Throws:
ProxyException
- on error- See Also:
-
getName
Gets the printable name of the search strategy.- Returns:
- the printable name of the search strategy
-
readWindowsProxyConfig
-
createFixedProxySelector
Parses the proxy settings into an ProxySelector.- Parameters:
winProxySettings
- the settings to use.- Returns:
- a ProxySelector, null if no settings are set.
- Throws:
ProxyException
- on error.
-