From Newsgroup: alt.msdos.batch
UPDATE
Q: How would Microsoft Windows Update know my IP address?
A: It can't. It only sees the proxy. Or VPN. But not my real IP address.
Whew! Good news.
Windows Update was NOT seeing my real IP as tested thoroughly
in multiple ways in the attached script that I wrote today.
Using the existing psiphon.bat starter, the Windows Update Service
(wuauserv) was is always flowing through the proxy service.
This is how to tell if Windows Update is CONFIGURED to use the proxy.
Win+R > cmd {ctrl+shft+rtn}
netsh winhttp show proxy
a. If it shows this, Windows Update is going straight out to the internet:
Direct access (no proxy server)
b. If it shows something like this, Windows Update is using the proxy:
Proxy Server(s) : http=127.0.0.1:8080;https=127.0.0.1:8080
Mine showed this (when Psiphon is running):
Current WinHTTP proxy settings:
Proxy Server(s) :
http=127.0.0.1:3095;https=127.0.0.1:3095;socks=127.0.0.1:1080
Bypass List : <local>;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*;169.254.*;[fc*];[fd*];[fe8*];[fe9*];[fea*];[feb*]
Regarding: http=127.0.0.1:3095;https=127.0.0.1:3095
This means WinHTTP (and therefore Windows Update) is configured to send all HTTP and HTTPS traffic through a local proxy listening on port 3095.
Regarding: socks=127.0.0.1:1080
Unfortunately, even though there is a socks line, WinHTTP does not support SOCKS. It will ignore that part. Only the HTTP/HTTPS entries matter.
Regarding: <local>;10.*;172.16.* -iK 192.168.*;169.254.*;[fc*];[fd*];[fe*]
This means private/internal addresses are excluded from the proxy.
This is how to tell if Windows Update is actually USING the proxy!
Set up two windows, one of which is an admin window for Powershell:
Trigger a Windows Update scan manually in the Powershell admin window.
usoclient StartScan
Trigger a scan to watch port 3095 while that's running:
netstat -ano | findstr :3095
TCP 127.0.0.1:3095 0.0.0.0:0 LISTENING 9452
TCP 127.0.0.1:3095 127.0.0.1:3151 ESTABLISHED 9452
TCP 127.0.0.1:3143 127.0.0.1:3095 TIME_WAIT 0
TCP 127.0.0.1:3144 127.0.0.1:3095 TIME_WAIT 0
TCP 127.0.0.1:3145 127.0.0.1:3095 TIME_WAIT 0
TCP 127.0.0.1:3151 127.0.0.1:3095 ESTABLISHED 9108
Rather than race the clock, we can run the netstat every second first.
netstat -ano 1 | findstr :3095
I tested Windows Update which is using the proxy as we would want it to
with Psiphon (even with the PAC file set which blocks microsoft.com).
On purpose, I waited to see what would happen when Microsoft stopped
updating Windows 10, and specifically if a free ESU would be offered.
At midnight, on October 14th to 15th, I watched Windows Update finish &
show this prompt to get the ESU if I create an MSA & set up a backup.
<
https://i.postimg.cc/Dwv6M7Lr/windowseol01.jpg>
I have NOT created the MSA yet, because it takes about a month on TOR to
get ProtonMail to reliably accept verification emails (ask me how I know
that, where ProtonMail will permanently disable verifications if you rush).
In the interim, I wrote up my best guess as to the absolute bare minimum a user in the USA would need to do in order to qualify for the free ESU.
*Tutorial:*
*How to set up Windows 10 free ESU using bare-minimum requirements*
<
https://i2pn2.pugleaf.net/groups/alt.comp.microsoft.windows/articles/4932>
With that done, what's left is to create a private email on TOR
which doesn't ask for another email or for a phone number to create
and use it for about a month with "normal-looking traffic.
Then I can create the MSA account.
But in the interim, I need to keep Microsoft from seeing my real IP
during the Windows Update process (which uses WinHTTP when proxied).
Strategy:
a. Microsoft does NOT get your real IP address
b. Microsoft does not get any information from your email address MSA
For that strategy, you can be on VPN all the time, but a proxy is faster.
Much faster. And you can always tack on the VPN before or after the proxy.
Since I already have the psiphon.bat script starting the proxy, I wrote and tested the script below, which "could" run the Windows Update but I
hesitated to allow the script itself to run the Windows Update from inside
the script because then it would only work on a system that has added
specific PowerShell compoents (necessary to run the Windows Update).
Instead, I made the script need an OUTSIDE manual call to the Windows
Update GUI (which is the most reliable way & still be compatible for everyone).
Below is the script that I tested on my machine to check if Windows Update
is getting my real IP address, or the Psiphon proxy IP address instead.
The use model is simple:
a. Run the script
b. While the script is running, manually run a Windows Update check
c. Kill the script
The log file will look something like this if your proxy is trapping calls.
==============================================
[Thu 10/16/2025 6:01:07.59] Starting scan
[Thu 10/16/2025 6:01:07.63] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:07.82] monitoring...
[Thu 10/16/2025 6:01:12.22] PID=0 Proc=System
[Thu 10/16/2025 6:01:12.22] *** WINDOWS UPDATE HIT *** PID=5712 Proc=svchost.exe
[Thu 10/16/2025 6:01:12.22] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:12.22] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:15.31] monitoring...
[Thu 10/16/2025 6:01:20.16] PID=0 Proc=System
[Thu 10/16/2025 6:01:20.16] *** WINDOWS UPDATE HIT *** PID=5712 Proc=svchost.exe
[Thu 10/16/2025 6:01:20.16] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:20.16] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:22.87] monitoring...
[Thu 10/16/2025 6:01:27.15] PID=0 Proc=System
[Thu 10/16/2025 6:01:27.15] *** WINDOWS UPDATE HIT *** PID=5712 Proc=svchost.exe
[Thu 10/16/2025 6:01:27.15] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:27.15] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:29.89] monitoring...
[Thu 10/16/2025 6:01:34.18] PID=0 Proc=System
[Thu 10/16/2025 6:01:34.18] PID=0 Proc=System
[Thu 10/16/2025 6:01:34.18] PID=0 Proc=System
[Thu 10/16/2025 6:01:34.18] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:34.61] monitoring...
[Thu 10/16/2025 6:01:39.14] PID=0 Proc=System
[Thu 10/16/2025 6:01:39.14] PID=0 Proc=System
[Thu 10/16/2025 6:01:39.14] PID=0 Proc=System
[Thu 10/16/2025 6:01:39.14] PID=0 Proc=System
[Thu 10/16/2025 6:01:39.14] *** WINDOWS UPDATE HIT *** PID=5712 Proc=svchost.exe
[Thu 10/16/2025 6:01:39.14] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:39.14] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:42.12] monitoring...
[Thu 10/16/2025 6:01:47.20] PID=0 Proc=System
[Thu 10/16/2025 6:01:47.20] PID=0 Proc=System
[Thu 10/16/2025 6:01:47.20] PID=0 Proc=System
[Thu 10/16/2025 6:01:47.20] *** WINDOWS UPDATE HIT *** PID=5712 Proc=svchost.exe
[Thu 10/16/2025 6:01:47.20] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:47.20] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:50.16] monitoring...
[Thu 10/16/2025 6:01:55.21] PID=0 Proc=System
[Thu 10/16/2025 6:01:55.21] PID=0 Proc=System
[Thu 10/16/2025 6:01:55.21] PID=0 Proc=System
[Thu 10/16/2025 6:01:55.21] PID=0 Proc=System
[Thu 10/16/2025 6:01:55.21] PID=0 Proc=System
[Thu 10/16/2025 6:01:55.21] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:01:55.84] monitoring...
[Thu 10/16/2025 6:02:00.13] PID=0 Proc=System
[Thu 10/16/2025 6:02:00.13] PID=0 Proc=System
[Thu 10/16/2025 6:02:00.13] PID=0 Proc=System
[Thu 10/16/2025 6:02:00.13] PID=0 Proc=System
[Thu 10/16/2025 6:02:00.13] PID=0 Proc=System
[Thu 10/16/2025 6:02:00.13] *** WINDOWS UPDATE HIT *** PID=5712 Proc=svchost.exe
[Thu 10/16/2025 6:02:00.13] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:02:00.13] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:02:03.30] monitoring...
[Thu 10/16/2025 6:02:08.15] PID=0 Proc=System
[Thu 10/16/2025 6:02:08.15] PID=0 Proc=System
[Thu 10/16/2025 6:02:08.15] PID=0 Proc=System
[Thu 10/16/2025 6:02:08.15] PID=0 Proc=System
[Thu 10/16/2025 6:02:08.15] *** WINDOWS UPDATE HIT *** PID=5712 Proc=svchost.exe
[Thu 10/16/2025 6:02:08.15] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:02:08.15] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:02:11.29] monitoring...
[Thu 10/16/2025 6:02:16.15] PID=0 Proc=System
[Thu 10/16/2025 6:02:16.15] PID=0 Proc=System
[Thu 10/16/2025 6:02:16.15] PID=0 Proc=System
[Thu 10/16/2025 6:02:16.15] PID=0 Proc=System
[Thu 10/16/2025 6:02:16.15] PID=0 Proc=System
[Thu 10/16/2025 6:02:16.15] PID=9452 Proc=psiphon-tunnel-core.exe
[Thu 10/16/2025 6:02:16.79] monitoring...
so that everyone always benefits from the appreciable efforts I expend
to help them, here is the script for your use for testing purposes..
@echo off
REM C:\data\sys\batch\checkwindowsupdate.bat 20251016 version 1.0
REM This is version 1.5
REM Tool to log details (i.e., use of proxy) when an update scan is done.
REM v1.0 20251016, 91 lines
REM Runs "usoclient StartScan" to kick off a Windows Update check.
REM Optionally run "usoclient StartInteractiveScan" for a deeper scan.
REM Every 5 seconds, checks for connections on port 3095.
REM For each PID using that port, resolves the process name
REM (svchost.exe for Windows Update).
REM Creates a timestamped log file in C:\data\sys\log\.
REM Appends timestamp + PID + process name to the log.
REM v1.1 20251016, 101 lines
REM Modified the port to be a variable
REM Padded single-digit timestamps in logfile for consistent sorting
REM v1.2 20251016, 113 lines
REM Added highlight for the wuauserv process
REM If the process is not svchost.exe, it logs normally.
REM If it is svchost.exe, it runs a quick PowerShell check:
REM Which looks up the services hosted by that PID.
REM If one of them is wuauserv, it writes a highlighted line:
REM [date time] *** WINDOWS UPDATE HIT *** PID=736 Proc=svchost.exe
REM Otherwise, it logs normally.
REM v1.3 20251016, 118 lines
REM Fixed %%a was used but never set, which breaks the inner loop.
REM v1.4 20251016, 123 lines
REM Commented out "usoclient StartScan" because it won't run if cached
REM Added "usoclient StartInteractiveScan" as it will run even if cached
REM v1.5 20251016, 138 lines
REM Added a heartbeat to confirm the loop is alive
REM Gave up on the usoclient commands above.
REM Don't want to make the script not work on everyone else's PC
REM But if I wanted to run the update in this script, I need to do this
REM Install-Module PSWindowsUpdate
REM Import-Module PSWindowsUpdate
REM Get-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot
REM Install-Module PSWindowsUpdate
REM But even that requires admin so let's just run the update in the GUI
REM So this is no longer a tool to trigger Windows Update & log proxy hits
REM It just logs proxy hits when the Windows Update is manually triggered.
REM Comment linelength limit ==================================================
REM 567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 12
:: This is how to tell if Windows Update is CONFIGURED to use the proxy.
::
:: Win+R > cmd {ctrl+shft+rtn}
:: C:\> netsh winhttp show proxy
::
:: a. If it shows this, Windows Update is going straight out to the internet:
:: Direct access (no proxy server)
:: b. If it shows something like this, Windows Update is using the proxy:
:: Proxy Server(s) : http=127.0.0.1:8080;https=127.0.0.1:8080
::
:: Mine showed this:
:: Current WinHTTP proxy settings:
:: Proxy Server(s) : http=127.0.0.1:3095;https=127.0.0.1:3095;socks=127.0.0.1:1080
:: Bypass List : <local>;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*;169.254.*;[fc*];[fd*];[fe8*];[fe9*];[fea*];[feb*]
::
:: Regarding: http=127.0.0.1:3095;https=127.0.0.1:3095
:: This means WinHTTP (and therefore Windows Update) is configured to send all HTTP and HTTPS traffic through a local proxy listening on port 3095.
::
:: Regarding: socks=127.0.0.1:1080
:: Unfortunately, even though there is a socks line, WinHTTP does not support SOCKS. It will ignore that part. Only the HTTP/HTTPS entries matter.
::
:: Regarding: <local>;10.*;172.16.* rCa 192.168.*;169.254.*;[fc*];[fd*];[fe*]
:: This means private/internal addresses are excluded from the proxy.
::
:: This is how to tell if Windows Update is actually USING the proxy!
::
:: Set up two windows, one of which is an admin window for Powershell:
:: Trigger a Windows Update scan manually in the Powershell admin window.
:: PS:> usoclient StartScan
:: Trigger a scan to watch port 3095 while that's running:
:: C:\> netstat -ano | findstr :3095
:: TCP 127.0.0.1:3095 0.0.0.0:0 LISTENING 9452
:: TCP 127.0.0.1:3095 127.0.0.1:3151 ESTABLISHED 9452
:: TCP 127.0.0.1:3143 127.0.0.1:3095 TIME_WAIT 0
:: TCP 127.0.0.1:3144 127.0.0.1:3095 TIME_WAIT 0
:: TCP 127.0.0.1:3145 127.0.0.1:3095 TIME_WAIT 0
:: TCP 127.0.0.1:3151 127.0.0.1:3095 ESTABLISHED 9108
::
:: Rather than race the clock, we can run the netstat every second first.
:: C:\> netstat -ano 1 | findstr :3095
:: This proves that the process found is the Windows Update service
:: PS C:\Windows\system32> Get-CimInstance Win32_Service | Where-Object { $_.ProcessId -eq 736 } | Select-Object Name, DisplayName
::
:: Name DisplayName
:: ---- -----------
:: wuauserv Windows Update
::
::
:: NOTE: Port 3095 is used here because that's the port our local
:: HTTP-to-SOCKS proxy is configured to listen on.
:: You can verify this by checking your WinHTTP proxy settings:
:: netsh winhttp show proxy
:: If it shows http=127.0.0.1:3095, then this script will work as-is.
:: Otherwise, update the port number below to match your actual proxy listener.
set PROXYPORT=3095
set LOGDIR=C:\data\sys\log
if not exist "%LOGDIR%" md "%LOGDIR%"
set hour=%TIME:~0,2%
if "%hour:~0,1%"==" " set hour=0%hour:~1,1%
set LOGFILE=%LOGDIR%\update_proxy_hits_%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%_%hour%%TIME:~3,2%%TIME:~6,2%.log
echo Starting Windows Update scan and proxy logging...
echo Log file: %LOGFILE%
echo Press Ctrl+C to stop.
echo ============================================== >> "%LOGFILE%"
echo [%DATE% %TIME%] Starting scan >> "%LOGFILE%"
:: Trigger Windows Update scan (might not run if results are recently cached)
REM usoclient StartScan
:: Trigger Windows Update scan (should trigger even if it was cached recently)
usoclient StartInteractiveScan
:: Continuous logging of connections to port 3095
:loop
for /f "tokens=5" %%a in ('netstat -ano ^| findstr :%PROXYPORT%') do (
for /f "tokens=1,*" %%b in ('tasklist /fi "PID eq %%a" /fo table /nh 2^>nul') do (
if /i "%%b"=="svchost.exe" (
rem Check if this svchost is hosting Windows Update
powershell -command "if ((Get-CimInstance Win32_Service | Where-Object { $_.ProcessId -eq %%a }).Name -eq 'wuauserv') { Write-Output '[%DATE% %TIME%] *** WINDOWS UPDATE HIT *** PID=%%a Proc=%%b' } else { Write-Output '[%DATE% %TIME%] PID=%%a Proc=%%b' }" >> "%LOGFILE%"
) else (
echo [%DATE% %TIME%] PID=%%a Proc=%%b >> "%LOGFILE%"
)
)
)
:: Add a heartbeat to confirm the loop is alive
echo [%DATE% %TIME%] monitoring... >> "%LOGFILE%"
timeout /t 5 >nul
goto loop
:: end of C:\data\sys\batch\checkwindowsupdate.bat
--
The main point of Usenet is for intelligent people to help each other, &
for results to be archived so that anyone can access our immense knowledge.
--- Synchronet 3.21a-Linux NewsLink 1.2