mirror of
https://github.com/Flowseal/zapret-discord-youtube.git
synced 2026-03-08 11:25:28 +00: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
|
:: External commands
|
||||||
if "%~1"=="status_zapret" (
|
if "%~1"=="status_zapret" (
|
||||||
call :test_service zapret soft
|
call :test_service zapret soft
|
||||||
|
call :tcp_enable
|
||||||
exit /b
|
exit /b
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -63,6 +64,12 @@ if "%menu_choice%"=="0" exit /b
|
|||||||
goto menu
|
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 ==============================
|
:: STATUS ==============================
|
||||||
:service_status
|
:service_status
|
||||||
cls
|
cls
|
||||||
@@ -260,6 +267,8 @@ for /f "tokens=*" %%a in ('type "!selectedFile!"') do (
|
|||||||
)
|
)
|
||||||
|
|
||||||
:: Creating service with parsed args
|
:: Creating service with parsed args
|
||||||
|
call :tcp_enable
|
||||||
|
|
||||||
set ARGS=%args%
|
set ARGS=%args%
|
||||||
echo Final args: !ARGS!
|
echo Final args: !ARGS!
|
||||||
set SRVCNAME=zapret
|
set SRVCNAME=zapret
|
||||||
@@ -342,6 +351,21 @@ if !errorlevel!==0 (
|
|||||||
)
|
)
|
||||||
echo:
|
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
|
:: AdguardSvc.exe
|
||||||
tasklist /FI "IMAGENAME eq AdguardSvc.exe" | find /I "AdguardSvc.exe" > nul
|
tasklist /FI "IMAGENAME eq AdguardSvc.exe" | find /I "AdguardSvc.exe" > nul
|
||||||
if !errorlevel!==0 (
|
if !errorlevel!==0 (
|
||||||
|
|||||||
Reference in New Issue
Block a user