WinHTTP vs WinINet: Why Windows Services Ignore Your Browser Proxy and How to Fix It
Table of contents
- Introduction: why you need to understand winhttp when your browser proxy already works
- Preparation: tools, access, backups
- Core concepts: two network stacks inside one windows
- Step 1: determine which stack a specific application uses
- Step 2: correctly configure wininet for user programs
- Step 3: configure winhttp via netsh for services and system components
- Step 4: proxy for the system, networkservice and localservice accounts
- Step 5: proxy for programs that bypass both stacks
- Step 6: diagnostics when everything is configured but nothing works
- Verifying the result: a full checklist
- Common mistakes and how to fix them
- Additional capabilities: auto-discovery, policies, deployment
- Faq: common questions about winhttp and wininet configuration
- Conclusion
Introduction: Why You Need to Understand WinHTTP When Your Browser Proxy Already Works
Sound familiar? You've configured a proxy in Windows settings, your browser happily uses it, but Windows Update, Defender, a PowerShell script in Task Scheduler, or your own service on a server keeps trying to reach the internet directly. Or, conversely, it can't connect at all and fails with a timeout error. The cause is almost always the same: Windows has two separate network stacks, WinINet and WinHTTP, and each has its own proxy settings. The browser uses one, services use the other. Until you configure both, part of the system will bypass the proxy.
This guide fully covers the Windows stack. We won't rehash the general proxy configuration levels already covered elsewhere. Here we focus only on what happens inside Windows itself: how the system decides which proxy to use, where these settings are stored, how to set them for services, for the SYSTEM account, and for programs that ignore both stacks.
What You'll Get Out of This
- An understanding of which application uses which stack and why.
- Correctly configured WinINet for user programs with a proper exception list.
- WinHTTP configured via netsh so services and system components route through your proxy.
- A proxy for the LocalSystem, NetworkService and LocalService accounts.
- A proxy for console utilities, .NET, Java, Python and other programs that read their own settings.
- A set of commands for verification, diagnostics and rolling back all changes.
Who This Guide Is For
For junior and mid-level system administrators, developers deploying their services on Windows, and experienced users who need the proxy to work system-wide, not just in the browser. If you've never opened an administrator command prompt, don't worry: every step is spelled out click by click.
What You Need to Know Beforehand
- How to open Command Prompt or PowerShell with administrator rights.
- What a proxy server address and port are. Example: proxy.example.net on port 8080.
- A basic understanding of the Windows registry: it's a tree of keys and values, and it's best not to touch it without a backup.
How Long It Will Take
Reading and digesting the basic concepts takes about fifteen minutes. Full WinINet and WinHTTP configuration with verification fits into half an hour. Configuring the proxy for system accounts and third-party programs adds roughly the same again. Budget about an hour if you're doing it all for the first time, and after the first pass you'll be repeating it in a few minutes.
Preparation: Tools, Access, Backups
Before you change anything in the system, gather everything you need. This saves time and protects you from discovering halfway through that you lack admin rights or forgot the proxy port.
System Requirements
- Windows 10, Windows 11 or Windows Server of any current edition. The netsh winhttp commands and registry structure are the same across all these versions.
- An account with local administrator rights. Without it you can't change WinHTTP settings, since they're stored in a machine-wide registry hive.
- Access to the cmd.exe command prompt and PowerShell. Both tools are built into the system; nothing needs to be installed.
Proxy Details to Keep at Hand
- The proxy server address. This can be an IP address or a domain name. The examples below use a fictional address, proxy.example.net.
- The HTTP proxy port. In the examples this is 8080.
- The SOCKS5 port, if your provider offers one. As of 09/22/2026, Proxeon follows a simple rule: the SOCKS5 port equals the HTTP port plus one. So if the HTTP port is 8080, the SOCKS5 port is 8081. This will come in handy in the step on programs that support SOCKS.
- The authentication method. A username and password, or IP-based authorization tied to your machine's address. This is critical: WinHTTP configured through netsh cannot supply a proxy username and password. For services you need either a proxy with IP-based authorization or a local intermediary proxy that handles authentication for you. More on this in the step on common mistakes.
Creating a Backup
Everything we're going to change is stored in the registry. Export two hives before you begin. It takes a minute, and rolling back later amounts to double-clicking a file.
- Press Win+R, type regedit and press Enter. Confirm the User Account Control prompt.
- In the registry editor's address bar, paste the path HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings and press Enter.
- Right-click the Internet Settings folder in the left pane, select Export, and save the file as wininet-backup.reg on your desktop.
- Now navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections and export it to a file called winhttp-backup.reg the same way.
- Additionally, save the current WinHTTP state as text. Open an administrator command prompt and run netsh winhttp show proxy. Copy the output into any text file.
Tip: If you're working on a server, create a restore point or a virtual machine snapshot before making changes. A wrong WinHTTP proxy can temporarily cut the server off from Windows Update and activation, and a snapshot restores everything in seconds.
Verification: You now have two .reg files and a text file with the netsh output on your desktop. If the output shows Direct access (no proxy server), WinHTTP isn't configured yet, and that's your starting point.
Core Concepts: Two Network Stacks Inside One Windows
To make this configuration deliberate rather than mechanical, let's break down what exactly happens when a program on Windows wants to open a web address. There aren't many terms, but they're key.
WinINet: The Stack for Programs with a User Interface
WinINet is a library Microsoft originally created for Internet Explorer. It handles cookies, caching, password prompts and other things an interactive application needs. Its proxy settings are stored in the current user's profile, under the HKEY_CURRENT_USER hive. These are the settings you see when you open Settings, then Network & Internet, then Proxy. The same settings are used by Edge, Chrome, most desktop programs, Windows PowerShell 5.1 via .NET, and many installers.
An important feature: WinINet is tied to the user. Each user has their own settings. When nobody is logged in, there are effectively no user settings, and background programs have nothing to read.
WinHTTP: The Stack for Services and Server-Side Code
WinHTTP is a different library, built specifically for server and background scenarios. It has no dialog boxes and no interactive authentication, but it works reliably from services, under the SYSTEM account and without a user logged in. Its proxy settings are stored in the HKEY_LOCAL_MACHINE hive and are shared machine-wide. They're configured with the netsh winhttp command. Windows Update, the activation service, Defender when updating signatures, BITS services, some Intune and System Center components, and any services and apps developers built on this library all run through WinHTTP.
Why a Service Doesn't See the Browser's Proxy
Now the picture is complete. You configured a proxy in Windows settings. It was written to HKEY_CURRENT_USER for your user. The Windows Update service runs as SYSTEM, reads WinHTTP settings from HKEY_LOCAL_MACHINE, and finds nothing there: direct access. The service goes direct, and if there's no direct internet access, it gets an error. Meanwhile the browser works fine. There's no error or bug here, just two different settings stores.
The Third Category: Programs That Use Neither
There's another group, and it's the one most often forgotten. The curl.exe utility built into Windows, Python with the requests library, Git, Node.js, Java applications and Go programs read their own settings: HTTP_PROXY and HTTPS_PROXY environment variables, values in config files or launch parameters. They don't care what you put in WinINet and WinHTTP. We'll handle them in a separate step.
The Exception List and Why You Need It
The exception list, also known as the bypass list, is a set of addresses that should be reached directly, bypassing the proxy. A classic example: internal company servers, addresses like 192.168.x.x, localhost itself. If you forget about exceptions, local services will start going through the external proxy and either stop working or do so slowly. WinINet and WinHTTP have separate exception lists, and their syntax differs slightly; we'll cover that in practice.
Tip: Remember a simple rule. If a human launches the program and it has a window, it's most likely WinINet. If it's a service, a system update or something that runs without a user logged in, it's most likely WinHTTP. If it's a console utility or code written in a programming language, it almost certainly reads environment variables.
Step 1: Determine Which Stack a Specific Application Uses
Goal of this stage: stop guessing and know for sure which mechanism a program uses to look up the proxy. After that, you'll know which of the following steps apply to you.
Method One: By Behavior
- Set the proxy only in the user-level Windows settings. How to do this is described in Step 2, but for now the current state is enough if a proxy is already set there.
- Open your browser and visit any site that shows your external IP. If you see the proxy's IP, WinINet is configured and working.
- Launch the problem program or service. If it can't connect but the browser can, it's very likely using WinHTTP or reading environment variables.
- Run netsh winhttp show proxy in an administrator command prompt. If the output shows Direct access and the service isn't working, that's your cause.
Method Two: By Loaded Libraries
This method is more precise. Any program using a particular stack loads the corresponding library into memory: wininet.dll or winhttp.dll.
- Open Task Manager with Ctrl+Shift+Esc and find the process for the program in question. Note its name, for example MyService.exe.
- Open PowerShell as administrator: press Win+X and select Terminal (Admin) or Windows PowerShell (Admin).
- Run the following command, substituting your process name without the extension:
(Get-Process MyService).Modules | Where-Object { $_.ModuleName -match 'wininet|winhttp' } | Select-Object ModuleName - Look at the result. If the list contains winhttp.dll, the program uses WinHTTP. If it contains wininet.dll, it uses WinINet. If it contains both, the program may use both stacks for different tasks, and you'll need to configure both.
- If the list is empty, the program most likely uses its own network code and reads environment variables or its own config. Move on to Step 5.
Note: For services running as SYSTEM, the command may return an access error even from an administrator PowerShell. In that case, use Process Explorer from the Sysinternals suite: open it as administrator, select the process, press Ctrl+D for the loaded DLL panel, and look for wininet.dll or winhttp.dll in the list.
Method Three: By Service Account
- Press Win+R, type services.msc and press Enter.
- Find the service you need, double-click it and open the Log On tab.
- Note which account it runs under: Local System, Network Service, Local Service or a specific user.
You'll need this in Step 4. A service running as a specific user can read that user's WinINet settings. A service running under a system account effectively has no WinINet settings of its own and relies on WinHTTP.
Verification: You now have a table: program or service name, account, stack in use. For Windows Update, Defender and BITS you can immediately write down WinHTTP, for browsers WinINet, for curl.exe environment variables.
Possible Issues
- The Get-Process command can't find the process. Make sure the service is running and verify the name in Task Manager on the Details tab.
- The program loads both libraries. That's normal for large products. Configure both stacks; it won't hurt.
Step 2: Correctly Configure WinINet for User Programs
Goal of this stage: get correct user-level proxy settings with exceptions that you can later import into WinHTTP with a single command. This is the foundation for the next step.
Configuring Through Windows Settings
- Press Win+I to open Settings.
- Go to Network & Internet, then select Proxy.
- Find the Manual proxy setup block and click the Set up button next to Use a proxy server.
- In the window that opens, toggle Use a proxy server to On.
- In the Proxy IP address field, enter the address, for example proxy.example.net. In the Port field, enter 8080.
- In the large exceptions field, list addresses that should go direct, separated by semicolons. A reasonable minimum:
localhost;127.0.0.1;*.local;192.168.*;10.*. Add your own internal domains. - Check the box Don't use the proxy server for local addresses. This adds a special value, local in angle brackets, meaning all addresses without a dot in the name.
- Click Save.
Alternative: Configuring via the Registry or Commands
If you need to repeat the setup across multiple machines or script it, use the registry. Run the following in PowerShell as the user you're configuring:
$path = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings'; Set-ItemProperty -Path $path -Name ProxyEnable -Value 1; Set-ItemProperty -Path $path -Name ProxyServer -Value 'proxy.example.net:8080'; Set-ItemProperty -Path $path -Name ProxyOverride -Value 'localhost;127.0.0.1;*.local;192.168.*;10.*;<local>'There are three values being set here worth remembering. ProxyEnable turns the proxy on or off; a value of one means on. ProxyServer stores the address and port. ProxyOverride stores the exception list. If you need different proxies for different protocols, ProxyServer takes a string like http=proxy.example.net:8080;https=proxy.example.net:8080.
Tip: After editing the registry directly, some already running programs won't pick up the new settings until restarted. Closing and reopening the browser is enough. Explorer and system components usually reread settings on their own.
About Authentication in WinINet
WinINet can show a prompt for the proxy username and password and remember them. Browsers do this themselves. But for scripts and background programs, no one will see the prompt, and they'll get a 407 Proxy Authentication Required response. That's why for system-wide configuration it's better to use a proxy with IP-based authorization tied to your machine's address. At Proxeon this mode is configured in your account dashboard: you add your machine's or server's external IP to the allow list, and after that no username or password is required.
Verification: Open your browser, visit an IP-checking site and confirm the proxy address is shown. Then open PowerShell without administrator rights and run [System.Net.WebRequest]::DefaultWebProxy.GetProxy('https://example.com'). The response should contain your proxy address with its port. If example.com itself is returned, the proxy isn't being applied to that address.
Possible Issues
- The toggle in Settings is grayed out and unavailable. The setting is locked by Group Policy. Check the HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel hive for a Proxy value set to 1, or contact your domain administrator.
- Settings reset after a reboot. They're being overwritten by Group Policy or a startup script. Find the source; direct registry editing won't help here.
Step 3: Configure WinHTTP via netsh for Services and System Components
Goal of this stage: Windows services, updates, Defender and any programs on WinHTTP start routing through your proxy. This is the most important step in the guide.
Option A: Import from WinINet Settings
The fastest path if you've already configured everything in Step 2. The command copies the proxy address and exception list from the current user's settings into the system-wide WinHTTP settings.
- Open a command prompt as administrator: press Win+S, type cmd, right-click the Command Prompt result and select Run as administrator.
- Run the command:
netsh winhttp import proxy source=ie - Immediately verify the result with the command:
netsh winhttp show proxy - You should see the Current WinHTTP proxy settings block with your address on the Proxy Server line and the list on the Bypass List line.
Note: The import takes the settings of the user under which the command prompt was launched. If you're logged in as one user but launched the command prompt as a different administrator, the administrator's settings get imported. If they have no proxy configured, direct access gets written to WinHTTP. Always verify the result with the show proxy command.
Option B: Explicitly Setting the Address and Exceptions
This method is more reliable for scripts and servers because it doesn't depend on user settings.
- In an administrator command prompt, run:
netsh winhttp set proxy proxy-server="proxy.example.net:8080" bypass-list="<local>;localhost;127.0.0.1;*.local;192.168.*;10.*" - If you need different proxies for HTTP and HTTPS, use the form:
netsh winhttp set proxy proxy-server="http=proxy.example.net:8080;https=proxy.example.net:8080" bypass-list="<local>;*.local" - Verify the result:
netsh winhttp show proxy
Let's break down the syntax, since this is where mistakes happen most often. Parameter values go in quotes. Addresses in the exception list are separated by semicolons. The asterisk works as a wildcard: *.local means any address ending in .local, and 192.168.* means all addresses starting with 192.168. The word local in angle brackets means all names without a dot, i.e. short machine names on the local network. It's best not to put spaces inside the quotes.
Where This Is Stored
The command writes the binary value WinHttpSettings to the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections. Don't edit it by hand; the format is binary and unwieldy. But knowing the location is useful: if you need to move the settings to another machine, you can export this key to a .reg file and import it there.
How to Restart Services So They See the Proxy
WinHTTP settings are read when a service starts or a session is created. Some services reread them on the fly; others require a restart. Rather than guess, restart the main ones:
- Run in an administrator command prompt:
net stop wuauserv && net start wuauservfor the Windows Update service. - Run:
net stop bits && net start bitsfor the Background Intelligent Transfer Service. - If you configured a proxy for your own service, restart it through services.msc: right-click the service and select Restart.
Tip: Check that Windows Update uses the proxy without waiting for a scheduled update. Open Settings, go to Windows Update and click Check for updates. If you had a connection error before and the check now starts, WinHTTP is configured correctly. You can view details with the Get-WindowsUpdateLog command in PowerShell, which collects the log into a file on your desktop.
Rolling Back WinHTTP Settings
If something goes wrong, the reset takes one command: netsh winhttp reset proxy. After that, show proxy will again display direct access. It's safe and fully returns the system to its original state.
Verification: The netsh winhttp show proxy command shows your address and exception list. Windows Update starts checking for updates without connection errors. If there's a WinHTTP-based service in the system that previously couldn't connect, it works after a restart.
Possible Issues
- An Access denied error when running netsh. The command prompt wasn't launched with administrator rights. Close it and reopen as administrator.
- The command ran, but show proxy shows direct access. You probably used import for a user whose proxy is disabled. Use Option B with an explicit address.
- The service still won't connect. Verify the proxy is reachable from this machine:
Test-NetConnection proxy.example.net -Port 8080in PowerShell. The TcpTestSucceeded field should be True. If it's False, the problem is with the network or the address, not WinHTTP. - The service gets a 407 response. Your proxy requires a username and password, and WinHTTP via netsh doesn't pass them. Switch the proxy to IP-based authorization.
Step 4: Proxy for the SYSTEM, NetworkService and LocalService Accounts
Goal of this stage: cover the special case where a service or scheduled task runs under a system account and uses WinINet rather than WinHTTP. After this step, the system accounts will have their own proxy settings.
Why This Is a Separate Step
Not every service is written on WinHTTP. Many programs, especially .NET ones, continue reading user-level WinINet settings when running as a service. But the Local System account, which the registry identifies as S-1-5-18, has its own profile under the HKEY_USERS hive. Its proxy settings are empty by default. Your settings from Step 2 are in your user's profile, and SYSTEM can't see them. Network Service is S-1-5-20, Local Service is S-1-5-19, and each has its own profile.
Method One: The bitsadmin Utility
Windows has an old but working utility that can set the WinINet proxy specifically for system accounts.
- Open an administrator command prompt.
- For the Local System account, run:
bitsadmin /util /setieproxy localsystem MANUAL_PROXY proxy.example.net:8080 "<local>;*.local;192.168.*" - For Network Service, run the same command, replacing localsystem with networkservice.
- For Local Service, replace with localservice.
- To verify, run:
bitsadmin /util /getieproxy localsystem. The output should contain your proxy address.
To restore direct access, use the same command with the NO_PROXY parameter instead of MANUAL_PROXY, and no address.
Method Two: Editing the Registry in the System Account's Profile
This method does the same thing but is more transparent and easy to include in deployment scripts.
- Open PowerShell as administrator.
- Run for Local System:
$p = 'Registry::HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\Internet Settings'; New-Item -Path $p -Force | Out-Null; Set-ItemProperty -Path $p -Name ProxyEnable -Value 1 -Type DWord; Set-ItemProperty -Path $p -Name ProxyServer -Value 'proxy.example.net:8080'; Set-ItemProperty -Path $p -Name ProxyOverride -Value '<local>;*.local;192.168.*' - For Network Service, repeat with S-1-5-20; for Local Service, with S-1-5-19.
- Restart the service you did this for.
Note: The S-1-5-18 hive in HKEY_USERS is a link to the .DEFAULT hive. Don't edit .DEFAULT by hand; use the identifier so it's clear what you're changing. And never delete anything in these hives except the three proxy values.
Method Three: Seeing Through SYSTEM's Own Eyes
The most convincing way to confirm the setting worked is to view the world through the SYSTEM account. This requires the PsExec utility from the Sysinternals suite.
- Extract the Sysinternals suite into any folder, for example C:\Tools.
- Open an administrator command prompt and change into that folder with cd C:\Tools.
- Run:
psexec -s -i cmd.exe. A new command prompt window opens running as SYSTEM. Confirm this with the whoami command, which should output nt authority\system. - In this window, run:
netsh winhttp show proxy. You'll see the system-wide WinHTTP settings. - Launch powershell and run:
[System.Net.WebRequest]::DefaultWebProxy.GetProxy('https://example.com'). If you configured WinINet for SYSTEM, you'll see the proxy address. - Run:
Invoke-WebRequest https://example.com -UseBasicParsing | Select-Object StatusCode. A code of 200 means the connection succeeded.
Tip: Keeping a SYSTEM window open during the whole debugging process is convenient. Run any problem command or scheduled task script in it, and you'll immediately see the same errors the service sees, without waiting or reading logs.
Verification: The bitsadmin /util /getieproxy localsystem command shows your proxy. In the PsExec window, the Invoke-WebRequest request returns a 200 code. A service running as SYSTEM connects to the internet after a restart.
Possible Issues
- bitsadmin isn't found. The utility exists in all modern versions, but its path may not be in the PATH variable. Run it with the full path C:\Windows\System32\bitsadmin.exe.
- PsExec is blocked by antivirus. This is a known behavior; the utility is often flagged as potentially dangerous. Add it to exceptions while you work, or use the registry method.
- The service runs under a specific domain user. In that case, configure WinINet for that user: log in as them and complete Step 2, or find their identifier in HKEY_USERS and apply the registry method.
Step 5: Proxy for Programs That Bypass Both Stacks
Goal of this stage: get curl, Python, Git, Java, Node.js and other tools using the proxy. After this step, no components in the system will go direct against your wishes.
HTTP_PROXY and HTTPS_PROXY Environment Variables
Most cross-platform tools read three variables: HTTP_PROXY for regular requests, HTTPS_PROXY for secure ones, and NO_PROXY for exceptions. You can set them for the current user or machine-wide.
- Press Win+R, type sysdm.cpl and press Enter.
- Go to the Advanced tab and click the Environment Variables button.
- To configure machine-wide, click New in the lower System variables block.
- In the Variable name field, enter HTTP_PROXY; in the Variable value field, enter http://proxy.example.net:8080. Click OK.
- Repeat for HTTPS_PROXY with the same value. Note: the value starts with http, not https, because that's the scheme for connecting to the proxy itself, not to the target site.
- Create NO_PROXY with the value localhost,127.0.0.1,.local,192.168.0.0/16. Here the separator is a comma, not a semicolon, which differs from WinINet and WinHTTP.
- Click OK in all windows. Close and reopen all consoles; they read variables at startup.
Alternative via an administrator command prompt: setx /M HTTP_PROXY http://proxy.example.net:8080 and similarly for the rest. The /M switch sets the variable machine-wide; without it, it applies only to the current user.
Tip: Some tools read only lowercase variable names, others only uppercase. To avoid such surprises, set both versions: HTTP_PROXY and http_proxy with identical values. Windows doesn't distinguish case in variable names in the GUI, so create the second one via setx.
If the Proxy Requires a Username and Password
You can embed credentials in the environment variables in the format http://username:password@proxy.example.net:8080. This works, but the password is stored in plain text in the registry and visible to any process. For servers and shared machines, use IP-based authorization and set the variables without credentials.
Specifics of Particular Tools
curl.exe
The curl built into Windows reads environment variables automatically. For a one-off request, it's easier to specify the proxy with a flag: curl.exe -x http://proxy.example.net:8080 https://example.com. This also works as a quick test of proxy availability without changing any settings.
PowerShell 7 and Windows PowerShell 5.1
Windows PowerShell 5.1 via .NET Framework uses the current user's WinINet settings. PowerShell 7 on Windows also reads user-level WinINet settings by default, and falls back to environment variables when they're absent. In both cases, you can set the proxy explicitly for a script: Invoke-WebRequest https://example.com -Proxy http://proxy.example.net:8080. This is the most reliable option for scheduled tasks.
.NET Applications and Your Own Services
If you're deploying a service on .NET Framework and don't want to depend on a user profile, set the proxy in the application config file, named AppName.exe.config and located next to the executable. Inside the configuration section, add a system.net section with a defaultProxy element, whose proxy element contains the proxyaddress attribute set to http://proxy.example.net:8080 and the bypassonlocal attribute set to true. An application on modern .NET reads the HTTP_PROXY and HTTPS_PROXY environment variables unless HttpClient is explicitly configured.
Java
Java applications ignore both WinINet and environment variables unless told otherwise. The proxy is set with launch flags: java -Dhttp.proxyHost=proxy.example.net -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.example.net -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts="localhost|*.local" -jar app.jar. For Java services, these flags are added to the service launch parameters.
Git and npm
Git reads environment variables, but it's more reliable to set the proxy in its settings: git config --global http.proxy http://proxy.example.net:8080. For npm: npm config set proxy http://proxy.example.net:8080 and the same for https-proxy.
Python
The requests library reads environment variables automatically. The urllib library does too. If you need to set the proxy in code, pass a proxies dictionary with http and https keys with each request.
When to Use the SOCKS5 Port
Neither WinINet nor WinHTTP supports SOCKS5 in modern Windows versions. For the entire Windows stack, use the HTTP port. But some tools support SOCKS5 and work more reliably through it, for example curl, Python with an additional module, Git, many messengers and database clients. As of 09/22/2026, Proxeon's SOCKS5 port equals the HTTP port plus one: with an HTTP port of 8080, SOCKS5 is on 8081. In curl it looks like this: curl.exe -x socks5h://proxy.example.net:8081 https://example.com. The h at the end of the scheme means site names will be resolved on the proxy side rather than locally, which is usually what you want.
Verification: In a new console, the curl.exe https://example.com -v command shows a line in the verbose output connecting to the proxy address rather than to example.com directly. The Get-ChildItem Env:HTTP_PROXY command in PowerShell outputs your address.
Possible Issues
- The variables are set but the program doesn't see them. It was launched from a console opened before the variables changed. Close all consoles and terminals and reopen them.
- A Java service doesn't see the environment variables. This is expected; Java doesn't read them. Use launch flags.
- curl reports a SOCKS error. Verify that you used the SOCKS5 port, i.e. the HTTP port plus one, not the HTTP port.
Step 6: Diagnostics When Everything Is Configured but Nothing Works
Goal of this stage: get a set of tools that in a few minutes show you exactly where the chain breaks: in settings, in the network, in authentication or in the application itself.
Checking Proxy Reachability from the Machine
- Open PowerShell and run:
Test-NetConnection proxy.example.net -Port 8080. - Look at the TcpTestSucceeded field. True means the port is open and the proxy accepts connections. False means there's no network path to the proxy: wrong address, port closed on the firewall, or the proxy is down.
- Repeat for SOCKS5 port 8081 if you plan to use it.
Testing the Proxy Itself Without the Windows Stack
The command curl.exe -x http://proxy.example.net:8080 https://example.com -I sends a request through the proxy directly, bypassing all system settings. If it returns headers with a 200 code, the proxy is healthy and passing traffic. If it returns 407, the proxy requires authentication and your IP isn't on the allow list. If it hangs and times out, the problem is network-related.
Checking Which Route a Specific Application Takes
- Open PowerShell as administrator.
- Launch the problem application, and while it's trying to connect, run:
Get-NetTCPConnection -State Established,SynSent | Where-Object { $_.RemotePort -in 80,443,8080,8081 } | Select-Object OwningProcess,RemoteAddress,RemotePort. - Find your process in the list by the OwningProcess identifier. If the RemoteAddress field shows the proxy address and port 8080, the application is going through the proxy. If it shows the target site's address and port 443, it's going direct, and your settings haven't reached it.
Reading Windows Update Logs
If the problem is specifically with updates, run the Get-WindowsUpdateLog command in an administrator PowerShell. A WindowsUpdate.log file will appear on your desktop after a minute. Open it and search for lines mentioning Proxy. There you'll see which proxy the service tried to use and what error code it got. Code 0x80072EE2 means a timeout, usually the proxy is unreachable or unset. Code 0x80072EFD indicates an inability to establish a connection. Code 0x80072F8F is usually related to a certificate validation error, which occurs when the proxy substitutes HTTPS certificates.
Capturing Traffic for Complex Cases
When nothing else helps, use a debugging proxy such as Fiddler or mitmproxy running locally. Set its address 127.0.0.1 with its port in WinHTTP and WinINet, and you'll see every request from every application, including authorization attempts and 407 responses. After debugging, don't forget to restore the real proxy.
Note: Debugging proxies substitute HTTPS certificates, and Windows Update and Defender may refuse to work through them due to certificate validation. Use them only to analyze your own applications and never leave them enabled permanently.
Verification: You can now answer four questions in a minute: is the proxy reachable over the network, does it accept requests without authentication, which route does each application take, and what's written in the update log.
Verifying the Result: A Full Checklist
Go through this list from top to bottom. If the answer is yes at every point, the Windows stack configuration is complete.
Settings Checklist
- In Settings, under Proxy, manual proxy is enabled with your address and port, and the exception list is filled in.
- The netsh winhttp show proxy command shows the same address and the same exception list.
- The bitsadmin /util /getieproxy localsystem command shows the proxy for the SYSTEM account, if you have WinINet services under that account.
- The HTTP_PROXY, HTTPS_PROXY and NO_PROXY variables are set at the system level, if you use console tools.
- The proxy is configured for IP-based authorization, or you're deliberately using a local intermediary proxy that supplies credentials.
Verification Checklist
- The browser shows the proxy's external IP.
- The
Invoke-WebRequest https://example.com -UseBasicParsingcommand in the user's PowerShell returns a 200 code. - The same command in the PsExec window as SYSTEM returns a 200 code.
- Windows Update checks for updates without connection errors.
- The
curl.exe https://example.com -Icommand in a new console returns headers with a 200 code, and the verbose output shows a connection to the proxy. - Your own service connects to external resources after a restart.
- Internal addresses from the exception list open directly and quickly.
Indicators of Success
The main indicator: no component in the system makes outbound connections on ports 80 and 443 to external addresses bypassing the proxy. Check this with the Get-NetTCPConnection command from Step 6 when there's activity in the system: an update, your services running, the browser. All connections to the outside world should go to the proxy address. The second indicator: no connection errors in the Windows Update log. The third: internal resources work as before, without slowing down or failing because of an attempt to go through the external proxy.
Common Mistakes and How to Fix Them
Windows Update Doesn't See the Proxy After Configuring It in Settings
Cause: Windows Update runs as SYSTEM through WinHTTP, but you only configured your user's WinINet. Fix: run netsh winhttp set proxy with the address and exceptions from Step 3 and restart the wuauserv service.
A Service Gets a 407 Proxy Authentication Required Response
Cause: the proxy requires a username and password, and WinHTTP via netsh and WinINet without an interactive prompt don't pass them. Fix: enable IP-based authorization for your machine's address in the proxy provider's dashboard. If that's not possible, deploy a local intermediary proxy that accepts connections without authentication on 127.0.0.1 and adds the credentials itself when connecting to the external proxy, then set its address in WinHTTP.
After netsh winhttp import proxy source=ie the Settings Are Empty
Cause: the administrator command prompt was launched under a different user who has no proxy configured. Fix: use explicit configuration via set proxy, which doesn't depend on the user profile.
Local Sites and Internal Services Stopped Loading
Cause: the exception list isn't filled in, so requests to internal addresses go to the external proxy, which doesn't know them. Fix: add internal network and domain masks to the WinHTTP bypass-list and WinINet ProxyOverride, and don't forget the local value in angle brackets. In NO_PROXY for environment variables, use commas as the separator.
WinHTTP Settings Reset After a Reboot
Cause: they're being overwritten by Group Policy, a logon script or a configuration management tool. Fix: find the source. Check the Group Policy log with the gpresult /h report.html command and search the report for proxy settings. If a policy exists, change settings through it rather than locally.
A Task Scheduler Script Doesn't See the Proxy, Though It Works Manually
Cause: the task runs as SYSTEM or another user who doesn't have your WinINet settings, and the script uses Invoke-WebRequest. Fix: either configure the proxy for SYSTEM per Step 4, or specify the proxy in the script itself with the -Proxy parameter. The second option is more reliable because it doesn't depend on the environment.
The Program Loads winhttp.dll but Ignores netsh Settings
Cause: the program's developer explicitly specified direct access when creating the WinHTTP session, or used WPAD auto-discovery instead of the default settings. Fix: look for a proxy setting in the program itself or its config file. If there isn't one, only auto-discovery via a PAC file will help, covered in the next section.
curl and Python Work Through the Proxy but a Java Application Doesn't
Cause: Java doesn't read environment variables. Fix: pass the proxy parameters with -D flags at launch, as shown in Step 5.
Error 0x80072F8F in the Windows Update Log
Cause: the proxy or an intermediary device substitutes HTTPS certificates, and the update service doesn't allow this. Fix: make sure there's no proxy with traffic decryption between the machine and Microsoft's servers. If you used a debugging proxy, restore the regular one.
Additional Capabilities: Auto-Discovery, Policies, Deployment
PAC Files for Flexible Rules
If your exception list keeps growing and you want to route different sites through different proxies, use a PAC file. It's a small JavaScript script with a FindProxyForURL function that returns, for each address, which proxy to use or to go direct. In WinINet it's specified in Settings in the Script address field of the Use setup script section. WinHTTP via netsh doesn't support PAC files directly, but WinHTTP programs can use auto-discovery if the developer enabled it. For such programs, the PAC file is published at the address set in WinINet, and they find it.
Group Policy for a Domain
If you have many machines, configuring each by hand isn't reasonable. For WinINet, use the User Configuration, Administrative Templates, Windows Components, Internet Explorer section in the Group Policy editor. For WinHTTP there's no direct policy, but you can deploy a startup script with the netsh winhttp set proxy command via Computer Configuration, Policies, Windows Settings, Scripts, Startup. Environment variables can also be deployed through Administrative Templates under System, Environment.
Full Deployment Script
Assemble all the commands from this guide into a single PowerShell script that runs as administrator on a new machine. The sequence: set WinINet for the current user via the registry, run netsh winhttp set proxy, apply bitsadmin for the three system accounts, set variables via setx with the /M switch, restart wuauserv and bits, and finally output netsh winhttp show proxy for verification. Keep the script alongside the .reg backup files so on any machine you can both apply and roll back the settings in a minute.
Splitting HTTP and HTTPS Across Different Proxies
Both WinINet and WinHTTP support the protocol-specific syntax: http=address:port;https=address:port. This is handy if you have multiple proxies with different loads or want HTTPS traffic to go through a faster channel. For environment variables, simply set different values in HTTP_PROXY and HTTPS_PROXY.
Monitoring for Connections That Bypass the Proxy
For servers, it's useful to set up a simple scheduled task that runs the Get-NetTCPConnection command from Step 6 every few minutes and logs to a file any connections to external addresses on ports 80 and 443 that don't match the proxy address. If the file starts filling up, a program that bypasses your settings has appeared, and you'll know before you face the consequences.
Tip: A Windows Firewall rule blocking outbound connections on ports 80 and 443 for all programs except connections to the proxy address turns your settings from a recommendation into a requirement. Any program that tries to go direct simply won't be able to, and you'll quickly find it in the firewall log. Implement such a rule only after all the checklist verifications have passed successfully.
FAQ: Common Questions About WinHTTP and WinINet Configuration
Do I Need to Configure Both Stacks on an Ordinary Home Computer
If it's enough for you that the browser works through the proxy, WinINet is sufficient. If you want system updates, Defender and background services to go through the proxy, you need WinHTTP too. Configuration via netsh takes one command, so it's easier to do both.
Can I Set a Proxy with a Username and Password in WinHTTP
Not through netsh. The command accepts only an address and port. WinHTTP programs can pass credentials themselves if the developer provided for it, but system services like Windows Update don't. Use IP-based authorization or a local intermediary proxy.
Does WinHTTP Support SOCKS5
No. Neither WinHTTP nor WinINet supports SOCKS5 in modern Windows versions. For system settings, use the HTTP port. The SOCKS5 port, which at Proxeon as of 09/22/2026 equals the HTTP port plus one, is suitable for programs with their own SOCKS support: curl, Git, Python with an additional module and others.
Why Does the Exception List in WinHTTP Look Different After Importing from User Settings
The import command converts WinINet syntax to WinHTTP syntax. The list is substantively the same, but some elements may be reordered or reformatted. This is normal. Verify that all the necessary masks are present and, if needed, set the list explicitly via set proxy.
How Can I Tell Whether a Service Uses WinHTTP Rather Than WinINet
Look at the process's loaded libraries, as described in Step 1. The presence of winhttp.dll indicates WinHTTP usage. For SYSTEM services, use Process Explorer, since PowerShell may not be able to access the module list.
What Happens to the System If the Proxy Becomes Unreachable
The browser and WinINet programs will show a connection error. WinHTTP services will wait for a timeout and retry. Windows Update will log an error and try again later. The system will keep running, but without internet access until the proxy is restored. That's exactly why you should keep the netsh winhttp reset proxy command and the backup files at hand.
Do WinHTTP Settings Apply Immediately or Is a Reboot Required
New WinHTTP sessions read the settings immediately. Already running services may hold onto the old ones. Restarting the relevant service fixes it; a full reboot isn't required.
Can I Use Different Proxies for Different Users on One Machine
For WinINet, yes; each user has their own profile and settings. For WinHTTP, no; it's shared machine-wide. If you need different proxies for different services, use the applications' own settings or separate local intermediary proxies.
How Do I Roll Back Everything Done in This Guide
Run netsh winhttp reset proxy. Double-click the wininet-backup.reg file and confirm the import. Run bitsadmin /util /setieproxy localsystem NO_PROXY and the same for networkservice and localservice. Remove the environment variables through the Environment Variables window. Restart the wuauserv and bits services. The system returns to its original state.
Why Does PowerShell 5.1 See the Proxy but PowerShell 7 on the Same Machine Doesn't
Most often because PowerShell 7 is running under a different user or in an environment without WinINet settings, and it falls back to environment variables that aren't set. Set the variables from Step 5 or use the -Proxy parameter in the commands themselves.
Conclusion
Let's sum up. You now understand that Windows has two network stacks with independent proxy settings: WinINet for user programs and WinHTTP for services and system components. You configured the first via Settings or the registry, the second via netsh winhttp, added a proxy for the SYSTEM, NetworkService and LocalService accounts, set environment variables for console tools and figured out what to do about Java and .NET. Now you have a set of commands to verify each layer and a complete rollback plan.
The main takeaway worth carrying with you: if a program on Windows doesn't see the proxy, it isn't broken. It's just one more place where settings need to be entered. There are exactly three such places in the system: user-level WinINet, machine-level WinHTTP and the applications' own settings. By checking all three, you'll solve any problem like this.
What to Do Next
- Assemble the full deployment script from the additional capabilities section and test it on a test machine.
- Switch the proxy to IP-based authorization if you haven't already. This eliminates a whole class of problems with 407 responses.
- Set up monitoring for connections that bypass the proxy so you learn about new programs that ignore your settings before they cause problems.
Where to Go from Here
The next step after the Windows stack is centralized management: Group Policy for a domain, PAC files with routing logic and local intermediary proxies that handle authentication and let you change the external proxy without touching client settings. Having mastered netsh winhttp and the registry, you're already prepared for this level, because you understand exactly what happens inside each machine when it tries to get online.