The proxy settings stored in Internet Explorer are evaluated by the IE and by all programs that can access the Internet Explorer settings.
So that proxy settings can be used by the whole system, ie also by applications that have been created in .NET, eg Powershell, WinRM, WU they have to be set first. The IE remains outside. For this we use the command line tool "netsh".
netsh winhttp show proxy
netsh winhttp set proxy proxy.nds-edv.de:3128
If the settings that are stored in the IE are to act on the "system" proxy, then you can import them directly (WinINET> WinHTTP).
netsh winhttp import proxy source = ie
Set Proxy Bypass List (Bypass List)
netsh winhttp set proxy "proxy.nds-edv.de:3128" bypass-list = "* .test.local"
To undo the settings around the "system" proxy, this command is executed.
Netsh winhttp reset proxy
In general, there are 3 options to configure / use a proxy server.
- On the one hand in applications that bring their own proxy configuration settings and thus can not or do not want to resort to any API of the system.
- Application manufacturers who do not want to reinvent the wheel resort to the WinINET API (core of Internet Explorer) back. Thus, applications also participate directly from the cookie handling, the SSL / TLS settings and the configured proxy in IE.
- WinHTTP is more for non-interactive use, such as for Windows services or tasks that need to communicate in the background, that is, for processes that do not require user intervention (Windows Update, Powershell, WinRM, Certificate Checking).
WinHTTP is more powerful compared to WinINET and depends on .NET. Both can be configured via auto-discovery, manual configuration or proxy auto-scripting.
In summary, this means that WinHTTP does not use the WinINET settings that are configured in Internet Explorer. To do this, first, as described above, this command "netsh winhttp import proxy source = ie" should be executed.
WinINET is configured in Internet Explorer and is only valid for the respective user account. By default, automatic search is set to use the Web Proxy Autodiscovery Protocol (WPAD). The proxy is thus configured either by a DHCP option or by a DNS query WPAD-A. If you want each user to use the same settings, this can be controlled via a group policy.
Computer Configuration \ Administrative Templates \ Windows Components \ Internet Explorer
Make proxy settings per-machine (rather than per user)