How to Configure Proxy Settings on Windows

Overview

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>>.


Variable Notation

Variable Example Description
<<PROXY_ADDRESS>> proxy.example.com:8080 Proxy 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.json Path to the advproxy configuration file

Step 1: Understanding Proxy Types

Type Target Use Case
User-level (WinINET) Logged-in users Browser and user applications. Uses Internet Explorer/Edge proxy settings
System-wide (WinHTTP) System account / OS level Windows 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

$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:

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

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

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

netsh winhttp set proxy <<PROXY_ADDRESS>> "<<PROXY_BYPASS>>"
netsh winhttp show proxy

(2) Modern Method (Windows Server 2022 or later – Recommended)

Create JSON file:

@'
{
  "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:

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):

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)

bitsadmin /util /setieproxy localsystem MANUAL_PROXY <<PROXY_ADDRESS>> "<<PROXY_BYPASS>>"
bitsadmin /util /getieproxy localsystem

Step 5: Verification and Troubleshooting

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.


Reset Proxy Settings

Reset User-Level (WinINET)

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

Reset System-Level (WinHTTP / advproxy)

netsh winhttp reset proxy

For Windows Server 2022 or later:

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

Summary

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.