Class WinHttpHelpers
java.lang.Object
com.github.markusbernhardt.proxy.jna.win.WinHttpHelpers
Static helper methods for Windows
WinHttp
functions.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
Returned if WinHTTP was unable to discover the URL of the Proxy Auto-Configuration (PAC) file using the WPAD method.static final WinHttp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
detectAutoProxyConfigUrl
(com.sun.jna.platform.win32.WinDef.DWORD dwAutoDetectFlags) Finds the URL for the Proxy Auto-Configuration (PAC) file using WPAD.private String
sanitizeUrl
(String urlStr)
-
Field Details
-
WINHTTP_INSTANCE
-
ERROR_WINHTTP_AUTODETECTION_FAILED
private static final int ERROR_WINHTTP_AUTODETECTION_FAILEDReturned if WinHTTP was unable to discover the URL of the Proxy Auto-Configuration (PAC) file using the WPAD method.- See Also:
-
-
Constructor Details
-
WinHttpHelpers
private WinHttpHelpers()
-
-
Method Details
-
detectAutoProxyConfigUrl
public static String detectAutoProxyConfigUrl(com.sun.jna.platform.win32.WinDef.DWORD dwAutoDetectFlags) Finds the URL for the Proxy Auto-Configuration (PAC) file using WPAD. This is merely a wrapper aroundWinHttpDetectAutoProxyConfigUrl
This method is blocking and may take some time to execute.
- Parameters:
dwAutoDetectFlags
- flags for auto detection- Returns:
- the url of the PAC file or
null
if it cannot be located using WPAD method.
-
sanitizeUrl
-