This command displays the current WinHTTP proxy settings.
This command specifies that all HTTP and HTTPS servers should be accessed directly. Use this command if there is no proxy server.
This command 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 a given protocol and that server is not in the bypass list, the -p option specifies that the server cannot be accessed at all.
This command 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.
This command imports the Internet Explorer proxy settings of the current user. WinHTTP does not support auto-discovery and configuration script-based proxy settings.
Examples
The following is the most common command used with the proxycfg.exe utility. This command specifies to use the proxy server named “itgproxy” to access both HTTP and HTTPS servers, and also bypass any host names that do not contain a period. In this case, the -d option has no effect.
proxycfg -d -p itgproxy "<local>"
Compare the previous command to the following command which specifies to use the server named “itgproxy” to access both HTTP and HTTPS servers, and not to bypass any servers.
proxycfg -p itgproxy
The following is an example of a more complex command used by the proxycfg.exe utility. This command specifies to use the server named “http_proxy” to access HTTP servers and the server named “https_proxy” to access HTTPS servers. This command also specifies that local intranet sites (for example, host names that do not contain a period) and any site in the “*.microsoft.com” domain bypass the proxy.
proxycfg -p "http=http_proxy https=https_proxy" "<local>;*.microsoft.com"
Source:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms761351(v=vs.85).aspx
Tagged: Windows XP
On Windows 2008, Windows 7 use netsh.
netsh winhttp
http://technet.microsoft.com/en-us/library/cc731131(WS.10).aspx