Skip to content

How to Configure Proxy Settings on Windows

This article explains how to configure proxy settings on Windows, divided into user-level (WinINET) and system-wide (WinHTTP) settings.
For example: ProxyServer = http=<<PROXY_ADDRESS>>;https=<<PROXY_ADDRESS>> — environment-dependent values are denoted as <<variable>>.


VariableExampleDescription
<<PROXY_ADDRESS>>proxy.example.com:8080Proxy server hostname and port number
<<PROXY_BYPASS>>intranet.example.com;192.168.*;<local>Domains, subnets, or local addresses to bypass the proxy (separated by ;)
<<ADVPROXY_SETTINGS_PATH>>C:\proxy-settings.jsonPath to the advproxy configuration file

TypeTargetUse Case
User-level (WinINET)Logged-in usersBrowser and user applications. Uses Internet Explorer/Edge proxy settings
System-wide (WinHTTP)System account / OS levelWindows Update, BITS, Defender updates, and other system communications

BITS (Background Intelligent Transfer Service) is used for background data transfer, including Windows Update and Defender definition updates.
Since it runs under the LocalSystem account, it does not inherit user-level (WinINET) proxy settings.


Step 2: Set User-Level Proxy with PowerShell

Section titled “Step 2: Set User-Level Proxy with PowerShell”
Terminal window
$proxy = "<<PROXY_ADDRESS>>"
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" `
-Name ProxyEnable -Value 1
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" `
-Name ProxyServer -Value "http=$proxy;https=$proxy"
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" `
-Name ProxyOverride -Value "<<PROXY_BYPASS>>"

Verify:

Terminal window
Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | Select ProxyEnable, ProxyServer, ProxyOverride

Step 3: Configure System-Wide Proxy (WinHTTP / BITS)

Section titled “Step 3: Configure System-Wide Proxy (WinHTTP / BITS)”

(1) Legacy Method (Windows Server 2019 or earlier)

Section titled “(1) Legacy Method (Windows Server 2019 or earlier)”
Terminal window
netsh winhttp set proxy <<PROXY_ADDRESS>> "<<PROXY_BYPASS>>"
netsh winhttp show proxy

Section titled “(2) Modern Method (Windows Server 2022 or later - Recommended)”

Create JSON file:

Terminal window
@'
{
"ProxyIsEnabled": true,
"Proxy": "http=<<PROXY_ADDRESS>>;https=<<PROXY_ADDRESS>>",
"ProxyBypass": "<<PROXY_BYPASS>>",
"AutoConfigIsEnabled": false,
"AutoDetect": false
}
'@ | Out-File "<<ADVPROXY_SETTINGS_PATH>>" -Encoding ascii

Apply configuration:

Terminal window
netsh winhttp set advproxy setting-scope=machine settings-file="<<ADVPROXY_SETTINGS_PATH>>"

Alternatively, you can set it directly via command without JSON file (useful for testing or temporary environments):

Terminal window
netsh winhttp set advproxy setting-scope=machine settings='{\"ProxyIsEnabled\":true,\"Proxy\":\"http=<<PROXY_ADDRESS>>;https=<<PROXY_ADDRESS>>\",\"ProxyBypass\":\"<<PROXY_BYPASS>>\",\"AutoConfigIsEnabled\":false,\"AutoDetect\":false}'

Step 4: Apply Proxy for BITS (LocalSystem Account)

Section titled “Step 4: Apply Proxy for BITS (LocalSystem Account)”
Terminal window
bitsadmin /util /setieproxy localsystem MANUAL_PROXY <<PROXY_ADDRESS>> "<<PROXY_BYPASS>>"
bitsadmin /util /getieproxy localsystem

Terminal window
netsh winhttp show proxy
Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | Select ProxyEnable, ProxyServer, ProxyOverride

If Windows Update fails through a proxy, disable AutoDetect and use the advproxy command format on Server Core.


Terminal window
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyEnable -Value 0
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyOverride -ErrorAction SilentlyContinue
Terminal window
netsh winhttp reset proxy

For Windows Server 2022 or later:

Terminal window
netsh winhttp set advproxy setting-scope=machine settings='{\"Proxy\":\"\",\"ProxyBypass\":\"\",\"AutoconfigUrl\":\"\",\"AutoDetect\":false}'

Windows provides two layers of proxy configuration: WinINET (user-level) and WinHTTP / advproxy (system-level).

  • WinINET affects browsers and user apps (IE/Edge).
  • WinHTTP / advproxy affects system services (Windows Update, BITS, Defender).

For Windows Server 2022 or later, advproxy is recommended, though winhttp remains backward compatible.
Using bitsadmin, you can correctly apply the proxy for LocalSystem operations.

Operational guidelines:

  1. Identify target layer (user or system).
  2. Configure corresponding proxy type (WinINET / WinHTTP).
  3. Use advproxy on Server Core.
  4. Use reset proxy / reset advproxy when cleaning up.

Proper configuration ensures reliable Windows Update, Defender updates, and BITS transfers even in proxy-restricted environments.