// ********************************************************************** // // proxycfg.exe Readme: // (C) Microsoft Corp., 2000 // // ********************************************************************** OVERVIEW OF THE WinHTTP PROXY CONFIGURATION UTILITY **************************************************** The WinHTTP proxy configuration utility, proxycfg.exe, allows you to configure WinHTTP to access HTTP and HTTPS servers through a proxy server. Because the ServerXMLHTTP component depends on WinHTTP proxy settings, an administrator can use the proxycfg.exe utility as part of the deployment and installation process of an application that uses WinHTTP. With the proxycfg.exe utility, you can specify an optional list of hostnames that are to be accessed directly not through the proxy server. You can also use this utility to configure WinHTTP to access all servers directly. You must use the proxycfg.exe utility to configure WinHTTP proxy settings. You cannot configure these proxy settings through Control Panel. Furthermore, WinHTTP proxy settings are per-machine, not per-user. Also, WinHTTP proxy settings are separate from the proxy settings in Microsoft® Internet Explorer. In order to run proxycfg.exe, you must have local administrator privileges so that proxycfg.exe can update the registry of the local computer. IMPORTANT: After the proxycfg.exe has run and updated the registry, the previous registry settings cannot be restored. TO USE THE PROXY CONFIGURATION UTILITY ********************************************** 1. Open a command prompt window and enter the appropriate proxycfg command. For information on the available commands and how to use them, see "COMMANd USAGE" and "EXAMPLES" later in this topic. 2. After running the proxy configuration utility, reset Microsoft Internet Information Services (IIS) using the iisreset command. COMMAND USAGE ********************************************* The following describes the command prompt parameters you can enter for the proxycfg.exe utility. Command: proxycfg -------- Displays current WinHTTP proxy settings. Command: proxycfg -d -------- Specifies that all HTTP and HTTPS servers should be accessed directly. Use this command if there is no proxy server. Command: proxycfg -p proxy-server-list optional-bypass-list -------- Specifies one or more proxy servers, and an optional list of hosts that should be accessed directly. If a proxy is not specified for a given protocol, and the server is not in the bypass list, then the server cannot be accessed. Command: proxycfg -d -p proxy-server-list optional-bypass-list -------- Specifies one or more proxy servers and an optional list of hosts that should be accessed directly. If a proxy server is not specified for the given protocol, the -d option specifies that the server should be accessed directly instead. Command: proxycfg -u -------- Imports the Internet Explorer proxy settings of the current user. Auto-discovery and configuration script-based proxy settings are not supported by WinHTTP. proxy-server-list ********************************************* You specify proxies using a space-delimited string. The formatting of this string depends on whether the valid protocols (HTTP and HTTPS) use a single proxy server or whether they use separate servers. If both protocols are accessed through the same server, then the string is just that proxy server's name. For instance, using itgproxy as the proxy-server-list indicates that both the HTTP and HTTPS servers should be accessed through the proxy server named "itgproxy". If each protocol uses a different server, then the string must contain the name of each server and, at least, one of the server names must follow this formatting, =http://. For example, "http=http://http_proxy https=http://https_proxy_name" indicates that the HTTP protocol uses the server named "http_proxy", while the HTTPS protocol uses the proxy named "https_proxy_name". If a proxy name is listed by itself, it is the default proxy for any protocols that do not have a proxy specified. For example, "http=http://http_proxy other_proxy" indicates that the HTTP protocol uses the server named "http_proxy", while the HTTPS protocol uses the proxy named "other_proxy". The name of a proxy server can also contain the port number used to access the proxy. For example, a valid string is http=http://http_proxy_name:80, where "http_proxy_name" is the name of the proxy server and "80" is the port number that must be used to access the proxy. If name does not include the port number, the proxy uses the default port number for that protocol. optional-bypass-list ********************************************* The optional-bypass-list contains host names or IP addresses that are known locally and are to bypass using the proxy server. This list can contain wildcards, "*", that cause the application to bypass the proxy server for addresses that fit the specified pattern. For example, "*.microsoft.com" or "*.org" causes the application to bypass the proxy server for all addresses that end in ".microsoft.com" or ".org". Wildcard characters must be the left-most characters in the list, so "sample.*" is not supported. To list multiple addresses and hostnames, separate them with blank spaces or semicolons in the optional-bypass-list. If the "" macro is specified, the function bypasses any hostname that does not contain a period. EXAMPLES ********************************************* Example 1: proxycfg -d -p itgproxy "" --------- This example shows the most common use for proxycfg.exe. This command specifies that both HTTP and HTTPS servers should be accessed through the proxy server named "itgproxy", unless the hostname does not contain a period. In this case, the -d option has no effect. Example 2: proxycfg -p itgproxy --------- This example specifies that both HTTP and HTTPS servers should be accessed through the proxy server named "itgproxy". It specifies no bypass list. Example 3: proxycfg -p "http=http_proxy https=https_proxy" ";*.microsoft.com" --------- This example specifies that HTTP servers should be accessed through the http_proxy proxy and HTTPS servers should be accessed through https_proxy. Local intranet sites, for example, hostnames that do not contain a period, and any site in the *.microsoft.com domain, bypass the proxy.