Timestamps enable implementation

This commit is contained in:
Flowseal
2025-09-09 17:15:41 +03:00
parent 72294fa261
commit 586aeca80c

View File

@@ -4,6 +4,7 @@ set "LOCAL_VERSION=1.8.3"
:: External commands
if "%~1"=="status_zapret" (
call :test_service zapret soft
call :tcp_enable
exit /b
)
@@ -63,6 +64,12 @@ if "%menu_choice%"=="0" exit /b
goto menu
:: TCP ENABLE ==========================
:tcp_enable
netsh interface tcp show global | findstr /i "timestamps" | findstr /i "enabled" > nul || netsh interface tcp set global timestamps=enabled > nul 2>&1
exit /b
:: STATUS ==============================
:service_status
cls
@@ -260,6 +267,8 @@ for /f "tokens=*" %%a in ('type "!selectedFile!"') do (
)
:: Creating service with parsed args
call :tcp_enable
set ARGS=%args%
echo Final args: !ARGS!
set SRVCNAME=zapret
@@ -342,6 +351,21 @@ if !errorlevel!==0 (
)
echo:
:: TCP timestamps check
netsh interface tcp show global | findstr /i "timestamps" | findstr /i "enabled" > nul
if !errorlevel!==0 (
call :PrintGreen "TCP timestamps check passed"
) else (
call :PrintYellow "[?] TCP timestamps are disabled. Enabling timestamps..."
netsh interface tcp set global timestamps=enabled > nul 2>&1
if !errorlevel!==0 (
call :PrintGreen "TCP timestamps successfully enabled"
) else (
call :PrintRed "[X] Failed to enable TCP timestamps"
)
)
echo:
:: AdguardSvc.exe
tasklist /FI "IMAGENAME eq AdguardSvc.exe" | find /I "AdguardSvc.exe" > nul
if !errorlevel!==0 (