Compare commits

...

5 Commits

Author SHA1 Message Date
Typikal_Failman
11bef23d04
Merge e4b4ac7654 into 785b8de6d2 2025-06-17 00:27:59 +03:00
unknown
785b8de6d2 added update ipset script 2025-06-16 22:53:13 +03:00
Typikal_Failman
e4b4ac7654
Update launcher.bat
Убрал сортировку.
2025-06-10 14:42:10 +05:00
Typikal_Failman
d34a415dda
Update launcher.bat
Убрал не нужный endlocal.
2025-06-09 19:38:08 +05:00
Typikal_Failman
d68879e6d8
Create launcher.bat
Adding laucher.bat for create shortcut to fast change of configure. Usable for laptops rapidly moved between different Internet providers.
2025-06-09 19:29:59 +05:00
2 changed files with 77 additions and 1 deletions

47
launcher.bat Normal file
View File

@ -0,0 +1,47 @@
@echo off
chcp 65001 > nul
setlocal enabledelayedexpansion
:: Создаем временный файл для сортировки
:: Searching for .bat files in current folder, except files that start with "service"
echo Pick one of the options:
set "count=0"
for %%f in (*.bat) do (
if /i not "%%~nxf"=="launcher.bat" (
set "filename=%%~nxf"
set /a count+=1
echo !count!. %%f
set "file!count!=%%f"
)
)
:: Choosing file
:input
set "choice="
set /p "choice=Input file index (number): "
if "!choice!"=="" goto :eof
set "selectedFile=!file%choice%!"
if not defined selectedFile (
echo Invalid choice, try again...
goto input
)
:: Блок ввода номера
:input
echo.
set /p "choice=Введите номер файла (1-%count%): "
echo.
:: Проверка корректности ввода
set valid=0
for /l %%i in (1,1,%count%) do if "!choice!"=="%%i" set valid=1
if !valid! equ 0 (
echo Ошибка: неверный номер. Введите число от 1 до %count%.
goto input
)
:: Запуск выбранного файла
echo Запускаем файл: !file%choice%!
call "!file%choice%!"

View File

@ -35,8 +35,9 @@ echo 3. Check Service Status
echo 4. Run Diagnostics
echo 5. Check Updates
echo 6. Switch ipset (%IPsetStatus%)
echo 7. Update ipset list
echo 0. Exit
set /p menu_choice=Enter choice (0-6):
set /p menu_choice=Enter choice (0-7):
if "%menu_choice%"=="1" goto service_install
if "%menu_choice%"=="2" goto service_remove
@ -44,6 +45,7 @@ if "%menu_choice%"=="3" goto service_status
if "%menu_choice%"=="4" goto service_diagnostics
if "%menu_choice%"=="5" goto service_check_updates
if "%menu_choice%"=="6" goto ipset_switch
if "%menu_choice%"=="7" goto ipset_update
if "%menu_choice%"=="0" exit /b
goto menu
@ -447,6 +449,33 @@ pause
goto menu
:: IPSET UPDATE =======================
:ipset_update
chcp 437 > nul
cls
set "listFile=%~dp0lists\ipset-all.txt"
set "url=https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/refs/heads/main/lists/ipset-all.txt"
echo Updating ipset-all...
if exist "%SystemRoot%\System32\curl.exe" (
curl -L -o "%listFile%" "%url%"
) else (
powershell -Command ^
"$url = '%url%';" ^
"$out = '%listFile%';" ^
"$dir = Split-Path -Parent $out;" ^
"if (-not (Test-Path $dir)) { New-Item -ItemType Directory -Path $dir | Out-Null };" ^
"$res = Invoke-WebRequest -Uri $url -TimeoutSec 10 -UseBasicParsing;" ^
"if ($res.StatusCode -eq 200) { $res.Content | Out-File -FilePath $out -Encoding UTF8 } else { exit 1 }"
)
echo Finished
pause
goto menu
:: Utility functions
:PrintGreen