WINHTTP_AUTOPROXY_OPTIONS structure (winhttp.h)
The WINHTTP_AUTOPROXY_OPTIONS structure is used to indicate to the WinHttpGetProxyForURL function whether to specify the URL of the Proxy Auto-Configuration (PAC) file or to automatically locate the URL with DHCP or DNS queries to the network.
Syntax
typedef struct _WINHTTP_AUTOPROXY_OPTIONS {
DWORD dwFlags;
DWORD dwAutoDetectFlags;
LPCWSTR lpszAutoConfigUrl;
LPVOID lpvReserved;
DWORD dwReserved;
BOOL fAutoLogonIfChallenged;
} WINHTTP_AUTOPROXY_OPTIONS, *PWINHTTP_AUTOPROXY_OPTIONS;
Members
dwFlags
Mechanisms should be used to obtain the PAC file.
Value | Meaning |
---|---|
|
Enables proxy detection via autoconfig URL.
Note Support for this flag was introduced in Windows 10, version 1703 (10.0; Build 15063). |
|
Enables proxy detection via connection manager.
Note Support for this flag was introduced in Windows 10, version 1703 (10.0; Build 15063). |
|
Enables proxy detection via static configuration.
Note Support for this flag was introduced in Windows 10, version 1703 (10.0; Build 15063). |
|
Attempt to automatically discover the URL of the PAC file using both DHCP and DNS queries to the local network. |
|
Download the PAC file from the URL specified by lpszAutoConfigUrl in the WINHTTP_AUTOPROXY_OPTIONS structure. |
|
Maintains the case of the hostnames passed to the PAC script. This is the default behavior. |
|
Converts hostnames to lowercase before passing them to the PAC script. |
|
Disables querying a host to proxy cache of script execution results in the current process. |
|
Disables querying a host to proxy cache of script execution results in the autoproxy service. |
|
Disables querying Direct Access proxy settings for this request. |
|
Executes the Web Proxy Auto-Discovery (WPAD) protocol in-process instead of delegating to an out-of-process WinHTTP AutoProxy Service, if available. This flag must be combined with one of the other flags.
This option has no effect when passed to WinHttpGetProxyForUrlEx. Note This flag is deprecated.
|
|
By default, WinHTTP is configured to fall back to auto-discover a proxy in-process. If this fallback behavior is undesirable in the event that an out-of-process discovery fails, it can be disabled using this flag.
This option has no effect when passed to WinHttpGetProxyForUrlEx. Note This flag is available on Windows Server 2003 only.
|
|
Orders the proxy results based on a heuristic placing the fastest proxies first. |
dwAutoDetectFlags
If dwFlags includes the WINHTTP_AUTOPROXY_AUTO_DETECT flag, then dwAutoDetectFlags specifies what protocols are to be used to locate the PAC file. If both the DHCP and DNS auto detect flags are specified, then DHCP is used first; if no PAC URL is discovered using DHCP, then DNS is used.
If dwFlags does not include the WINHTTP_AUTOPROXY_AUTO_DETECT flag, then dwAutoDetectFlags must be zero.
lpszAutoConfigUrl
If dwFlags includes the WINHTTP_AUTOPROXY_CONFIG_URL flag, the lpszAutoConfigUrl must point to a null-terminated Unicode string that contains the URL of the proxy auto-configuration (PAC) file.
If dwFlags does not include the WINHTTP_AUTOPROXY_CONFIG_URL flag, then lpszAutoConfigUrl must be NULL.
lpvReserved
Reserved for future use; must be NULL.
dwReserved
Reserved for future use; must be zero.
fAutoLogonIfChallenged
Specifies whether the client's domain credentials should be automatically sent in response to an NTLM or Negotiate Authentication challenge when WinHTTP requests the PAC file.
If this flag is TRUE, credentials should automatically be sent in response to an authentication challenge. If this flag is FALSE and authentication is required to download the PAC file, the WinHttpGetProxyForUrl function fails.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional with SP3 [desktop apps only] |
Minimum supported server | Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only] |
Header | winhttp.h |