diff --git a/bin/WinDivert.dll b/bat/bin/WinDivert.dll similarity index 100% rename from bin/WinDivert.dll rename to bat/bin/WinDivert.dll diff --git a/bin/WinDivert64.sys b/bat/bin/WinDivert64.sys similarity index 100% rename from bin/WinDivert64.sys rename to bat/bin/WinDivert64.sys diff --git a/bin/cygwin1.dll b/bat/bin/cygwin1.dll similarity index 100% rename from bin/cygwin1.dll rename to bat/bin/cygwin1.dll diff --git a/bin/game_filter.enabled b/bat/bin/game_filter.enabled similarity index 100% rename from bin/game_filter.enabled rename to bat/bin/game_filter.enabled diff --git a/bin/quic_initial_www_google_com.bin b/bat/bin/quic_initial_www_google_com.bin similarity index 100% rename from bin/quic_initial_www_google_com.bin rename to bat/bin/quic_initial_www_google_com.bin diff --git a/bin/tls_clienthello_www_google_com.bin b/bat/bin/tls_clienthello_www_google_com.bin similarity index 100% rename from bin/tls_clienthello_www_google_com.bin rename to bat/bin/tls_clienthello_www_google_com.bin diff --git a/bin/winws.exe b/bat/bin/winws.exe similarity index 100% rename from bin/winws.exe rename to bat/bin/winws.exe diff --git a/general (ALT).bat b/bat/general(ALT).bat similarity index 100% rename from general (ALT).bat rename to bat/general(ALT).bat diff --git a/general (ALT2).bat b/bat/general(ALT2).bat similarity index 100% rename from general (ALT2).bat rename to bat/general(ALT2).bat diff --git a/general (ALT3).bat b/bat/general(ALT3).bat similarity index 100% rename from general (ALT3).bat rename to bat/general(ALT3).bat diff --git a/general (ALT4).bat b/bat/general(ALT4).bat similarity index 100% rename from general (ALT4).bat rename to bat/general(ALT4).bat diff --git a/general (ALT5).bat b/bat/general(ALT5).bat similarity index 100% rename from general (ALT5).bat rename to bat/general(ALT5).bat diff --git a/general (ALT6).bat b/bat/general(ALT6).bat similarity index 100% rename from general (ALT6).bat rename to bat/general(ALT6).bat diff --git a/general (FAKE TLS ALT).bat b/bat/general(FAKE TLS ALT).bat similarity index 100% rename from general (FAKE TLS ALT).bat rename to bat/general(FAKE TLS ALT).bat diff --git a/general (FAKE TLS AUTO ALT).bat b/bat/general(FAKE TLS AUTO ALT).bat similarity index 100% rename from general (FAKE TLS AUTO ALT).bat rename to bat/general(FAKE TLS AUTO ALT).bat diff --git a/general (FAKE TLS AUTO ALT2).bat b/bat/general(FAKE TLS AUTO ALT2).bat similarity index 100% rename from general (FAKE TLS AUTO ALT2).bat rename to bat/general(FAKE TLS AUTO ALT2).bat diff --git a/general (FAKE TLS AUTO).bat b/bat/general(FAKE TLS AUTO).bat similarity index 100% rename from general (FAKE TLS AUTO).bat rename to bat/general(FAKE TLS AUTO).bat diff --git a/general (FAKE TLS).bat b/bat/general(FAKE TLS).bat similarity index 100% rename from general (FAKE TLS).bat rename to bat/general(FAKE TLS).bat diff --git a/general (МГТС).bat b/bat/general(МГТС).bat similarity index 100% rename from general (МГТС).bat rename to bat/general(МГТС).bat diff --git a/general (МГТС2).bat b/bat/general(МГТС2).bat similarity index 100% rename from general (МГТС2).bat rename to bat/general(МГТС2).bat diff --git a/general.bat b/bat/general.bat similarity index 100% rename from general.bat rename to bat/general.bat diff --git a/service.bat b/bat/service.bat similarity index 92% rename from service.bat rename to bat/service.bat index 958d36a..89c8fbe 100644 --- a/service.bat +++ b/bat/service.bat @@ -1,5 +1,25 @@ @echo off +@chcp 65001 >nul set "LOCAL_VERSION=1.8.1" +:: Обработка аргументов +if "%~1"=="" goto help + +if /i "%~1"=="install" goto service_install +if /i "%~1"=="remove" goto service_remove +if /i "%~1"=="status" goto service_status +if /i "%~1"=="diagnostics" goto service_diagnostics +if /i "%~1"=="updates" goto service_check_updates +if /i "%~1"=="game" goto game_switch +if /i "%~1"=="ipset" goto ipset_switch +if /i "%~1"=="ipset_update" goto ipset_update +if /i "%~1"=="status_zapret" call :test_service zapret soft & exit /b +if /i "%~1"=="check_updates" call :service_check_updates soft & exit /b +if /i "%~1"=="load_game_filter" call :game_switch_status & exit /b + +:help +echo Использование: service.bat [install^|remove^|status^|diagnostics^|updates^|game^|ipset^|ipset_update] +echo Дополнительно: status_zapret, check_updates, load_game_filter +exit /b :: External commands if "%~1"=="status_zapret" ( @@ -66,16 +86,24 @@ chcp 437 > nul echo Checking services and tasks... call :test_service zapret call :test_service WinDivert - tasklist /FI "IMAGENAME eq winws.exe" | find /I "winws.exe" > nul +setlocal enabledelayedexpansion if !errorlevel!==0 ( call :PrintGreen "Bypass is ACTIVE" ) else ( call :PrintRed "Bypass NOT FOUND" ) - pause -goto menu +exit /k + +:: --- Подпрограммы --- +:PrintGreen +echo %~1 +exit /b + +:PrintRed +echo %~1 +exit /b :test_service set "ServiceName=%~1" @@ -95,7 +123,6 @@ if "%ServiceStatus%"=="RUNNING" ( ) else if not "%~2"=="soft" ( echo "%ServiceName%" service is NOT running. ) - exit /b @@ -114,7 +141,6 @@ net stop "WinDivert14" sc delete "WinDivert14" pause -goto menu :: INSTALL ============================= @@ -122,6 +148,9 @@ goto menu cls chcp 65001 > nul +:: Включаем поддержку !variable! +setlocal enabledelayedexpansion + :: Main cd /d "%~dp0" set "BIN_PATH=%~dp0bin\" @@ -139,6 +168,8 @@ for %%f in (*.bat) do ( ) ) +endlocal + :: Choosing file set "choice=" set /p "choice=Input file index (number): " @@ -148,7 +179,6 @@ set "selectedFile=!file%choice%!" if not defined selectedFile ( echo Invalid choice, exiting... pause - goto menu ) :: Args that should be followed by value @@ -242,7 +272,6 @@ sc description %SRVCNAME% "Zapret DPI bypass software" sc start %SRVCNAME% pause -goto menu :: CHECK UPDATES ======================= @@ -263,7 +292,6 @@ if not defined GITHUB_VERSION ( echo Warning: failed to fetch the latest version. Check your internet connection. This warning does not affect the operation of zapret pause if "%1"=="soft" exit /b - goto menu ) :: Version comparison @@ -272,7 +300,6 @@ if "%LOCAL_VERSION%"=="%GITHUB_VERSION%" ( if "%1"=="soft" exit /b pause - goto menu ) echo New version available: %GITHUB_VERSION% @@ -291,7 +318,6 @@ if /i "%CHOICE%"=="Y" ( if "%1"=="soft" exit /b pause -goto menu :: DIAGNOSTICS ========================= @@ -412,7 +438,6 @@ if /i "!CHOICE!"=="Y" ( echo: pause -goto menu :: GAME SWITCH ======================== @@ -446,7 +471,6 @@ if not exist "%gameFlagFile%" ( ) pause -goto menu :: IPSET SWITCH ======================= @@ -496,7 +520,6 @@ if !errorlevel!==0 ( ) pause -goto menu :: IPSET UPDATE ======================= @@ -524,7 +547,6 @@ if exist "%SystemRoot%\System32\curl.exe" ( echo Finished pause -goto menu :: Utility functions diff --git a/gui.hta b/gui.hta new file mode 100644 index 0000000..987c45d --- /dev/null +++ b/gui.hta @@ -0,0 +1,107 @@ + + + Zapret GUI + + + + + + + + + +
+ +
+
Настройки запрета
+
Включить определенный сервис
+
Помощь
+
Настройки
+
+ +
+
Редактировать конфигурационный файл для доменов (ipset-all.txt)
+
Редактировать конфигурационный файл для IP и подсетей (list-general.txt)
+
Игровой фильтр (enabled)
+
Ipset (loaded)
+
Обновить ipset
+ +
Назад
+
+ +
+
Установить сервис
+
Удалить сервис
+
Статус сервиса
+
Запустить диагностику
+
Проверка обновлений
+
Назад
+
+ +
+
general
+
general (ALT)
+
general (ALT2)
+
general (ALT3)
+
general (ALT4)
+
general (ALT5)
+
general (ALT6)
+
general(FAKE TLS ALT)
+
general(FAKE TLS AUTO ALT)
+
general(FAKE TLS AUTO ALT2)
+
Назад
+
+ +
+
+

“Plug & Play” — обход блокировок,
+ Discord и + YouTube для Windows

+
+

Краткие описания функций

+ +
    +
  • Настройки запрета

    +
      +
    • Установить сервис — установить стратегию в автозапуск
    • +
    • Удалить сервис — удалить службы
    • +
    • Статус сервиса — проверить статус обхода
    • +
    • Запустить диагностику — диагностика ошибок + очистка кэша Discord
    • +
    • Проверка обновлений — проверить обновления
    • +
    • Игровой фильтр — режим для игр
      + После выбора — перезапустите компьютер +
    • +
    • Ipset — вкл/выкл список сервисов из ipset-all.txt
    • +
    • Обновить ipset list — обновить список ipset-all.txt
    • +
    +
  • +
  • Включить определенный сервис

    + Запуск определенной стратегии обхода.
    + Пробуйте разные (ALT, МГТС и др.), пока не найдете работающий вариант. +
  • +
+ + + +
Назад
+
+
+ + + + diff --git a/src/css/style.css b/src/css/style.css new file mode 100644 index 0000000..70af72e --- /dev/null +++ b/src/css/style.css @@ -0,0 +1,51 @@ +body { + font-family: Verdana, Geneva, Tahoma, sans-serif; + padding: 0; + margin: 0; + background: #282828; + padding-top: 7px; +} + +.button { + padding: 10px; + background: rgb(80, 80, 80); + color: white; + cursor: pointer; + margin: 10px; + border-radius: 2px; +} + +.button:hover { + color: rgb(200, 200, 200) +} + +.backButton { + color: rgb(255, 255, 0); +} + +.backButton:hover{ + color: rgb(200, 200, 0) +} + +.page { + display: none +} + +.fixed { + position: absolute; + bottom: 0; +} + +.right { + right: 0; +} + +.left { + left: 0 +} + +.author { + font-size: 10px; + color: #606060; + padding: 10px +} diff --git a/src/fav.ico b/src/fav.ico new file mode 100644 index 0000000..05443ae Binary files /dev/null and b/src/fav.ico differ diff --git a/src/js/pages.js b/src/js/pages.js new file mode 100644 index 0000000..be0f606 --- /dev/null +++ b/src/js/pages.js @@ -0,0 +1,37 @@ +/** + * Simulate app routing using pagination + * + * - Get all elements from container + * - Set first to visible + * - Create change visibility function + * +*/ +// get elements from container +var container = document.getElementById("pages") +var items = container.children +var pages = [null] +var page = 1 + +// Add 'page' class to all elements inside 'pages' container +for(var i = 0; i < items.length; i++){ + if(items[i]){ + items[i].className = [items[i].className, "page"].join(" ") + pages.push(items[i]) + } +} + +// Set first page to visible +if(pages[page]) pages[page].style.display = "block" + +// Function used to set visibility, called from 'gui.hta' file +function setPage(p){ + var curr = pages[p] + var prev = pages[page] + + if(curr){ + prev.style.display = "none"; + curr.style.display = "block"; + page = p + } +} + diff --git a/src/js/window.js b/src/js/window.js new file mode 100644 index 0000000..cabc8b1 --- /dev/null +++ b/src/js/window.js @@ -0,0 +1,117 @@ +// Here you can set window size +var width = 800 +var height = 600 + +// Apply window size at start +window.resizeTo(width, height); + +// Center window +window.moveTo( + (screen.width - width) / 2, + (screen.height - height) / 2 +); + +// Function to send message from JS to BATCH ( Sends to path ) +function shell(path, msg, visible) { + try { + var shellApp = new ActiveXObject("Shell.Application"); + var fs = new ActiveXObject("Scripting.FileSystemObject"); + + // Путь к текущему HTA-файлу + var rawPath = decodeURIComponent(window.location.pathname); + if (rawPath.charAt(0) === "/" && rawPath.charAt(2) === ":") { + rawPath = rawPath.slice(1); // Убираем лишний слеш + } + + // Путь к папке "bat" + var parentFolder = fs.GetParentFolderName(rawPath); + var batFolder = fs.BuildPath(parentFolder, "bat"); + + // Полный путь к .bat файлу + var batFile = fs.BuildPath(batFolder, path.message); + + // Подготавливаем аргументы (без кавычек!) + var arguments = ""; + if (msg && msg.message) { + arguments = msg.message; // без кавычек! + } + + // Собираем команду (путь и аргумент в кавычках вместе) + var fullCommand = "\"" + batFile + "\" " + arguments; + // Запуск от имени администратора + shellApp.ShellExecute("cmd.exe", "/k " + fullCommand, "", "runas", visible || 1); + + } catch (e) { + var errorMessage = "Ошибка запуска скрипта:\n"; + errorMessage += e.message; + alert(errorMessage); + } +} +function txt(path, msg, visible) { + try { + var shell = new ActiveXObject("WScript.Shell"); + var fs = new ActiveXObject("Scripting.FileSystemObject"); + + // Путь к текущему HTA-файлу + var rawPath = decodeURIComponent(window.location.pathname); + if (rawPath.charAt(0) === "/" && rawPath.charAt(2) === ":") { + rawPath = rawPath.slice(1); // Убираем лишний слеш в начале пути + } + + // Путь к папке "lists" + var parentFolder = fs.GetParentFolderName(rawPath); + var listsFolder = fs.BuildPath(parentFolder, "lists"); + + // Полный путь к файлу + var filePath = fs.BuildPath(listsFolder, path.message); + + // Подготавливаем аргумент как строку в кавычках + var quotedMsg = ""; + if (msg && msg.message) { + quotedMsg = "\""; + quotedMsg += msg.message; + quotedMsg += "\""; + } + + // Собираем команду для запуска Блокнота + var command = "\""; + command += filePath; + command += "\" "; + command += quotedMsg; + + // Запуск Notepad + shell.Run("notepad.exe " + command, visible || 1, false); + + } catch (e) { + var errorMessage = "Ошибка открытия файла:\n"; + errorMessage += e.message; + alert(errorMessage); + } +} + +function shellDefinite(path,visible) { + try { + var shellApp = new ActiveXObject("Shell.Application"); + var fs = new ActiveXObject("Scripting.FileSystemObject"); + + // Путь к текущему HTA-файлу + var rawPath = decodeURIComponent(window.location.pathname); + if (rawPath.charAt(0) === "/" && rawPath.charAt(2) === ":") { + rawPath = rawPath.slice(1); // Убираем лишний слеш + } + + // Путь к папке "bat" + var parentFolder = fs.GetParentFolderName(rawPath); + var batFolder = fs.BuildPath(parentFolder, "bat"); + + // Полный путь к .bat файлу + var batFile = fs.BuildPath(batFolder, path.message); + // Запуск от имени администратора + shellApp.ShellExecute("cmd.exe", "/k " + batFile, "", "runas", visible || 1); + + } catch (e) { + var errorMessage = "Ошибка запуска скрипта:\n"; + errorMessage += e.message; + alert(errorMessage); + } +} \ No newline at end of file