DNS check update

This commit is contained in:
Flowseal
2025-08-15 17:43:31 +03:00
parent 32bc3939b2
commit 89a9ada900

View File

@@ -380,15 +380,14 @@ echo:
:: DNS :: DNS
set "dnsfound=0" set "dnsfound=0"
for /f "skip=1 tokens=*" %%a in ('wmic nicconfig where "IPEnabled=true" get DNSServerSearchOrder /format:table') do ( 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 (
echo %%a | findstr /i "192.168." >nul if %%a gtr 0 (
if !errorlevel!==0 (
set "dnsfound=1" set "dnsfound=1"
) )
) )
if !dnsfound!==1 ( if !dnsfound!==1 (
call :PrintYellow "[?] DNS servers are probably not specified." 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 ( ) else (
call :PrintGreen "DNS check passed" call :PrintGreen "DNS check passed"
) )