From 89a9ada90090e3d6558feee7f96d424ec38b7b80 Mon Sep 17 00:00:00 2001 From: Flowseal Date: Fri, 15 Aug 2025 17:43:31 +0300 Subject: [PATCH] DNS check update --- service.bat | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/service.bat b/service.bat index 53a676c..d406145 100644 --- a/service.bat +++ b/service.bat @@ -380,15 +380,14 @@ echo: :: DNS set "dnsfound=0" -for /f "skip=1 tokens=*" %%a in ('wmic nicconfig where "IPEnabled=true" get DNSServerSearchOrder /format:table') do ( - echo %%a | findstr /i "192.168." >nul - if !errorlevel!==0 ( +for /f "delims=" %%a in ('powershell -Command "Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Where-Object {$_.IPEnabled -eq $true} | ForEach-Object {$_.DNSServerSearchOrder} | Where-Object {$_ -match '^192\.168\.'} | Measure-Object | Select-Object -ExpandProperty Count"') do ( + if %%a gtr 0 ( set "dnsfound=1" ) ) if !dnsfound!==1 ( call :PrintYellow "[?] DNS servers are probably not specified." - call :PrintYellow "Provider's DNS servers are automatically used, which may affect zapret. It is recommended to install well-known DNS servers and setup DoH" + call :PrintYellow "Provider's DNS servers are probably automatically used, which may affect zapret. It is recommended to install well-known DNS servers and setup DoH" ) else ( call :PrintGreen "DNS check passed" )