mirror of
https://github.com/Flowseal/zapret-discord-youtube.git
synced 2025-12-10 05:19:45 +05:00
Timestamps enable implementation
This commit is contained in:
24
service.bat
24
service.bat
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user