System-Wide Proxy Settings in Windows Regedit
Configuring a system-wide proxy via the Windows Registry (Regedit) allows administrators to route all network traffic on a machine through a designated proxy server, applying settings across all user accounts and system services. This article covers the exact registry paths and key values required to configure, enable, and enforce machine-wide proxy settings in Windows.
1. The Primary Registry Keys for Proxy Configuration
Windows handles proxy configurations at both the per-user and
per-machine levels. For system-wide proxy settings, the relevant keys
are located in HKEY_LOCAL_MACHINE.
- Machine-Wide Internet Settings:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings - Group Policy Managed Settings:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings - WinHTTP (Services and System Traffic):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
2. Enforcing Machine-Wide Proxy Over Per-User Settings
By default, Windows applies proxy settings on a per-user basis
(HKEY_CURRENT_USER). To force the entire operating system
to use the settings defined in HKEY_LOCAL_MACHINE, you must
modify the ProxySettingsPerUser policy:
- Navigate to:
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings - Create or modify a DWORD (32-bit) Value named
ProxySettingsPerUser. - Set the value to
0.
Setting this value to 0 makes proxy settings apply to
all users on the computer instead of individual user profiles.
3. Key Values for Configuring the Proxy
Within
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings
(or the equivalent Policies path), the following values
define the proxy behavior:
ProxyEnable(DWORD):1= Proxy enabled
0= Proxy disabled
ProxyServer(String /REG_SZ):- Sets the IP address and port (e.g.,
192.168.1.100:8080orproxy.example.com:8080).
- Sets the IP address and port (e.g.,
ProxyOverride(String /REG_SZ):- Specifies addresses that bypass the proxy, separated by semicolons
(e.g.,
localhost;127.0.0.1;<local>).
- Specifies addresses that bypass the proxy, separated by semicolons
(e.g.,
AutoConfigURL(String /REG_SZ):- Specifies the URL for a PAC (Proxy Auto-Configuration) script if using automatic configuration.
4. Configuring WinHTTP Proxy for System Services
Background system services, such as Windows Update, use the WinHTTP stack rather than the standard Internet Explorer/WinINet stack.
- Registry Location:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections - Value Name:
WinHttpSettings(Binary /REG_BINARY)
Because WinHttpSettings is stored in binary format, it
is standard practice to set it via the Command Prompt using the
following command, which writes directly to the registry:
netsh winhttp set proxy 192.168.1.100:8080 "<local>;*.example.com"To import the proxy already configured in the registry via WinINet to WinHTTP, run:
netsh winhttp import proxy source=ie