diff --git a/README.md b/README.md index 3ce2464..3170aec 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,14 @@ -# Moonstone -A desktop app for `bol-van/zapret` +# Sakura Flow 🌸 (Moonstone Fork) +An optimized desktop tray application for managing [zapret](https://github.com) on Windows. -![alt text](images/interface.png) +![Interface](images/interface.png) + +## Key Enhancements in Sakura Flow: +- **Redesigned UI**: Modern "Sakura" dark-pink theme for the system tray menu. +- **Improved UX**: The menu now opens with both **Left-Click (LMB)** and Right-Click (RMB). +- **Portable Mode Fix**: Improved path logic in `config.py`. The compiled `.exe` now correctly locates `zapret` and `icons` folders when placed in the same directory. +- **Enhanced Gaming Support**: Automatic UDP port injection in `service.py` for stable connectivity in games (Rocket League, etc.) with low ping. +- **DNS Flow**: Quick access to Windows Network Settings directly from the menu. ## Quick Start @@ -9,11 +16,8 @@ A desktop app for `bol-van/zapret` ```bash python -m src.main ``` -**Note:** Requires administrator privileges. - ### Building ```bash -pyinstaller --onedir --noconsole --name Moonstone --add-data "icons;icons" --add-data "zapret;zapret" --icon=icons/moonstone.ico --version-file=version.py src/main.py -``` +pyinstaller --noconfirm --onefile --windowed --uac-admin --icon "icons/moonstone.ico" --name "SakuraFlow" src/main.py -For detailed information on development, debugging, and building, see [DEVELOPMENT.md](DEVELOPMENT.md). \ No newline at end of file +``` diff --git a/icons/check.ico b/icons/check.ico index f560d93..ac58b56 100644 Binary files a/icons/check.ico and b/icons/check.ico differ diff --git a/icons/check.png b/icons/check.png index 9da6a96..7eb72b5 100644 Binary files a/icons/check.png and b/icons/check.png differ diff --git a/icons/moonstone.ico b/icons/moonstone.ico index 2533f9c..1fed997 100644 Binary files a/icons/moonstone.ico and b/icons/moonstone.ico differ diff --git a/icons/moonstone.png b/icons/moonstone.png index c3c7f04..6b6114d 100644 Binary files a/icons/moonstone.png and b/icons/moonstone.png differ diff --git a/images/interface.png b/images/interface.png index 663be0f..c0bdc57 100644 Binary files a/images/interface.png and b/images/interface.png differ diff --git a/src/__init__.py b/src/__init__.py index ac1ee21..aeb2c84 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,2 +1 @@ -"""Moonstone - Desktop app for bol-van/zapret.""" - +"""Sakura Flow - Optimized desktop app for bol-van/zapret.""" diff --git a/src/__pycache__/__init__.cpython-313.pyc b/src/__pycache__/__init__.cpython-313.pyc new file mode 100644 index 0000000..8476097 Binary files /dev/null and b/src/__pycache__/__init__.cpython-313.pyc differ diff --git a/src/__pycache__/admin.cpython-313.pyc b/src/__pycache__/admin.cpython-313.pyc new file mode 100644 index 0000000..ac6635f Binary files /dev/null and b/src/__pycache__/admin.cpython-313.pyc differ diff --git a/src/__pycache__/autostart.cpython-313.pyc b/src/__pycache__/autostart.cpython-313.pyc new file mode 100644 index 0000000..f93901a Binary files /dev/null and b/src/__pycache__/autostart.cpython-313.pyc differ diff --git a/src/__pycache__/config.cpython-313.pyc b/src/__pycache__/config.cpython-313.pyc new file mode 100644 index 0000000..550211a Binary files /dev/null and b/src/__pycache__/config.cpython-313.pyc differ diff --git a/src/__pycache__/service.cpython-313.pyc b/src/__pycache__/service.cpython-313.pyc new file mode 100644 index 0000000..fc4c27d Binary files /dev/null and b/src/__pycache__/service.cpython-313.pyc differ diff --git a/src/__pycache__/state.cpython-313.pyc b/src/__pycache__/state.cpython-313.pyc new file mode 100644 index 0000000..b3123f7 Binary files /dev/null and b/src/__pycache__/state.cpython-313.pyc differ diff --git a/src/__pycache__/ui.cpython-313.pyc b/src/__pycache__/ui.cpython-313.pyc new file mode 100644 index 0000000..2c8ab3b Binary files /dev/null and b/src/__pycache__/ui.cpython-313.pyc differ diff --git a/src/__pycache__/updater.cpython-313.pyc b/src/__pycache__/updater.cpython-313.pyc new file mode 100644 index 0000000..6ac9b30 Binary files /dev/null and b/src/__pycache__/updater.cpython-313.pyc differ diff --git a/src/config.py b/src/config.py index 1d2bc46..40d926c 100644 --- a/src/config.py +++ b/src/config.py @@ -1,27 +1,26 @@ -"""Configuration constants for Moonstone application.""" +"""Configuration constants for Sakura Flow application.""" import sys +import os from pathlib import Path -# Service and Task names -SERVICE_NAME = "MoonstoneZapret" -TASK_NAME = "MoonstoneAutostart" +# Названия +SERVICE_NAME = "SakuraFlowService" +TASK_NAME = "SakuraFlowAutostart" -# Base directory detection (works for both frozen and development) +# ΠšΠžΠ Π Π•ΠšΠ’ΠΠžΠ• ΠžΠŸΠ Π•Π”Π•Π›Π•ΠΠ˜Π• ПУВИ if getattr(sys, 'frozen', False): - BASE_DIR = Path(sys._MEIPASS) + # Если Π·Π°ΠΏΡƒΡ‰Π΅Π½ EXE, Π±Π΅Ρ€Π΅ΠΌ ΠΏΡƒΡ‚ΡŒ ΠΊ ΠΏΠ°ΠΏΠΊΠ΅, Π³Π΄Π΅ Π»Π΅ΠΆΠΈΡ‚ сам EXE + BASE_DIR = Path(sys.executable).resolve().parent else: + # Если Π·Π°ΠΏΡƒΡ‰Π΅Π½ скрипт, Π±Π΅Ρ€Π΅ΠΌ ΠΊΠΎΡ€Π΅Π½ΡŒ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° BASE_DIR = Path(__file__).resolve().parent.parent -# Paths +# ΠŸΡƒΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Π°ΠΌ (Ρ‚Π΅ΠΏΠ΅Ρ€ΡŒ ΠΎΠ½ΠΈ Π±ΡƒΠ΄ΡƒΡ‚ ΠΈΡΠΊΠ°Ρ‚ΡŒΡΡ рядом с SakuraFlow.exe) ICON_PATH = BASE_DIR / "icons" / "moonstone.ico" CHECK_ICON_PATH = BASE_DIR / "icons" / "check.ico" BAT_DIR = BASE_DIR / "zapret" -BUNDLED_DIR = BAT_DIR / "bundled" -BACKUP_DIR = BAT_DIR / "bundled_backup" LOG_FILE = BASE_DIR / "moonstone.log" STATE_FILE = BASE_DIR / "moonstone_state.json" -GITHUB_RELEASES_API = "https://api.github.com/repos/bol-van/zapret/releases/latest" - -# Encoding -ENCODING = "cp866" +# ΠšΠΎΠ΄ΠΈΡ€ΠΎΠ²ΠΊΠ° для Windows Π±Π°Ρ‚Π½ΠΈΠΊΠΎΠ² +ENCODING = "cp866" diff --git a/src/main.py b/src/main.py index c19d3f2..1496e87 100644 --- a/src/main.py +++ b/src/main.py @@ -1,25 +1,21 @@ -"""Main entry point for Moonstone application.""" +"""Main entry point for Sakura Flow application.""" import sys import logging from pathlib import Path -# Handle both direct execution and module execution +# ΠžΠ±Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡƒΡ‚Π΅ΠΉ для запуска if __name__ == "__main__": - # Running as script - ensure parent directory is in path file_path = Path(__file__).resolve() parent_dir = file_path.parent.parent if str(parent_dir) not in sys.path: sys.path.insert(0, str(parent_dir)) - # Force package initialization by importing the package try: import src sys.modules['src'] = src except: pass - # Use absolute imports from src import admin, ui, config else: - # Running as module - use relative imports from . import admin, ui, config # Настройка логирования @@ -31,23 +27,26 @@ encoding='utf-8' ) - def main(): - """Main entry point.""" - logging.info("Начало выполнСния скрипта") + """Π’ΠΎΡ‡ΠΊΠ° Π²Ρ…ΠΎΠ΄Π° Π² ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅.""" + logging.info("Запуск Sakura Flow") - # Check for admin privileges + # ΠŸΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° ΠΏΡ€Π°Π² администратора if not admin.is_admin(): - logging.info("Π’Ρ€Π΅Π±ΡƒΡŽΡ‚ΡΡ ΠΏΡ€Π°Π²Π° администратора, пСрСзапуск...") + logging.info("Запрос ΠΏΡ€Π°Π² администратора...") admin.run_as_admin() - logging.info("Π’Ρ‹Π·ΠΎΠ² Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ main()") - - # Get batch files - bat_files = list(config.BAT_DIR.glob("*.bat")) + # --- Π’ΠžΠ’ Π’Π£Π’ Π˜Π—ΠœΠ•ΠΠ•ΠΠ˜Π• --- + # ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅ΠΌ всС .bat Ρ„Π°ΠΉΠ»Ρ‹, ΠΊΡ€ΠΎΠΌΠ΅ service.bat (Ρ‡Ρ‚ΠΎΠ±Ρ‹ ΠΎΠ½ Π½Π΅ ΠΌΠΎΠ·ΠΎΠ»ΠΈΠ» Π³Π»Π°Π·Π° Π² мСню) + # Π‘Π΅Ρ€Π΅ΠΌ всС .bat, ΠΊΡ€ΠΎΠΌΠ΅ Π²ΡΠΏΠΎΠΌΠΎΠ³Π°Ρ‚Π΅Π»ΡŒΠ½Ρ‹Ρ… service.bat ΠΈ самого general.bat + bat_files = [ + f for f in config.BAT_DIR.glob("*.bat") + if f.name.lower() not in ["service.bat", "general.bat"] + ] + - # Create and run tray application + # Запуск интСрфСйса sys.exit(ui.create_tray_app(bat_files)) if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/src/service.py b/src/service.py index 530dfae..cf27b99 100644 --- a/src/service.py +++ b/src/service.py @@ -1,172 +1,108 @@ -"""Windows service management functions.""" +"""Windows service management functions for Sakura Flow.""" import subprocess import re import sys import logging from pathlib import Path -# Handle both relative and absolute imports try: from .config import SERVICE_NAME, BAT_DIR, ENCODING except ImportError: from src.config import SERVICE_NAME, BAT_DIR, ENCODING - def run_cmd(cmd): - """Execute a shell command and log the results.""" + """Π’Ρ‹ΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹ ΠΎΠ±ΠΎΠ»ΠΎΡ‡ΠΊΠΈ.""" logging.info(f"Π’Ρ‹ΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹: {cmd}") try: result = subprocess.run(cmd, shell=True, capture_output=True, text=True, encoding=ENCODING) - if result.stdout: - logging.info(f"Π’Ρ‹Π²ΠΎΠ΄ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹: {result.stdout.strip()}") - if result.stderr: - logging.error(f"Ошибка ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹: {result.stderr.strip()}") return result except Exception as e: - logging.error(f"Π˜ΡΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΠ΅ ΠΏΡ€ΠΈ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½ΠΈΠΈ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹: {e}") + logging.error(f"Ошибка ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹: {e}") return None - def service_exists(): - """Check if the service exists.""" + """ΠŸΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° сущСствования слуТбы.""" result = run_cmd(f'sc.exe query "{SERVICE_NAME}"') - if result and (SERVICE_NAME in result.stdout): - logging.info(f"Π‘Π»ΡƒΠΆΠ±Π° '{SERVICE_NAME}' сущСствуСт.") - return True - logging.info(f"Π‘Π»ΡƒΠΆΠ±Π° '{SERVICE_NAME}' Π½Π΅ сущСствуСт.") - return False - + return result and (SERVICE_NAME in result.stdout) def get_service_display_name(): - """Get the display name of the service.""" - if not service_exists(): - return None + """ΠŸΠΎΠ»ΡƒΡ‡Π΅Π½ΠΈΠ΅ ΠΈΠΌΠ΅Π½ΠΈ слуТбы.""" + if not service_exists(): return None result = run_cmd(f'sc.exe qc "{SERVICE_NAME}"') if result and result.returncode == 0: match = re.search(r'DISPLAY_NAME\s*:\s*(.+)', result.stdout) - if match: - display_name = match.group(1).strip() - logging.info(f"ΠŸΠΎΠ»ΡƒΡ‡Π΅Π½ΠΎ ΠΎΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ°Π΅ΠΌΠΎΠ΅ имя слуТбы: {display_name}") - return display_name - logging.error("НС ΡƒΠ΄Π°Π»ΠΎΡΡŒ ΠΏΠΎΠ»ΡƒΡ‡ΠΈΡ‚ΡŒ ΠΎΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ°Π΅ΠΌΠΎΠ΅ имя слуТбы") + if match: return match.group(1).strip() return None - def parse_bat_file(batch_path): - """Parse a batch file to extract executable and arguments.""" - logging.info(f"Π§Ρ‚Π΅Π½ΠΈΠ΅ .bat Ρ„Π°ΠΉΠ»Π°: {batch_path}") - if not batch_path.exists(): - logging.error(f"Π€Π°ΠΉΠ» .bat Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½: {batch_path}") - sys.exit(f"Batch file not found: {batch_path}") - try: - with open(batch_path, 'r', encoding=ENCODING) as f: - bat_content = f.read() - except Exception as e: - logging.error(f"Ошибка ΠΏΡ€ΠΈ Ρ‡Ρ‚Π΅Π½ΠΈΠΈ .bat Ρ„Π°ΠΉΠ»Π°: {e}") - sys.exit(f"Failed to read batch file: {e}") - - bin_match = re.search(r'set\s+"?BIN=%~dp0([^"\s]*)"?', bat_content) - lists_match = re.search(r'set\s+"?LISTS=%~dp0([^"\s]*)"?', bat_content) - configs_match = re.search(r'set\s+"?CONFIGS=%~dp0([^"\s]*)"?', bat_content) - bin_path = Path(batch_path.parent / (bin_match.group(1) if bin_match else "bundled")) - lists_path = Path(batch_path.parent / (lists_match.group(1) if lists_match else "lists")) - configs_path = Path(batch_path.parent / (configs_match.group(1) if configs_match else "configs")) - logging.info(f"BIN ΠΏΡƒΡ‚ΡŒ: {bin_path}") - logging.info(f"LISTS ΠΏΡƒΡ‚ΡŒ: {lists_path}") - logging.info(f"CONFIGS ΠΏΡƒΡ‚ΡŒ: {configs_path}") - + """ΠŸΠ°Ρ€ΡΠΈΠ½Π³ .bat Ρ„Π°ΠΉΠ»Π° с подстановкой ΠΏΠΎΡ€Ρ‚ΠΎΠ² Rocket League.""" + logging.info(f"Π Π°Π·Π±ΠΎΡ€ стратСгии: {batch_path}") + with open(batch_path, 'r', encoding=ENCODING) as f: + bat_content = f.read() + + base_zapret = batch_path.parent + bin_dir = base_zapret / "bin" + lists_dir = base_zapret / "lists" + configs_dir = base_zapret / "configs" + + # 1. Π’ΡˆΠΈΠ²Π°Π΅ΠΌ ΠΏΠΎΡ€Ρ‚Ρ‹ Rocket League + game_ports = "1-65535" + bat_content = bat_content.replace("%GameFilter%", game_ports) + + # 2. ИзвлСкаСм ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ winws.exe start_match = re.search(r'start\s+"[^"]*"\s+/min\s+"([^"]+)"\s+(.+)', bat_content, re.DOTALL) if not start_match: - logging.error("НС ΡƒΠ΄Π°Π»ΠΎΡΡŒ Ρ€Π°Π·ΠΎΠ±Ρ€Π°Ρ‚ΡŒ ΠΊΠΎΠΌΠ°Π½Π΄Ρƒ winws.exe ΠΈΠ· .bat Ρ„Π°ΠΉΠ»Π°") - sys.exit("Could not parse winws.exe command from batch file") - - executable = start_match.group(1).strip() + sys.exit("Ошибка: winws.exe Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½ Π² Π±Π°Ρ‚Π½ΠΈΠΊΠ΅") + + executable = str(bin_dir / "winws.exe") args = start_match.group(2).strip().replace('^', '').replace('\n', ' ').strip() - executable = executable.replace("%BIN%", str(bin_path)+"\\").replace("%LISTS%", str(lists_path)+"\\").replace("%CONFIGS%", str(configs_path)+"\\") - args = args.replace("%BIN%", str(bin_path)+"\\").replace("%LISTS%", str(lists_path)+"\\").replace("%CONFIGS%", str(configs_path)+"\\") - logging.info(f"EXECUTABLE: {executable}") - logging.info(f"ARGS: {args}") - - if not Path(executable).exists(): - logging.error(f"Π˜ΡΠΏΠΎΠ»Π½ΡΠ΅ΠΌΡ‹ΠΉ Ρ„Π°ΠΉΠ» Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½: {executable}") - sys.exit(f"Executable not found: {executable}") + + # 3. ЗамСняСм макросы ΠΏΡƒΡ‚Π΅ΠΉ + replacements = { + "%BIN%": str(bin_dir) + "\\", + "%LISTS%": str(lists_dir) + "\\", + "%CONFIGS%": str(configs_dir) + "\\", + "%~dp0": str(base_zapret) + "\\" + } + + for macro, real_path in replacements.items(): + args = args.replace(macro, real_path) + executable = executable.replace(macro, real_path) + + # ΠžΡ‡ΠΈΡΡ‚ΠΊΠ° ΠΏΡƒΡ‚Π΅ΠΉ ΠΎΡ‚ Π΄Π²ΠΎΠΉΠ½Ρ‹Ρ… слСшСй + args = args.replace("\\\\", "\\") + logging.info(f"Команда Π³ΠΎΡ‚ΠΎΠ²Π°. EXE: {executable}") return executable, args - def create_service(batch_path, display_version): - """Create a Windows service from a batch file.""" + """Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ слуТбы.""" executable, args = parse_bat_file(batch_path) - service_display = f"Moonstone Zapret DPI Bypass version[{display_version}]" + service_display = f"Sakura Flow DPI Bypass version[{display_version}]" + quoted_exe = f'"{executable}"' if ' ' in str(executable) else str(executable) + bin_path_value = f'{quoted_exe} {args}' - # Properly quote the executable path if it contains spaces - # For sc.exe binPath, the executable must be quoted if it has spaces - if ' ' in str(executable): - quoted_executable = f'"{executable}"' - else: - quoted_executable = str(executable) - - # Construct the full binPath - the entire value needs to be quoted - # and the executable within it should also be quoted if it has spaces - bin_path_value = f'{quoted_executable} {args}' - - # For sc.exe, use subprocess.run directly without shell to avoid quote interpretation issues - # sc.exe expects parameters like "binPath= value" where value can contain spaces cmd_args = [ - 'sc.exe', 'create', SERVICE_NAME, - 'start=', 'auto', - 'displayname=', service_display, - 'binPath=', bin_path_value + 'sc.exe', 'create', SERVICE_NAME, 'start=', 'auto', + 'displayname=', service_display, 'binPath=', bin_path_value ] - - logging.info(f"Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ слуТбы '{SERVICE_NAME}' с ΠΎΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ°Π΅ΠΌΡ‹ΠΌ ΠΈΠΌΠ΅Π½Π΅ΠΌ '{service_display}'...") - logging.info(f"Π’Ρ‹ΠΏΠΎΠ»Π½Π΅Π½ΠΈΠ΅ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹: {' '.join(cmd_args)}") - try: - result = subprocess.run(cmd_args, capture_output=True, text=True, encoding=ENCODING) - if result.stdout: - logging.info(f"Π’Ρ‹Π²ΠΎΠ΄ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹: {result.stdout.strip()}") - if result.stderr: - logging.error(f"Ошибка ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹: {result.stderr.strip()}") - if result.returncode != 0: - logging.error(f"НС ΡƒΠ΄Π°Π»ΠΎΡΡŒ ΡΠΎΠ·Π΄Π°Ρ‚ΡŒ слуТбу: {result.stderr}") - sys.exit(f"Failed to create service: {result.stderr}") - except Exception as e: - logging.error(f"Π˜ΡΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΠ΅ ΠΏΡ€ΠΈ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½ΠΈΠΈ ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹: {e}") - sys.exit(f"Failed to create service: {e}") - - if service_exists(): - logging.info(f"Π‘Π»ΡƒΠΆΠ±Π° '{SERVICE_NAME}' ΡƒΡΠΏΠ΅ΡˆΠ½ΠΎ создана.") - else: - logging.error(f"Π‘Π»ΡƒΠΆΠ±Π° '{SERVICE_NAME}' Π½Π΅ Π±Ρ‹Π»Π° создана.") - sys.exit(f"Service '{SERVICE_NAME}' was not created.") - + subprocess.run(cmd_args, capture_output=True, text=True, encoding=ENCODING) def start_service(batch_path, display_version): - """Start the service, recreating it if necessary.""" + """Запуск слуТбы.""" if service_exists(): - logging.info("Π‘Π»ΡƒΠΆΠ±Π° сущСствуСт, остановка ΠΈ ΡƒΠ΄Π°Π»Π΅Π½ΠΈΠ΅ для пСрСсоздания с Π½ΠΎΠ²Ρ‹ΠΌ .bat...") stop_service() delete_service() create_service(batch_path, display_version) - logging.info(f"Запуск слуТбы '{SERVICE_NAME}'...") - result = run_cmd(f'sc.exe start "{SERVICE_NAME}"') - if result and result.returncode != 0: - logging.error(f"НС ΡƒΠ΄Π°Π»ΠΎΡΡŒ Π·Π°ΠΏΡƒΡΡ‚ΠΈΡ‚ΡŒ слуТбу: {result.stderr}") - + run_cmd(f'sc.exe start "{SERVICE_NAME}"') def stop_service(): - """Stop the service.""" + """ΠžΡΡ‚Π°Π½ΠΎΠ²ΠΊΠ°.""" if service_exists(): - logging.info(f"ΠžΡΡ‚Π°Π½ΠΎΠ²ΠΊΠ° слуТбы '{SERVICE_NAME}'...") run_cmd(f'sc.exe stop "{SERVICE_NAME}"') - # Π”ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎ останавливаСм Windivert Ссли Π²Π΄Ρ€ΡƒΠ³ Π·Π°ΠΏΡƒΡ‰Π΅Π½Π° - logging.info(f"ΠžΡΡ‚Π°Π½ΠΎΠ²ΠΊΠ° слуТбы 'WinDivert'...") - run_cmd(f'sc.exe stop "WinDivert"') - + run_cmd('sc.exe stop "WinDivert"') def delete_service(): - """Delete the service.""" + """Π£Π΄Π°Π»Π΅Π½ΠΈΠ΅.""" if service_exists(): - logging.info(f"Π£Π΄Π°Π»Π΅Π½ΠΈΠ΅ слуТбы '{SERVICE_NAME}'...") run_cmd(f'sc.exe delete "{SERVICE_NAME}"') - diff --git a/src/ui.py b/src/ui.py index 7911afb..d96aeec 100644 --- a/src/ui.py +++ b/src/ui.py @@ -1,4 +1,4 @@ -"""UI/Tray interface functions.""" +"""UI/Tray interface functions for Sakura Flow.""" import subprocess import re import sys @@ -6,30 +6,29 @@ import logging from pathlib import Path +# Π”ΠΎΠ±Π°Π²Π»Π΅Π½ QCursor Π² ΠΈΠΌΠΏΠΎΡ€Ρ‚Ρ‹ для Ρ€Π°Π±ΠΎΡ‚Ρ‹ Π›ΠšΠœ from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QMenu, QAction -from PyQt5.QtGui import QIcon, QFont +from PyQt5.QtGui import QIcon, QFont, QCursor from PyQt5.QtCore import Qt -# Handle both relative and absolute imports +# Π˜ΠΌΠΏΠΎΡ€Ρ‚Ρ‹ ΠΈΠ· Ρ‚Π²ΠΎΠ΅Π³ΠΎ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° try: from .config import ICON_PATH, CHECK_ICON_PATH, BASE_DIR - from . import service, autostart, state, updater + from . import service, autostart, state except ImportError: from src.config import ICON_PATH, CHECK_ICON_PATH, BASE_DIR - from src import service, autostart, state, updater + from src import service, autostart, state - -def open_config_folder(): - """Open the configuration folder in Windows Explorer.""" +def open_dns_settings(): + """ΠžΡ‚ΠΊΡ€Ρ‹Π²Π°Π΅Ρ‚ ΠΎΠΊΠ½ΠΎ сСтСвых ΠΏΠΎΠ΄ΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΠΉ Windows.""" try: - subprocess.Popen(f'explorer "{BASE_DIR}"') - logging.info(f"ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚Π° ΠΏΠ°ΠΏΠΊΠ° ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈ: {BASE_DIR}") + subprocess.Popen("control ncpa.cpl", shell=True) + logging.info("ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΠΎ ΠΎΠΊΠ½ΠΎ настроСк сСтСвых ΠΏΠΎΠ΄ΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΠΉ") except Exception as e: - logging.error(f"Ошибка ΠΏΡ€ΠΈ ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΠΈΠΈ ΠΏΠ°ΠΏΠΊΠΈ ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈ: {e}") - + logging.error(f"Ошибка ΠΏΡ€ΠΈ ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚ΠΈΠΈ DNS: {e}") def create_start_handler(batch_path, start_menu, actions): - """Create a handler function for starting a service.""" + """ΠžΠ±Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊ запуска сСрвиса.""" def handler(): display_version = batch_path.stem state.save_state(last_bat=batch_path.stem, stopped=False) @@ -40,9 +39,8 @@ def handler(): update_menu_styles(start_menu, actions, batch_path.stem) return handler - def on_stop(start_menu, actions): - """Handle stop action.""" + """ΠžΠ±Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊ остановки.""" state.save_state(last_bat=None, stopped=True) threading.Thread( target=lambda: ( @@ -53,170 +51,106 @@ def on_stop(start_menu, actions): daemon=True ).start() - -def on_exit(tray, start_menu, actions): - """Handle exit action.""" - service.stop_service() - service.delete_service() - update_menu_styles(start_menu, actions, None) - tray.hide() - QApplication.quit() - - def update_menu_styles(start_menu, actions, active_version): - """Update menu styles to highlight the active version.""" + """ΠŸΠΎΠ΄ΡΠ²Π΅Ρ‚ΠΊΠ° Π°ΠΊΡ‚ΠΈΠ²Π½ΠΎΠ³ΠΎ Π±Π°Ρ‚Π½ΠΈΠΊΠ° (ΠΆΠΈΡ€Π½Ρ‹ΠΉ ΡˆΡ€ΠΈΡ„Ρ‚ + ΠΈΠΊΠΎΠ½ΠΊΠ°).""" try: for bat, action in actions.items(): - base_text = bat.stem if bat.stem == active_version: font = QFont() font.setBold(True) action.setFont(font) if CHECK_ICON_PATH.exists(): action.setIcon(QIcon(str(CHECK_ICON_PATH))) - else: - logging.warning(f"Иконка ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠΈ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½Π°: {CHECK_ICON_PATH}") else: - action.setText(base_text) action.setFont(QFont()) action.setIcon(QIcon()) start_menu.update() - logging.info(f"ΠžΠ±Π½ΠΎΠ²Π»Π΅Π½Ρ‹ стили мСню, активная вСрсия: {active_version}") except Exception as e: - logging.error(f"Ошибка ΠΏΡ€ΠΈ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠΈ стилСй мСню: {e}") - - -def create_tray_notifier(tray): - """Return a function to show tray messages with unified style.""" - def _notify(title, message, is_error=False): - icon = QSystemTrayIcon.Critical if is_error else QSystemTrayIcon.Information - tray.showMessage(f"Moonstone - {title}", message, icon, 3000) - return _notify - - -def on_update_bundled(tray): - """Handle bundled files update.""" - notifier = create_tray_notifier(tray) - - def run_update(): - notifier("ОбновлСниС ΠΏΠ°ΠΊΠ΅Ρ‚Π°", "Запуск обновлСния...", False) - try: - updater.update_bundled(tray_notify=notifier) - except Exception as e: # noqa: BLE001 - logging.error(f"Ошибка ΠΏΡ€ΠΈ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠΈ ΠΏΠ°ΠΊΠ΅Ρ‚Π°: {e}", exc_info=True) - threading.Thread(target=run_update, daemon=True).start() - + logging.error(f"Ошибка обновлСния стилСй: {e}") def create_tray_app(bat_files): - """Create and configure the system tray application.""" - logging.info("Запуск основного прилоТСния") - if not ICON_PATH.exists(): - logging.error(f"Иконка Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½Π°: {ICON_PATH}") - sys.exit(f"Icon not found: {ICON_PATH}") + """Π‘ΠΎΠ·Π΄Π°Π½ΠΈΠ΅ основного прилоТСния трСя.""" + app = QApplication(sys.argv) + app.setQuitOnLastWindowClosed(False) + + tray = QSystemTrayIcon(QIcon(str(ICON_PATH))) + tray.setToolTip("Sakura Flow") + + menu = QMenu() + # Бтилизация ΠΏΠΎΠ΄ Ρ‚Π²ΠΎΠΉ ΡΠΊΡ€ΠΈΠ½ΡˆΠΎΡ‚ + menu.setStyleSheet(""" + QMenu { + background-color: #0f0a12; + color: #ffffff; + border: 1px solid #3d1b28; + font-size: 14px; + } + QMenu::item { padding: 6px 28px 6px 12px; } + QMenu::item:selected { background-color: #2d1621; } + QMenu::separator { height: 1px; background: #3d1b28; margin: 4px; } + """) + + # --- START --- + start_menu = QMenu(" Start", menu) + start_menu.setIcon(QIcon(str(ICON_PATH))) + start_menu.setStyleSheet(menu.styleSheet()) - if not bat_files: - logging.error(f"Π€Π°ΠΉΠ»Ρ‹ .bat Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½Ρ‹ Π² Π΄ΠΈΡ€Π΅ΠΊΡ‚ΠΎΡ€ΠΈΠΈ zapret") - sys.exit("No .bat files found in zapret directory.") - - logging.info(f"НайдСно {len(bat_files)} .bat Ρ„Π°ΠΉΠ»ΠΎΠ²: {[f.name for f in bat_files]}") - logging.info(f"Π—Π°Π³Ρ€ΡƒΠ·ΠΊΠ° ΠΈΠΊΠΎΠ½ΠΊΠΈ ΠΈΠ·: {ICON_PATH}") - - try: - app = QApplication(sys.argv) - app.setQuitOnLastWindowClosed(False) - - tray = QSystemTrayIcon(QIcon(str(ICON_PATH))) - tray.setToolTip("Moonstone") - - menu = QMenu() - menu.setStyleSheet(""" - QMenu { - background-color: #0d1121; - color: white; - border: 1px solid #1e2647; - font-size: 16px; - padding: 4px; - } - QMenu::item:selected { - background-color: #1e2647; - } - """) - - start_menu = QMenu("Start") - start_menu.setStyleSheet(""" - QMenu { - background-color: #0d1121; - color: white; - border: 1px solid #1e2647; - font-size: 16px; - padding: 4px; - } - QMenu::item:selected { - background-color: #1e2647; - } - """) - - actions = {} + actions = {} + for bat in bat_files: + action = start_menu.addAction(bat.stem) + action.triggered.connect(create_start_handler(bat, start_menu, actions)) + actions[bat] = action + menu.addMenu(start_menu) + + # --- DNS --- + dns_action = menu.addAction(" 🌐 DNS") + dns_action.triggered.connect(open_dns_settings) + + menu.addSeparator() + + # --- STOP / AUTOSTART --- + stop_action = menu.addAction(" Stop") + stop_action.triggered.connect(lambda: on_stop(start_menu, actions)) + + autostart_action = menu.addAction(" Autostart") + autostart_action.setCheckable(True) + autostart_action.setChecked(autostart.is_autostart_enabled()) + autostart_action.toggled.connect(lambda chk: autostart.enable_autostart() if chk else autostart.disable_autostart()) + + menu.addSeparator() + + # --- EXIT --- + exit_action = menu.addAction(" Exit") + exit_action.triggered.connect(lambda: (service.stop_service(), tray.hide(), QApplication.quit())) + + # --- Π›ΠžΠ“Π˜ΠšΠ Π›ΠšΠœ (ЛСвая ΠΊΠ½ΠΎΠΏΠΊΠ° ΠΌΡ‹ΡˆΠΈ) --- + def on_tray_activated(reason): + # 3 - это Trigger (Π›ΠšΠœ), 2 - это DoubleClick + if reason in (QSystemTrayIcon.Trigger, QSystemTrayIcon.DoubleClick): + # ΠŸΠΎΠΊΠ°Π·Ρ‹Π²Π°Π΅ΠΌ мСню Π² ΠΏΠΎΠ·ΠΈΡ†ΠΈΠΈ курсора + menu.popup(QCursor.pos()) + + tray.activated.connect(on_tray_activated) + + # ΠŸΡ€ΠΈΠ²ΡΠ·Ρ‹Π²Π°Π΅ΠΌ мСню ΠΊ ПКМ (стандартно) + tray.setContextMenu(menu) + tray.show() + + # ВосстановлСниС состояния ΠΏΡ€ΠΈ запускС + display_name = service.get_service_display_name() + active_version = None + if display_name: + match = re.search(r'version\[([^\]]+)\]', display_name) + if match: active_version = match.group(1) + update_menu_styles(start_menu, actions, active_version) + + # Автозапуск послСднСго сСрвиса + app_state = state.load_state() + if app_state["last_bat"] and not app_state["stopped"]: for bat in bat_files: - action = start_menu.addAction(bat.stem) - action.triggered.connect(create_start_handler(bat, start_menu, actions)) - actions[bat] = action - - menu.addMenu(start_menu) - stop_action = menu.addAction("Stop") - stop_action.triggered.connect(lambda: on_stop(start_menu, actions)) - - config_action = menu.addAction("Config") - config_action.triggered.connect(open_config_folder) - - update_bundled_action = menu.addAction("β­³ Zapret") - update_bundled_action.triggered.connect(lambda: on_update_bundled(tray)) - - autostart_action = menu.addAction("Autostart") - autostart_action.setCheckable(True) - autostart_action.setChecked(autostart.is_autostart_enabled()) - - def toggle_autostart(checked): - if checked: - autostart.enable_autostart() - else: - autostart.disable_autostart() - autostart_action.toggled.connect(toggle_autostart) - - exit_action = menu.addAction("Exit") - exit_action.triggered.connect(lambda: on_exit(tray, start_menu, actions)) - - # Determine active version from service display name - display_name = service.get_service_display_name() - active_version = None - if display_name: - match = re.search(r'version\[([^\]]+)\]', display_name) - if match: - active_version = match.group(1) - update_menu_styles(start_menu, actions, active_version) - - tray.setContextMenu(menu) - tray.show() - tray.showMessage("Moonstone", "ΠŸΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π·Π°ΠΏΡƒΡ‰Π΅Π½ΠΎ", QSystemTrayIcon.Information, 2000) - logging.info("БистСмный Ρ‚Ρ€Π΅ΠΉ ΠΎΡ‚ΠΎΠ±Ρ€Π°ΠΆΡ‘Π½") - - # Auto-start last used service if state indicates it should be running - app_state = state.load_state() - if app_state["last_bat"] and not app_state["stopped"]: - for bat in bat_files: - if bat.stem == app_state["last_bat"]: - logging.info(f"Автозапуск послСднСго использованного bat: {bat.stem}") - threading.Thread( - target=lambda: service.start_service(bat, bat.stem), - daemon=True - ).start() - update_menu_styles(start_menu, actions, bat.stem) - break - - logging.info("Запуск Π³Π»Π°Π²Π½ΠΎΠ³ΠΎ Ρ†ΠΈΠΊΠ»Π° прилоТСния") - return app.exec_() - - except Exception as e: - logging.error(f"Ошибка Π² Π³Π»Π°Π²Π½ΠΎΠΌ ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΈ: {e}") - sys.exit(1) + if bat.stem == app_state["last_bat"]: + threading.Thread(target=lambda: service.start_service(bat, bat.stem), daemon=True).start() + update_menu_styles(start_menu, actions, bat.stem) + break + return app.exec_() diff --git a/zapret/bundled/WinDivert.dll b/zapret/bin/WinDivert.dll similarity index 100% rename from zapret/bundled/WinDivert.dll rename to zapret/bin/WinDivert.dll diff --git a/zapret/bundled/WinDivert64.sys b/zapret/bin/WinDivert64.sys similarity index 100% rename from zapret/bundled/WinDivert64.sys rename to zapret/bin/WinDivert64.sys diff --git a/zapret/bundled/cygwin1.dll b/zapret/bin/cygwin1.dll similarity index 100% rename from zapret/bundled/cygwin1.dll rename to zapret/bin/cygwin1.dll diff --git a/zapret/bin/quic_initial_www_google_com.bin b/zapret/bin/quic_initial_www_google_com.bin new file mode 100644 index 0000000..80a07cc Binary files /dev/null and b/zapret/bin/quic_initial_www_google_com.bin differ diff --git a/zapret/bin/tls_clienthello_4pda_to.bin b/zapret/bin/tls_clienthello_4pda_to.bin new file mode 100644 index 0000000..21ac378 Binary files /dev/null and b/zapret/bin/tls_clienthello_4pda_to.bin differ diff --git a/zapret/bin/tls_clienthello_max_ru.bin b/zapret/bin/tls_clienthello_max_ru.bin new file mode 100644 index 0000000..1fe69d7 Binary files /dev/null and b/zapret/bin/tls_clienthello_max_ru.bin differ diff --git a/zapret/bin/tls_clienthello_www_google_com.bin b/zapret/bin/tls_clienthello_www_google_com.bin new file mode 100644 index 0000000..62985b6 Binary files /dev/null and b/zapret/bin/tls_clienthello_www_google_com.bin differ diff --git a/zapret/bundled/winws.exe b/zapret/bin/winws.exe similarity index 62% rename from zapret/bundled/winws.exe rename to zapret/bin/winws.exe index 224cc99..af316df 100644 Binary files a/zapret/bundled/winws.exe and b/zapret/bin/winws.exe differ diff --git a/zapret/bundled/ip2net.exe b/zapret/bundled/ip2net.exe deleted file mode 100644 index f20f445..0000000 Binary files a/zapret/bundled/ip2net.exe and /dev/null differ diff --git a/zapret/bundled/killall.exe b/zapret/bundled/killall.exe deleted file mode 100644 index 17efeeb..0000000 Binary files a/zapret/bundled/killall.exe and /dev/null differ diff --git a/zapret/bundled/mdig.exe b/zapret/bundled/mdig.exe deleted file mode 100644 index c562733..0000000 Binary files a/zapret/bundled/mdig.exe and /dev/null differ diff --git a/zapret/general (FAKE TLS AUTO ALT3).bat b/zapret/general (FAKE TLS AUTO ALT3).bat new file mode 100644 index 0000000..ea53ad3 --- /dev/null +++ b/zapret/general (FAKE TLS AUTO ALT3).bat @@ -0,0 +1,23 @@ +@echo off +chcp 65001 > nul +:: 65001 - UTF-8 + +cd /d "%~dp0" +call service.bat status_zapret +call service.bat check_updates +call service.bat load_game_filter +echo: + +set "BIN=%~dp0bin\" +set "LISTS=%~dp0lists\" +cd /d %BIN% + +start "zapret: %~n0" /min "%BIN%winws.exe" --wf-tcp=80,443,2053,2083,2087,2096,8443,%GameFilter% --wf-udp=443,19294-19344,50000-50100,%GameFilter% ^ +--filter-udp=443 --hostlist="%LISTS%list-general.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ +--filter-udp=19294-19344,50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-fake-discord="%BIN%quic_initial_www_google_com.bin" --dpi-desync-fake-stun="%BIN%quic_initial_www_google_com.bin" --dpi-desync-repeats=6 --new ^ +--filter-tcp=2053,2083,2087,2096,8443 --hostlist-domains=discord.media --dpi-desync=fake,multisplit --dpi-desync-split-seqovl=681 --dpi-desync-split-pos=1 --dpi-desync-fooling=ts --dpi-desync-repeats=8 --dpi-desync-split-seqovl-pattern="%BIN%tls_clienthello_www_google_com.bin" --dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com --new ^ +--filter-tcp=443 --hostlist="%LISTS%list-google.txt" --ip-id=zero --dpi-desync=fake,multisplit --dpi-desync-split-seqovl=681 --dpi-desync-split-pos=1 --dpi-desync-fooling=ts --dpi-desync-repeats=8 --dpi-desync-split-seqovl-pattern="%BIN%tls_clienthello_www_google_com.bin" --dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com --new ^ +--filter-tcp=80,443 --hostlist="%LISTS%list-general.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=fake,multisplit --dpi-desync-split-seqovl=681 --dpi-desync-split-pos=1 --dpi-desync-fooling=ts --dpi-desync-repeats=8 --dpi-desync-split-seqovl-pattern="%BIN%tls_clienthello_www_google_com.bin" --dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com --new ^ +--filter-udp=443 --ipset="%LISTS%ipset-all.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ +--filter-tcp=80,443,%GameFilter% --ipset="%LISTS%ipset-all.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=fake,multisplit --dpi-desync-split-seqovl=681 --dpi-desync-split-pos=1 --dpi-desync-fooling=ts --dpi-desync-repeats=8 --dpi-desync-split-seqovl-pattern="%BIN%tls_clienthello_www_google_com.bin" --dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com --new ^ +--filter-udp=%GameFilter% --ipset="%LISTS%ipset-all.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=fake --dpi-desync-autottl=2 --dpi-desync-repeats=10 --dpi-desync-any-protocol=1 --dpi-desync-fake-unknown-udp="%BIN%quic_initial_www_google_com.bin" --dpi-desync-cutoff=n2 diff --git a/zapret/general.bat b/zapret/general.bat index 6e05b87..e88c5c2 100644 --- a/zapret/general.bat +++ b/zapret/general.bat @@ -1,10 +1,23 @@ -cd /d "%~dp0" -set "BIN=%~dp0bundled\" -set "LISTS=%~dp0lists\" -set "CONFIGS=%~dp0configs\" - -start "zapret: general" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50099 ^ ---filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%CONFIGS%quic_initial_www_google_com.bin" --new ^ ---filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ ---filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ ---filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=split2 --dpi-desync-split-seqovl=652 --dpi-desync-split-pos=2 --dpi-desync-split-seqovl-pattern="%CONFIGS%tls_clienthello_www_google_com.bin" --new ^ \ No newline at end of file +@echo off +chcp 65001 > nul +:: 65001 - UTF-8 + +cd /d "%~dp0" +call service.bat status_zapret +call service.bat check_updates +call service.bat load_game_filter +echo: + +set "BIN=%~dp0bin\" +set "LISTS=%~dp0lists\" +cd /d %BIN% + +start "zapret: %~n0" /min "%BIN%winws.exe" --wf-tcp=80,443,2053,2083,2087,2096,8443,%GameFilter% --wf-udp=443,19294-19344,50000-50100,%GameFilter% ^ +--filter-udp=443 --hostlist="%LISTS%list-general.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ +--filter-udp=19294-19344,50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-fake-discord="%BIN%quic_initial_www_google_com.bin" --dpi-desync-fake-stun="%BIN%quic_initial_www_google_com.bin" --dpi-desync-repeats=6 --new ^ +--filter-tcp=2053,2083,2087,2096,8443 --hostlist-domains=discord.media --dpi-desync=multisplit --dpi-desync-split-seqovl=568 --dpi-desync-split-pos=1 --dpi-desync-split-seqovl-pattern="%BIN%tls_clienthello_4pda_to.bin" --new ^ +--filter-tcp=443 --hostlist="%LISTS%list-google.txt" --ip-id=zero --dpi-desync=multisplit --dpi-desync-split-seqovl=681 --dpi-desync-split-pos=1 --dpi-desync-split-seqovl-pattern="%BIN%tls_clienthello_www_google_com.bin" --new ^ +--filter-tcp=80,443 --hostlist="%LISTS%list-general.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=multisplit --dpi-desync-split-seqovl=568 --dpi-desync-split-pos=1 --dpi-desync-split-seqovl-pattern="%BIN%tls_clienthello_4pda_to.bin" --new ^ +--filter-udp=443 --ipset="%LISTS%ipset-all.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ +--filter-tcp=80,443,%GameFilter% --ipset="%LISTS%ipset-all.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=multisplit --dpi-desync-split-seqovl=568 --dpi-desync-split-pos=1 --dpi-desync-split-seqovl-pattern="%BIN%tls_clienthello_4pda_to.bin" --new ^ +--filter-udp=%GameFilter% --ipset="%LISTS%ipset-all.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --dpi-desync=fake --dpi-desync-autottl=2 --dpi-desync-repeats=12 --dpi-desync-any-protocol=1 --dpi-desync-fake-unknown-udp="%BIN%quic_initial_www_google_com.bin" --dpi-desync-cutoff=n2 diff --git a/zapret/lists/ipset-all.txt b/zapret/lists/ipset-all.txt new file mode 100644 index 0000000..649792c --- /dev/null +++ b/zapret/lists/ipset-all.txt @@ -0,0 +1,9 @@ +0.0.0.0/0 +91.108.4.0/22 +91.108.8.0/22 +91.108.56.0/22 +149.154.160.0/20 +149.154.164.0/22 +149.154.167.0/24 +95.161.64.0/20 +149.154.160.0/21 \ No newline at end of file diff --git a/zapret/lists/ipset-all.txt.backup b/zapret/lists/ipset-all.txt.backup new file mode 100644 index 0000000..0af8aa2 --- /dev/null +++ b/zapret/lists/ipset-all.txt.backup @@ -0,0 +1,60 @@ +203.0.113.113/32 +103.140.28.0/23 +128.116.0.0/17 +128.116.0.0/24 +128.116.1.0/24 +128.116.5.0/24 +128.116.11.0/24 +128.116.13.0/24 +128.116.21.0/24 +128.116.22.0/24 +128.116.31.0/24 +128.116.32.0/24 +128.116.33.0/24 +128.116.35.0/24 +128.116.44.0/24 +128.116.45.0/24 +128.116.46.0/24 +128.116.48.0/24 +128.116.50.0/24 +128.116.51.0/24 +128.116.53.0/24 +128.116.54.0/24 +128.116.55.0/24 +128.116.56.0/24 +128.116.57.0/24 +128.116.63.0/24 +128.116.64.0/24 +128.116.67.0/24 +128.116.74.0/24 +128.116.80.0/24 +128.116.81.0/24 +128.116.84.0/24 +128.116.86.0/24 +128.116.87.0/24 +128.116.88.0/24 +128.116.95.0/24 +128.116.97.0/24 +128.116.99.0/24 +128.116.102.0/24 +128.116.104.0/24 +128.116.105.0/24 +128.116.115.0/24 +128.116.116.0/24 +128.116.117.0/24 +128.116.119.0/24 +128.116.120.0/24 +128.116.123.0/24 +128.116.127.0/24 +141.193.3.0/24 +205.201.62.0/24 +91.108.4.0/22 +91.108.8.0/22 +91.108.56.0/22 +95.161.64.0/20 +149.154.160.0/22 +149.154.160.0/23 +149.154.162.0/23 +149.154.164.0/22 +149.154.164.0/23 +149.154.166.0/23 \ No newline at end of file diff --git a/zapret/lists/ipset-exclude.txt b/zapret/lists/ipset-exclude.txt new file mode 100644 index 0000000..7e05757 --- /dev/null +++ b/zapret/lists/ipset-exclude.txt @@ -0,0 +1,11 @@ +0.0.0.0/8 +10.0.0.0/8 +127.0.0.0/8 +172.16.0.0/12 +192.168.0.0/16 +169.254.0.0/16 +224.0.0.0/4 +100.64.0.0/10 +::1 +fc00::/7 +fe80::/10 \ No newline at end of file diff --git a/zapret/lists/list-exclude.txt b/zapret/lists/list-exclude.txt new file mode 100644 index 0000000..b46cf28 --- /dev/null +++ b/zapret/lists/list-exclude.txt @@ -0,0 +1,26 @@ +pusher.com +live-video.net +ttvnw.net +twitch.tv +mail.ru +citilink.ru +yandex.com +nvidia.com +donationalerts.com +vk.com +yandex.kz +mts.ru +multimc.org +ya.ru +dns-shop.ru +habr.com +3dnews.ru +sberbank.ru +ozon.ru +wildberries.ru +microsoft.com +msi.com +akamaitechnologies.com +2ip.ru +yandex.ru +lolz.live \ No newline at end of file diff --git a/zapret/lists/list-general.txt b/zapret/lists/list-general.txt index d77b1c7..d2ab840 100644 --- a/zapret/lists/list-general.txt +++ b/zapret/lists/list-general.txt @@ -1,88 +1,328 @@ -music.youtube.com -googlevideo.com -*.googlevideo.com -youtu.be -youtube.com -www.youtube.com -accounts.youtube.com -youtubei.googleapis.com -i.ytimg.com -i1.ytimg.com -ytimg.com -ggpht.com -youtubekids.com -discord.com -gateway.discord.gg -cdn.discordapp.com -discordapp.net -discordapp.com -discord.gg -media.discordapp.net -images-ext-1.discordapp.net -www.discord.com -www.discord.app -discord.app -*.discord.com -*.discord.gg -*.discordapp.com -*.discordapp.net -discord.media -*.discord.media -discordcdn.com -discord.dev -discord.new -discord.gift -discordstatus.com +cloudflare-ech.com +encryptedsni.com +cloudflareaccess.com +cloudflareapps.com +cloudflarebolt.com +cloudflareclient.com +cloudflareinsights.com +cloudflareok.com +cloudflarepartners.com +cloudflareportal.com +cloudflarepreview.com +cloudflareresolve.com +cloudflaressl.com +cloudflarestatus.com +cloudflarestorage.com +cloudflarestream.com +cloudflaretest.com dis.gd -discord.co discord-attachments-uploads-prd.storage.googleapis.com -flibusta.is -rutracker.org -play.google.com -googlevideo.com -youtu.be -youtube.com -youtubei.googleapis.com -youtubeembeddedplayer.googleapis.com -ytimg.l.google.com -ytimg.com -jnn-pa.googleapis.com -youtube-nocookie.com -youtube-ui.l.google.com -yt-video-upload.l.google.com -wide-youtube.l.google.com -youtubekids.com -ggpht.com +discord.app +discord.co discord.com -gateway.discord.gg -cdn.discordapp.com -discordapp.net -discordapp.com +discord.design +discord.dev +discord.gift +discord.gifts discord.gg -media.discordapp.net -images-ext-1.discordapp.net -discord.app discord.media -discordcdn.com -discord.dev discord.new -discord.gift +discord.store +discord.status +discord-activities.com +discordactivities.com +discordapp.com +discordapp.net +discordcdn.com +discordmerch.com +discordpartygames.com +discordsays.com +discordsez.com discordstatus.com -dis.gd -discord.co -discord-attachments-uploads-prd.storage.googleapis.com +frankerfacez.com +ffzap.com +betterttv.net 7tv.app 7tv.io -10tv.app -cloudflare-ech.com -jut.su -rutracker.cc -animego.org -animego.online -senkuro.com -pypi.org -*.microsoft.com -microsoft.com -grok.com -linkedin.com +roblox.com +www.roblox.com +auth.roblox.com +accountsettings.roblox.com +assetgame.roblox.com +assetdelivery.roblox.com +catalog.roblox.com +avatar.roblox.com +itemconfiguration.roblox.com +economy.roblox.com +apis.roblox.com +clientsettings.api.roblox.com +chat.roblox.com +voice.roblox.com +friends.roblox.com +groups.roblox.com +notifications.roblox.com +presence.roblox.com +realtime.roblox.com +chatmoderation.roblox.com +studio.roblox.com +publish.roblox.com +develop.roblox.com +devforum.roblox.com +setup.rbxcdn.com +rbxcdn.com +versioncompatibility.roblox.com +sitetest.roblox.com +trades.roblox.com +translations.roblox.com +tutorials.roblox.com +ecs.roblox.com +gameanalytics.roblox.com +metrics.roblox.com +telemetry.roblox.com +abtesting.roblox.com +adconfiguration.roblox.com +ads.roblox.com +adserver.roblox.com +adspolicy.roblox.com +api.roblox.com +billing.roblox.com +captcha.roblox.com +cdn.roblox.com +chatrealtime.roblox.com +client-telemetry.roblox.com +clientsettingscdn.roblox.com +clicks.roblox.com +contentstore.roblox.com +ephemeralcounters.api.roblox.com +followings.roblox.com +gamepersistence.roblox.com +games.roblox.com +graphql.roblox.com +groupsmoderation.roblox.com +inventory.roblox.com +locale.roblox.com +localizationtables.roblox.com +matchmaking.roblox.com +pointbalancing.roblox.com +premiumfeatures.roblox.com +privatemessages.roblox.com +ratings.roblox.com +search.roblox.com +thumbnails.roblox.com +tix.roblox.com +translationservice.roblox.com +users.roblox.com +usersmoderation.roblox.com +web.roblox.com +wiki.roblox.com +wire.roblox.com +clientconfig.roblox.com +config.roblox.com +crl.roblox.com +status.roblox.com +setup.roblox.com +update.roblox.com +s3.amazonaws.com +stun.l.google.com +stun1.l.google.com +stun2.l.google.com +stun3.l.google.com +stun4.l.google.com +stun.services.mozilla.com +global.stun.twilio.com +turn.twilio.com +geoip.roblox.com +geoip.services.roblox.com +ocsp.digicert.com +ocsp.verisign.com +crl.verisign.com +setup-cdn.roblox.com +roblox-setup.roblox.com +roblox-update.roblox.com +update-cdn.roblox.com +api.rbxcdn.com +setup.api.rbxcdn.com +setup.cache.rbxcdn.com +cs.rbxcdn.com +roblox-setup.cache.roblox.com +roblox-update.cache.roblox.com +setup.cache.roblox.com +update.cache.roblox.com +chat.roblox.com +gamejoin.roblox.com +client.roblox.com +contentdelivery.roblox.com +economycdn.roblox.com +chatmoderation.roblox.com +matchmaking.api.roblox.com +presence.api.roblox.com +friends.api.roblox.com +groups.api.roblox.com +inventory.api.roblox.com +catalog.api.roblox.com +avatar.api.roblox.com +users.api.roblox.com +develop.api.roblox.com +clientsettingscdn.roblox.com +client-telemetry.roblox.com +telemetry.roblox.com +metrics.roblox.com +gameanalytics.roblox.com +ecs.roblox.com +abtesting.roblox.com +adconfiguration.roblox.com +ads.roblox.com +adserver.roblox.com +adspolicy.roblox.com +billing.roblox.com +captcha.roblox.com +cdn.roblox.com +contentstore.roblox.com +ephemeralcounters.api.roblox.com +followings.roblox.com +games.roblox.com +graphql.roblox.com +groupsmoderation.roblox.com +itemconfiguration.roblox.com +locale.roblox.com +notifications.roblox.com +pointbalancing.roblox.com +premiumfeatures.roblox.com +privatemessages.roblox.com +ratings.roblox.com +realtime.roblox.com +search.roblox.com +tix.roblox.com +trades.roblox.com +tutorials.roblox.com +usersmoderation.roblox.com +wiki.roblox.com +wire.roblox.com +devforum.api.roblox.com +akamaized.net +cloudfront.net +amazonaws.com +rblx.com +robloxapp.com +robloxgames.com +robloxlabs.com +rbx.com +rbxlabs.com +rbxcdn.xyz +rbxcdn.site +rbxcdn.tech +rbxcdn.one +rbxcdn.today +rbxcdn.world +rbxcdn.services +rbxcdn.work +rbxcdn.space +rbxcdn.online +rbxcdn.store +rbxcdn.fun +rbxcdn.biz +rbxcdn.us +rbxcdn.org +rbxcdn.net +rbxcdn.co +rbxcdn.me +rbxcdn.tv +rbxcdn.cc +rbxcdn.gg +rbxcdn.dev +rbxcdn.io +edgecastcdn.net +footprint.net +llnwd.net +hwcdn.net +gcdn.co +g-cdn.net +cdngc.net +cdngs.net +secure.footprint.net +secure.llnwd.net +roblox.qq.com +roblox.cn +t.me +tg.dev +tg.org +tx.me +teleg.xyz +telegram.ai +telegram.asia +telegram.biz +telegram.cloud +telegram.cn +telegram.co +telegram.com +telegram.de +telegram.dev +telegram.dog +telegram.eu +telegram.fr +telegram.host +telegram.in +telegram.info +telegram.io +telegram.jp +telegram.me +telegram.net +telegram.org +telegram.qa +telegram.ru +telegram.services +telegram.solutions +telegram.space +telegram.team +telegram.tech +telegram.uk +telegram.us +telegram.website +telegram.xyz +telegramapp.org +telegra.ph +telesco.pe +nicegram.app +telegramdownload.com +cdn-telegram.org +comments.app +contest.com +fragment.com +graph.org +quiz.directory +tdesktop.com +telega.one +telegram-cdn.org +usercontent.dev +tgram.org +torg.org +epicgames.com +helpshift.com +ol.epicgames.com +rocketleague.com +psyonix.com +epicgames.dev +live-services.dot.net +openai.com +chatgpt.com +auth0.com +challenges.cloudflare.com +supercell.com +supercellid.li +game-api.supercell.com +clashofclans.com +brawlstars.com +instagram.com +facebook.com +x.com +twitter.com +t.me +telegram.me +telegram.org +vienna.me +vintersa.me +github.com +github.dev +github.io +githubusercontent.com diff --git a/zapret/lists/list-google.txt b/zapret/lists/list-google.txt new file mode 100644 index 0000000..250842a --- /dev/null +++ b/zapret/lists/list-google.txt @@ -0,0 +1,17 @@ +yt3.ggpht.com +yt4.ggpht.com +yt3.googleusercontent.com +googlevideo.com +jnn-pa.googleapis.com +stable.dl2.discordapp.net +wide-youtube.l.google.com +youtube-nocookie.com +youtube-ui.l.google.com +youtube.com +youtubeembeddedplayer.googleapis.com +youtubekids.com +youtubei.googleapis.com +youtu.be +yt-video-upload.l.google.com +ytimg.com +ytimg.l.google.com diff --git a/zapret/lists/rules.txt b/zapret/lists/rules.txt deleted file mode 100644 index 654286d..0000000 --- a/zapret/lists/rules.txt +++ /dev/null @@ -1,7 +0,0 @@ -!impostor and !loopback and - ((outbound and (((tcp.DstPort == 80) or (tcp.DstPort == 443)) or ((udp.DstPort == 443) or - (udp.DstPort >= 50000 and udp.DstPort <= 65535 and udp.PayloadLength == 74 and udp.Payload32[0] == 0x00010046 - ))) and - (((ip.DstAddr < 127.0.0.1 or ip.DstAddr > 127.255.255.255) and (ip.DstAddr < 10.0.0.0 or ip.DstAddr > 10.255.255.255) and (ip.DstAddr < 192.168.0.0 or ip.DstAddr > 192.168.255.255) and (ip.DstAddr < 172.16.0.0 or ip.DstAddr > 172.31.255.255) and (ip.DstAddr < 169.254.0.0 or ip.DstAddr > 169.254.255.255)) or ((ipv6.DstAddr > ::1) and (ipv6.DstAddr < 2001::0 or ipv6.DstAddr >= 2001:1::0) and (ipv6.DstAddr < fc00::0 or ipv6.DstAddr >= fe00::0) and (ipv6.DstAddr < fe80::0 or ipv6.DstAddr >= fec0::0) and (ipv6.DstAddr < ff00::0 or ipv6.DstAddr >= ffff::0)))) - or - (inbound and tcp and (tcp.Ack and tcp.Syn or tcp.Rst or tcp.Fin) and ((tcp.SrcPort == 80) or (tcp.SrcPort == 443)) and (((ip.SrcAddr < 127.0.0.1 or ip.SrcAddr > 127.255.255.255) and (ip.SrcAddr < 10.0.0.0 or ip.SrcAddr > 10.255.255.255) and (ip.SrcAddr < 192.168.0.0 or ip.SrcAddr > 192.168.255.255) and (ip.SrcAddr < 172.16.0.0 or ip.SrcAddr > 172.31.255.255) and (ip.SrcAddr < 169.254.0.0 or ip.SrcAddr > 169.254.255.255)) or ((ipv6.SrcAddr > ::1) and (ipv6.SrcAddr < 2001::0 or ipv6.SrcAddr >= 2001:1::0) and (ipv6.SrcAddr < fc00::0 or ipv6.SrcAddr >= fe00::0) and (ipv6.SrcAddr < fe80::0 or ipv6.SrcAddr >= fec0::0) and (ipv6.SrcAddr < ff00::0 or ipv6.SrcAddr >= ffff::0))))) \ No newline at end of file diff --git a/zapret/service.bat b/zapret/service.bat new file mode 100644 index 0000000..664605b --- /dev/null +++ b/zapret/service.bat @@ -0,0 +1,949 @@ +@echo off +set "LOCAL_VERSION=1.9.2" + +:: External commands +if "%~1"=="status_zapret" ( + call :test_service zapret soft + call :tcp_enable + exit /b +) + +if "%~1"=="check_updates" ( + if exist "%~dp0utils\check_updates.enabled" ( + if not "%~2"=="soft" ( + start /b service check_updates soft + ) else ( + call :service_check_updates soft + ) + ) + + exit /b +) + +if "%~1"=="load_game_filter" ( + call :game_switch_status + exit /b +) + +if "%1"=="admin" ( + call :check_command chcp + call :check_command find + call :check_command findstr + call :check_command netsh + + echo Started with admin rights +) else ( + call :check_extracted + call :check_command powershell + + echo Requesting admin rights... + powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/c \"\"%~f0\" admin\"' -Verb RunAs" + exit +) + + +:: MENU ================================ +setlocal EnableDelayedExpansion +:menu +cls +call :ipset_switch_status +call :game_switch_status +call :check_updates_switch_status + +set "menu_choice=null" +echo ========= v!LOCAL_VERSION! ========= +echo 1. Install Service +echo 2. Remove Services +echo 3. Check Status +echo 4. Run Diagnostics +echo 5. Check Updates +echo 6. Switch Check Updates (%CheckUpdatesStatus%) +echo 7. Switch Game Filter (%GameFilterStatus%) +echo 8. Switch ipset (%IPsetStatus%) +echo 9. Update ipset list +echo 10. Update hosts file (for discord voice) +echo 11. Run Tests +echo 0. Exit +set /p menu_choice=Enter choice (0-11): + +if "%menu_choice%"=="1" goto service_install +if "%menu_choice%"=="2" goto service_remove +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 check_updates_switch +if "%menu_choice%"=="7" goto game_switch +if "%menu_choice%"=="8" goto ipset_switch +if "%menu_choice%"=="9" goto ipset_update +if "%menu_choice%"=="10" goto hosts_update +if "%menu_choice%"=="11" goto run_tests +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 +chcp 437 > nul + +sc query "zapret" >nul 2>&1 +if !errorlevel!==0 ( + for /f "tokens=2*" %%A in ('reg query "HKLM\System\CurrentControlSet\Services\zapret" /v zapret-roblox 2^>nul') do echo Service strategy installed from "%%B" +) + +call :test_service zapret +call :test_service WinDivert + +set "BIN_PATH=%~dp0bin\" +if not exist "%BIN_PATH%\*.sys" ( + call :PrintRed "WinDivert64.sys file NOT found." +) +echo: + +tasklist /FI "IMAGENAME eq winws.exe" | find /I "winws.exe" > nul +if !errorlevel!==0 ( + call :PrintGreen "Bypass (winws.exe) is RUNNING." +) else ( + call :PrintRed "Bypass (winws.exe) is NOT running." +) + +pause +goto menu + +:test_service +set "ServiceName=%~1" +set "ServiceStatus=" + +for /f "tokens=3 delims=: " %%A in ('sc query "%ServiceName%" ^| findstr /i "STATE"') do set "ServiceStatus=%%A" +set "ServiceStatus=%ServiceStatus: =%" + +if "%ServiceStatus%"=="RUNNING" ( + if "%~2"=="soft" ( + echo "%ServiceName%" is ALREADY RUNNING as service, use "service.bat" and choose "Remove Services" first if you want to run standalone bat. + pause + exit /b + ) else ( + echo "%ServiceName%" service is RUNNING. + ) +) else if "%ServiceStatus%"=="STOP_PENDING" ( + call :PrintYellow "!ServiceName! is STOP_PENDING, that may be caused by a conflict with another bypass. Run Diagnostics to try to fix conflicts" +) else if not "%~2"=="soft" ( + echo "%ServiceName%" service is NOT running. +) + +exit /b + + +:: REMOVE ============================== +:service_remove +cls +chcp 65001 > nul + +set SRVCNAME=zapret +sc query "!SRVCNAME!" >nul 2>&1 +if !errorlevel!==0 ( + net stop %SRVCNAME% + sc delete %SRVCNAME% +) else ( + echo Service "%SRVCNAME%" is not installed. +) + +tasklist /FI "IMAGENAME eq winws.exe" | find /I "winws.exe" > nul +if !errorlevel!==0 ( + taskkill /IM winws.exe /F > nul +) + +sc query "WinDivert" >nul 2>&1 +if !errorlevel!==0 ( + net stop "WinDivert" + + sc query "WinDivert" >nul 2>&1 + if !errorlevel!==0 ( + sc delete "WinDivert" + ) +) +net stop "WinDivert14" >nul 2>&1 +sc delete "WinDivert14" >nul 2>&1 + +pause +goto menu + + +:: INSTALL ============================= +:service_install +cls +chcp 65001 > nul + +:: Main +cd /d "%~dp0" +set "BIN_PATH=%~dp0bin\" +set "LISTS_PATH=%~dp0lists\" + +:: 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 ( + set "filename=%%~nxf" + if /i not "!filename:~0,7!"=="service" ( + set /a count+=1 + echo !count!. %%f + set "file!count!=%%f" + ) +) + +:: Choosing file +set "choice=" +set /p "choice=Input file index (number): " +if "!choice!"=="" ( + echo The choice is empty, exiting... + pause + goto menu +) + +set "selectedFile=!file%choice%!" +if not defined selectedFile ( + echo Invalid choice, exiting... + pause + goto menu +) + +:: Args that should be followed by value +set "args_with_value=sni host altorder" + +:: Parsing args (mergeargs: 2=start param|3=arg with value|1=params args|0=default) +set "args=" +set "capture=0" +set "mergeargs=0" +set QUOTE=" + +for /f "tokens=*" %%a in ('type "!selectedFile!"') do ( + set "line=%%a" + call set "line=%%line:^!=EXCL_MARK%%" + + echo !line! | findstr /i "%BIN%winws.exe" >nul + if not errorlevel 1 ( + set "capture=1" + ) + + if !capture!==1 ( + if not defined args ( + set "line=!line:*%BIN%winws.exe"=!" + ) + + set "temp_args=" + for %%i in (!line!) do ( + set "arg=%%i" + + if not "!arg!"=="^" ( + if "!arg:~0,2!" EQU "--" if not !mergeargs!==0 ( + set "mergeargs=0" + ) + + if "!arg:~0,1!" EQU "!QUOTE!" ( + set "arg=!arg:~1,-1!" + + echo !arg! | findstr ":" >nul + if !errorlevel!==0 ( + set "arg=\!QUOTE!!arg!\!QUOTE!" + ) else if "!arg:~0,1!"=="@" ( + set "arg=\!QUOTE!@%~dp0!arg:~1!\!QUOTE!" + ) else if "!arg:~0,5!"=="%%BIN%%" ( + set "arg=\!QUOTE!!BIN_PATH!!arg:~5!\!QUOTE!" + ) else if "!arg:~0,7!"=="%%LISTS%%" ( + set "arg=\!QUOTE!!LISTS_PATH!!arg:~7!\!QUOTE!" + ) else ( + set "arg=\!QUOTE!%~dp0!arg!\!QUOTE!" + ) + ) else if "!arg:~0,12!" EQU "%%GameFilter%%" ( + set "arg=%GameFilter%" + ) + + if !mergeargs!==1 ( + set "temp_args=!temp_args!,!arg!" + ) else if !mergeargs!==3 ( + set "temp_args=!temp_args!=!arg!" + set "mergeargs=1" + ) else ( + set "temp_args=!temp_args! !arg!" + ) + + if "!arg:~0,2!" EQU "--" ( + set "mergeargs=2" + ) else if !mergeargs! GEQ 1 ( + if !mergeargs!==2 set "mergeargs=1" + + for %%x in (!args_with_value!) do ( + if /i "%%x"=="!arg!" ( + set "mergeargs=3" + ) + ) + ) + ) + ) + + if not "!temp_args!"=="" ( + set "args=!args! !temp_args!" + ) + ) +) + +:: Creating service with parsed args +call :tcp_enable + +set ARGS=%args% +call set "ARGS=%%ARGS:EXCL_MARK=^!%%" +echo Final args: !ARGS! +set SRVCNAME=zapret + +net stop %SRVCNAME% >nul 2>&1 +sc delete %SRVCNAME% >nul 2>&1 +sc create %SRVCNAME% binPath= "\"%BIN_PATH%winws.exe\" !ARGS!" DisplayName= "zapret" start= auto +sc description %SRVCNAME% "Zapret DPI bypass software" +sc start %SRVCNAME% +for %%F in ("!file%choice%!") do ( + set "filename=%%~nF" +) +reg add "HKLM\System\CurrentControlSet\Services\zapret" /v zapret-roblox /t REG_SZ /d "!filename!" /f + +pause +goto menu + + +:: CHECK UPDATES ======================= +:service_check_updates +chcp 437 > nul +cls + +:: Set current version and URLs +set "GITHUB_VERSION_URL=https://raw.githubusercontent.com/Lux1de/zapret-roblox/main/.service/version.txt" +set "GITHUB_RELEASE_URL=https://github.com/Lux1de/zapret-roblox/releases/tag/" +set "GITHUB_DOWNLOAD_URL=https://github.com/Lux1de/zapret-roblox/releases/latest/download/zapret-roblox-" + +:: Get the latest version from GitHub +for /f "delims=" %%A in ('powershell -command "(Invoke-WebRequest -Uri \"%GITHUB_VERSION_URL%\" -Headers @{\"Cache-Control\"=\"no-cache\"} -UseBasicParsing -TimeoutSec 5).Content.Trim()" 2^>nul') do set "GITHUB_VERSION=%%A" + +:: Error handling +if not defined GITHUB_VERSION ( + echo Warning: failed to fetch the latest version. This warning does not affect the operation of zapret + timeout /T 9 + if "%1"=="soft" exit + goto menu +) + +:: Version comparison +if "%LOCAL_VERSION%"=="%GITHUB_VERSION%" ( + echo Latest version installed: %LOCAL_VERSION% + + if "%1"=="soft" exit + pause + goto menu +) + +echo New version available: %GITHUB_VERSION% +echo Release page: %GITHUB_RELEASE_URL%%GITHUB_VERSION% + +set "CHOICE=" +set /p "CHOICE=Do you want to automatically download the new version? (Y/N) (default: Y) " +if "%CHOICE%"=="" set "CHOICE=Y" +if /i "%CHOICE%"=="y" set "CHOICE=Y" + +if /i "%CHOICE%"=="Y" ( + echo Opening the download page... + start "" "%GITHUB_DOWNLOAD_URL%%GITHUB_VERSION%.rar" +) + + +if "%1"=="soft" exit +pause +goto menu + + + +:: DIAGNOSTICS ========================= +:service_diagnostics +chcp 437 > nul +cls + +:: Base Filtering Engine +sc query BFE | findstr /I "RUNNING" > nul +if !errorlevel!==0 ( + call :PrintGreen "Base Filtering Engine check passed" +) else ( + call :PrintRed "[X] Base Filtering Engine is not running. This service is required for zapret to work" +) +echo: + +:: Proxy check +set "proxyEnabled=0" +set "proxyServer=" + +for /f "tokens=2*" %%A in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable 2^>nul ^| findstr /i "ProxyEnable"') do ( + if "%%B"=="0x1" set "proxyEnabled=1" +) + +if !proxyEnabled!==1 ( + for /f "tokens=2*" %%A in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer 2^>nul ^| findstr /i "ProxyServer"') do ( + set "proxyServer=%%B" + ) + + call :PrintYellow "[?] System proxy is enabled: !proxyServer!" + call :PrintYellow "Make sure it's valid or disable it if you don't use a proxy" +) else ( + call :PrintGreen "Proxy check passed" +) +echo: + +:: Check netsh +where netsh >nul 2>nul +if !errorlevel! neq 0 ( + call :PrintRed "[X] netsh command not found, check your PATH variable" + echo PATH = "%PATH%" + echo: + pause + goto menu +) + +:: 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 ( + call :PrintRed "[X] Adguard process found. Adguard may cause problems with Discord" + call :PrintRed "https://github.com/Lux1de/zapret-roblox/issues" +) else ( + call :PrintGreen "Adguard check passed" +) +echo: + +:: Killer +sc query | findstr /I "Killer" > nul +if !errorlevel!==0 ( + call :PrintRed "[X] Killer services found. Killer conflicts with zapret" + call :PrintRed "https://github.com/Lux1de/zapret-roblox/issues" +) else ( + call :PrintGreen "Killer check passed" +) +echo: + +:: Intel Connectivity Network Service +sc query | findstr /I "Intel" | findstr /I "Connectivity" | findstr /I "Network" > nul +if !errorlevel!==0 ( + call :PrintRed "[X] Intel Connectivity Network Service found. It conflicts with zapret" + call :PrintRed "https://github.com/ValdikSS/GoodbyeDPI/issues/541#issuecomment-2661670982" +) else ( + call :PrintGreen "Intel Connectivity check passed" +) +echo: + +:: Check Point +set "checkpointFound=0" +sc query | findstr /I "TracSrvWrapper" > nul +if !errorlevel!==0 ( + set "checkpointFound=1" +) + +sc query | findstr /I "EPWD" > nul +if !errorlevel!==0 ( + set "checkpointFound=1" +) + +if !checkpointFound!==1 ( + call :PrintRed "[X] Check Point services found. Check Point conflicts with zapret" + call :PrintRed "Try to uninstall Check Point" +) else ( + call :PrintGreen "Check Point check passed" +) +echo: + +:: SmartByte +sc query | findstr /I "SmartByte" > nul +if !errorlevel!==0 ( + call :PrintRed "[X] SmartByte services found. SmartByte conflicts with zapret" + call :PrintRed "Try to uninstall or disable SmartByte through services.msc" +) else ( + call :PrintGreen "SmartByte check passed" +) +echo: + +:: WinDivert64.sys file +set "BIN_PATH=%~dp0bin\" +if not exist "%BIN_PATH%\*.sys" ( + call :PrintRed "WinDivert64.sys file NOT found." +) +echo: + +:: VPN +set "VPN_SERVICES=" +sc query | findstr /I "VPN" > nul +if !errorlevel!==0 ( + for /f "tokens=2 delims=:" %%A in ('sc query ^| findstr /I "VPN"') do ( + if not defined VPN_SERVICES ( + set "VPN_SERVICES=!VPN_SERVICES!%%A" + ) else ( + set "VPN_SERVICES=!VPN_SERVICES!,%%A" + ) + ) + call :PrintYellow "[?] VPN services found:!VPN_SERVICES!. Some VPNs can conflict with zapret" + call :PrintYellow "Make sure that all VPNs are disabled" +) else ( + call :PrintGreen "VPN check passed" +) +echo: + +:: DNS +set "dohfound=0" +for /f "delims=" %%a in ('powershell -Command "Get-ChildItem -Recurse -Path 'HKLM:System\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters\' | Get-ItemProperty | Where-Object { $_.DohFlags -gt 0 } | Measure-Object | Select-Object -ExpandProperty Count"') do ( + if %%a gtr 0 ( + set "dohfound=1" + ) +) +if !dohfound!==0 ( + call :PrintYellow "[?] Make sure you have configured secure DNS in a browser with some non-default DNS service provider," + call :PrintYellow "If you use Windows 11 you can configure encrypted DNS in the Settings to hide this warning" +) else ( + call :PrintGreen "Secure DNS check passed" +) +echo: + +:: WinDivert conflict +tasklist /FI "IMAGENAME eq winws.exe" | find /I "winws.exe" > nul +set "winws_running=!errorlevel!" + +sc query "WinDivert" | findstr /I "RUNNING STOP_PENDING" > nul +set "windivert_running=!errorlevel!" + +if !winws_running! neq 0 if !windivert_running!==0 ( + call :PrintYellow "[?] winws.exe is not running but WinDivert service is active. Attempting to delete WinDivert..." + + net stop "WinDivert" >nul 2>&1 + sc delete "WinDivert" >nul 2>&1 + sc query "WinDivert" >nul 2>&1 + if !errorlevel!==0 ( + call :PrintRed "[X] Failed to delete WinDivert. Checking for conflicting services..." + + set "conflicting_services=GoodbyeDPI" + set "found_conflict=0" + + for %%s in (!conflicting_services!) do ( + sc query "%%s" >nul 2>&1 + if !errorlevel!==0 ( + call :PrintYellow "[?] Found conflicting service: %%s. Stopping and removing..." + net stop "%%s" >nul 2>&1 + sc delete "%%s" >nul 2>&1 + if !errorlevel!==0 ( + call :PrintGreen "Successfully removed service: %%s" + ) else ( + call :PrintRed "[X] Failed to remove service: %%s" + ) + set "found_conflict=1" + ) + ) + + if !found_conflict!==0 ( + call :PrintRed "[X] No conflicting services found. Check manually if any other bypass is using WinDivert." + ) else ( + call :PrintYellow "[?] Attempting to delete WinDivert again..." + + net stop "WinDivert" >nul 2>&1 + sc delete "WinDivert" >nul 2>&1 + sc query "WinDivert" >nul 2>&1 + if !errorlevel! neq 0 ( + call :PrintGreen "WinDivert successfully deleted after removing conflicting services" + ) else ( + call :PrintRed "[X] WinDivert still cannot be deleted. Check manually if any other bypass is using WinDivert." + ) + ) + ) else ( + call :PrintGreen "WinDivert successfully removed" + ) + + echo: +) + +:: Conflicting bypasses +set "conflicting_services=GoodbyeDPI discordfix_zapret winws1 winws2" +set "found_any_conflict=0" +set "found_conflicts=" + +for %%s in (!conflicting_services!) do ( + sc query "%%s" >nul 2>&1 + if !errorlevel!==0 ( + if "!found_conflicts!"=="" ( + set "found_conflicts=%%s" + ) else ( + set "found_conflicts=!found_conflicts! %%s" + ) + set "found_any_conflict=1" + ) +) + +if !found_any_conflict!==1 ( + call :PrintRed "[X] Conflicting bypass services found: !found_conflicts!" + + set "CHOICE=" + set /p "CHOICE=Do you want to remove these conflicting services? (Y/N) (default: N) " + if "!CHOICE!"=="" set "CHOICE=N" + if "!CHOICE!"=="y" set "CHOICE=Y" + + if /i "!CHOICE!"=="Y" ( + for %%s in (!found_conflicts!) do ( + call :PrintYellow "Stopping and removing service: %%s" + net stop "%%s" >nul 2>&1 + sc delete "%%s" >nul 2>&1 + if !errorlevel!==0 ( + call :PrintGreen "Successfully removed service: %%s" + ) else ( + call :PrintRed "[X] Failed to remove service: %%s" + ) + ) + + net stop "WinDivert" >nul 2>&1 + sc delete "WinDivert" >nul 2>&1 + net stop "WinDivert14" >nul 2>&1 + sc delete "WinDivert14" >nul 2>&1 + ) + + echo: +) + +:: Discord cache clearing +set "CHOICE=" +set /p "CHOICE=Do you want to clear the Discord cache? (Y/N) (default: Y) " +if "!CHOICE!"=="" set "CHOICE=Y" +if "!CHOICE!"=="y" set "CHOICE=Y" + +if /i "!CHOICE!"=="Y" ( + tasklist /FI "IMAGENAME eq Discord.exe" | findstr /I "Discord.exe" > nul + if !errorlevel!==0 ( + echo Discord is running, closing... + taskkill /IM Discord.exe /F > nul + if !errorlevel! == 0 ( + call :PrintGreen "Discord was successfully closed" + ) else ( + call :PrintRed "Unable to close Discord" + ) + ) + + set "discordCacheDir=%appdata%\discord" + + for %%d in ("Cache" "Code Cache" "GPUCache") do ( + set "dirPath=!discordCacheDir!\%%~d" + if exist "!dirPath!" ( + rd /s /q "!dirPath!" + if !errorlevel!==0 ( + call :PrintGreen "Successfully deleted !dirPath!" + ) else ( + call :PrintRed "Failed to delete !dirPath!" + ) + ) else ( + call :PrintRed "!dirPath! does not exist" + ) + ) +) +echo: + +pause +goto menu + + +:: GAME SWITCH ======================== +:game_switch_status +chcp 437 > nul + +set "gameFlagFile=%~dp0utils\game_filter.enabled" + +if exist "%gameFlagFile%" ( + set "GameFilterStatus=enabled" + set "GameFilter=1024-65535" +) else ( + set "GameFilterStatus=disabled" + set "GameFilter=12" +) +exit /b + + +:game_switch +chcp 437 > nul +cls + +if not exist "%gameFlagFile%" ( + echo Enabling game filter... + echo ENABLED > "%gameFlagFile%" + call :PrintYellow "Restart the zapret to apply the changes" +) else ( + echo Disabling game filter... + del /f /q "%gameFlagFile%" + call :PrintYellow "Restart the zapret to apply the changes" +) + +pause +goto menu + + +:: CHECK UPDATES SWITCH ================= +:check_updates_switch_status +chcp 437 > nul + +set "checkUpdatesFlag=%~dp0utils\check_updates.enabled" + +if exist "%checkUpdatesFlag%" ( + set "CheckUpdatesStatus=enabled" +) else ( + set "CheckUpdatesStatus=disabled" +) +exit /b + + +:check_updates_switch +chcp 437 > nul +cls + +if not exist "%checkUpdatesFlag%" ( + echo Enabling check updates... + echo ENABLED > "%checkUpdatesFlag%" +) else ( + echo Disabling check updates... + del /f /q "%checkUpdatesFlag%" +) + +pause +goto menu + + +:: IPSET SWITCH ======================= +:ipset_switch_status +chcp 437 > nul + +set "listFile=%~dp0lists\ipset-all.txt" +for /f %%i in ('type "%listFile%" 2^>nul ^| find /c /v ""') do set "lineCount=%%i" + +if !lineCount!==0 ( + set "IPsetStatus=any" +) else ( + findstr /R "^203\.0\.113\.113/32$" "%listFile%" >nul + if !errorlevel!==0 ( + set "IPsetStatus=none" + ) else ( + set "IPsetStatus=loaded" + ) +) +exit /b + + +:ipset_switch +chcp 437 > nul +cls + +set "listFile=%~dp0lists\ipset-all.txt" +set "backupFile=%listFile%.backup" + +if "%IPsetStatus%"=="loaded" ( + echo Switching to none mode... + + if not exist "%backupFile%" ( + ren "%listFile%" "ipset-all.txt.backup" + ) else ( + del /f /q "%backupFile%" + ren "%listFile%" "ipset-all.txt.backup" + ) + + >"%listFile%" ( + echo 203.0.113.113/32 + ) + +) else if "%IPsetStatus%"=="none" ( + echo Switching to any mode... + + >"%listFile%" ( + rem Creating empty file + ) + +) else if "%IPsetStatus%"=="any" ( + echo Switching to loaded mode... + + if exist "%backupFile%" ( + del /f /q "%listFile%" + ren "%backupFile%" "ipset-all.txt" + ) else ( + echo Error: no backup to restore. Update list from service menu first + pause + goto menu + ) + +) + +pause +goto menu + + +:: IPSET UPDATE ======================= +:ipset_update +chcp 437 > nul +cls + +set "listFile=%~dp0lists\ipset-all.txt" +set "url=https://raw.githubusercontent.com/Lux1de/zapret-roblox/refs/heads/main/.service/ipset-service.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 + + +:: HOSTS UPDATE ======================= +:hosts_update +chcp 437 > nul +cls + +set "hostsFile=%SystemRoot%\System32\drivers\etc\hosts" +set "hostsUrl=https://raw.githubusercontent.com/Lux1de/zapret-roblox/refs/heads/main/.service/hosts" +set "tempFile=%TEMP%\zapret_hosts.txt" +set "needsUpdate=0" + +echo Checking hosts file... + +if exist "%SystemRoot%\System32\curl.exe" ( + curl -L -s -o "%tempFile%" "%hostsUrl%" +) else ( + powershell -Command ^ + "$url = '%hostsUrl%';" ^ + "$out = '%tempFile%';" ^ + "$res = Invoke-WebRequest -Uri $url -TimeoutSec 10 -UseBasicParsing;" ^ + "if ($res.StatusCode -eq 200) { $res.Content | Out-File -FilePath $out -Encoding UTF8 } else { exit 1 }" +) + +if not exist "%tempFile%" ( + call :PrintRed "Failed to download hosts file from repository" + call :PrintYellow "Copy hosts file manually from %hostsUrl%" + pause + goto menu +) + +set "firstLine=" +set "lastLine=" +for /f "usebackq delims=" %%a in ("%tempFile%") do ( + if not defined firstLine ( + set "firstLine=%%a" + ) + set "lastLine=%%a" +) + +findstr /C:"!firstLine!" "%hostsFile%" >nul 2>&1 +if !errorlevel! neq 0 ( + echo First line from repository not found in hosts file + set "needsUpdate=1" +) + +findstr /C:"!lastLine!" "%hostsFile%" >nul 2>&1 +if !errorlevel! neq 0 ( + echo Last line from repository not found in hosts file + set "needsUpdate=1" +) + +if "%needsUpdate%"=="1" ( + echo: + call :PrintYellow "Hosts file needs to be updated" + call :PrintYellow "Please manually copy the content from the downloaded file to your hosts file" + + start notepad "%tempFile%" + explorer /select,"%hostsFile%" +) else ( + call :PrintGreen "Hosts file is up to date" + if exist "%tempFile%" del /f /q "%tempFile%" +) + +echo: +pause +goto menu + + +:: RUN TESTS ============================= +:run_tests +chcp 65001 >nul +cls + +:: Require PowerShell 3.0+ +powershell -NoProfile -Command "if ($PSVersionTable -and $PSVersionTable.PSVersion -and $PSVersionTable.PSVersion.Major -ge 3) { exit 0 } else { exit 1 }" >nul 2>&1 +if %errorLevel% neq 0 ( + echo PowerShell 3.0 or newer is required. + echo Please upgrade PowerShell and rerun this script. + echo. + pause + goto menu +) + +echo Starting configuration tests in PowerShell window... +echo. +start "" powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0utils\test zapret.ps1" +pause +goto menu + + +:: Utility functions + +:PrintGreen +powershell -Command "Write-Host \"%~1\" -ForegroundColor Green" +exit /b + +:PrintRed +powershell -Command "Write-Host \"%~1\" -ForegroundColor Red" +exit /b + +:PrintYellow +powershell -Command "Write-Host \"%~1\" -ForegroundColor Yellow" +exit /b + +:check_command +where %1 >nul 2>&1 +if %errorLevel% neq 0 ( + echo [ERROR] %1 not found in PATH + echo Fix your PATH variable with instructions here https://github.com/Lux1de/zapret-roblox/issues + pause + exit /b 1 +) +exit /b 0 + +:check_extracted +set "extracted=1" + +if not exist "%~dp0bin\" set "extracted=0" + +if "%extracted%"=="0" ( + echo Zapret must be extracted from archive first or bin folder not found for some reason + pause + exit +) +exit /b 0 \ No newline at end of file diff --git a/zapret/zapret_A1(faster).bat b/zapret/zapret_A1(faster).bat deleted file mode 100644 index ea8256c..0000000 --- a/zapret/zapret_A1(faster).bat +++ /dev/null @@ -1,10 +0,0 @@ -cd /d "%~dp0" -set "BIN=%~dp0bundled\" -set "LISTS=%~dp0lists\" -set "CONFIGS=%~dp0configs\" - -start "zapret: general" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50099 ^ ---filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%CONFIGS%quic_initial_www_google_com.bin" --new ^ ---filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ ---filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ ---filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=split --dpi-desync-split-pos=1 --dpi-desync-autottl --dpi-desync-fooling=badseq --dpi-desync-repeats=8 --new ^ \ No newline at end of file diff --git a/zapret/zapret_A2(stronger).bat b/zapret/zapret_A2(stronger).bat deleted file mode 100644 index 8040ade..0000000 --- a/zapret/zapret_A2(stronger).bat +++ /dev/null @@ -1,10 +0,0 @@ -cd /d "%~dp0" -set "BIN=%~dp0bundled\" -set "LISTS=%~dp0lists\" -set "CONFIGS=%~dp0configs\" - -start "zapret: general" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50099 ^ ---filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%CONFIGS%quic_initial_www_google_com.bin" --new ^ ---filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ ---filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ ---filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=split2 --dpi-desync-repeats=2 --dpi-desync-split-seqovl=681 --dpi-desync-split-pos=1 --dpi-desync-fooling=badseq,hopbyhop2 --dpi-desync-split-seqovl-pattern="%CONFIGS%tls_clienthello_www_google_com.bin" --new ^ \ No newline at end of file diff --git a/zapret/zapret_M.bat b/zapret/zapret_M.bat deleted file mode 100644 index 911d202..0000000 --- a/zapret/zapret_M.bat +++ /dev/null @@ -1,10 +0,0 @@ -cd /d "%~dp0" -set "BIN=%~dp0bundled\" -set "LISTS=%~dp0lists\" -set "CONFIGS=%~dp0configs\" - -start "zapret: general" /min "%BIN%winws.exe" --wf-tcp=80,443,2053,2083,2087,2096,8443 --wf-udp=443,19294-19344,50000-50100 ^ ---filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%CONFIGS%quic_initial_www_google_com.bin" --new ^ ---filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ ---filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ ---filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=split2 --dpi-desync-split-seqovl=652 --dpi-desync-split-pos=2 --dpi-desync-split-seqovl-pattern="%CONFIGS%tls_clienthello_www_google_com.bin" --new ^ \ No newline at end of file diff --git a/zapret/zapret_T1(strongest).bat b/zapret/zapret_T1(strongest).bat deleted file mode 100644 index e734c09..0000000 --- a/zapret/zapret_T1(strongest).bat +++ /dev/null @@ -1,10 +0,0 @@ -cd /d "%~dp0" -set "BIN=%~dp0bundled\" -set "LISTS=%~dp0lists\" -set "CONFIGS=%~dp0configs\" - -start "zapret: general" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50099 ^ ---filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-quic="%CONFIGS%quic_initial_www_google_com.bin" --new ^ ---filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ ---filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,fakedsplit --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ ---filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-split-seqovl=681 --dpi-desync-split-pos=1 --dpi-desync-fooling=badseq --dpi-desync-repeats=8 --dpi-desync-split-seqovl-pattern="%CONFIGS%tls_clienthello_www_google_com.bin" --dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com --new ^ \ No newline at end of file