setProxy Method (ServerXMLHTTP-IServerXMLHTTPRequest)

 

Specifies proxy configuration.

JScript Syntax

oSrvXMLHTTPRequest.setProxy(proxySetting, varProxyServer, varBypassList);  

Parameters

proxySetting
The proxy configuration whose value is to be set. For a list of available settings and a description of how to use those settings, see Remarks.

varProxyServer
The name of a proxy server or a list of proxy server names.

varBypassList
The list of locally known host names or IP addresses for which you want to permit bypass of the proxy server.

C/C++ Syntax

HRESULT setProxy(  
    SXH_PROXY_SETTING proxySetting,  
    VARIANT varProxyServer,  
    VARIANT varBypassList);  

Parameters

proxySetting[in]
The proxy configuration whose value is to be set. For a list of available settings and a description of how to use those settings, see Remarks.

varProxyServer[in, optional]
The name of a proxy server or a list of proxy server names.

varBypassList[in, optional]
The list of locally known host names or IP addresses for which you want to permit bypass of the proxy server.

Return Values

S_OK
Value returned if successful.

E_FAIL
Value returned if name or value is invalid.

Remarks

The following table lists the settings available for use with the setProxy method.

Setting Description
0 SXH_PROXY_SET_PRECONFIG

 <P>- or -</P>

 SXH_PROXY_SET_DEFAULT

Currently, the SXH_PROXY_SET_DEFAULT shares the same settings level as SXH_PROXY_SET_PRECONFIG. It is intended, however, to support auto-proxy configuration features that might be included with future released products.

The SXH_PROXY_SET_PRECONFIG option can be used to specify that a previously established static proxy configuration should be used. When this option is used, the configuration is taken from the Windows registry. This is the case if you used the WinHTTP proxy configuration utility, proxycfg.exe, to set proxy settings at the client computer.
1 SXH_PROXY_SET_DIRECT

The SXH_PROXY_SET_DIRECT option can be used to specify that all HTTP and HTTPS servers should be accessed directly.
2 SXH_PROXY_SET_PROXY

The SXH_PROXY_SET_PROXY option can be used to specify one or more proxy servers, and an optional bypass list. If a proxy is not specified for a given protocol, and the server is not in the bypass list, the server cannot be accessed.

Versioning

Implemented in: MSXML 3.0 and MSXML 6.0

See Also

setProxyCredentials Method (ServerXMLHTTP-IServerXMLHTTPRequest)
IServerXMLHTTPRequest-ServerXMLHTTP Members