├── .github └── ISSUE_TEMPLATE │ └── bug_report.yml ├── .gitignore ├── .service └── version.txt ├── LICENSE.txt ├── README.md ├── bin ├── WinDivert.dll ├── WinDivert64.sys ├── cygwin1.dll ├── quic_initial_www_google_com.bin ├── tls_clienthello_www_google_com.bin └── winws.exe ├── cloudflare_switch.bat ├── discord.bat ├── general (ALT).bat ├── general (ALT2).bat ├── general (ALT3).bat ├── general (ALT4).bat ├── general (ALT5).bat ├── general (FAKE TLS MOD ALT).bat ├── general (FAKE TLS MOD AUTO).bat ├── general (FAKE TLS MOD).bat ├── general (МГТС).bat ├── general (МГТС2).bat ├── general.bat ├── lists ├── ipset-cloudflare.txt ├── list-discord.txt └── list-general.txt └── service.bat /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: 🐛 Проблема 2 | title: '[Проблема] ' 3 | description: Сообщить о проблеме 4 | labels: ['type: проблема', 'status: нуждается в сортировке'] 5 | 6 | body: 7 | - type: checkboxes 8 | id: checklist 9 | attributes: 10 | label: ⚠️ Чеклист 11 | description: Перед созданием нового Issue, удостоверьтесь что выполнили следующие пункты 12 | options: 13 | - label: Я искал решение проблемы в [README](https://github.com/Flowseal/zapret-discord-youtube/blob/main/README.md) и среди [Issues](https://github.com/Flowseal/zapret-discord-youtube/issues) 14 | - label: Я скачал ``zapret-discord-youtube`` из [релизов официального репозитория](https://github.com/Flowseal/zapret-discord-youtube/releases) 15 | 16 | - type: textarea 17 | id: description 18 | attributes: 19 | label: Опишите вашу проблему 20 | description: Чётко опишите проблему с которой вы столкнулись 21 | placeholder: Описание проблемы 22 | validations: 23 | required: true 24 | 25 | - type: textarea 26 | id: version 27 | attributes: 28 | label: Версия zapret-discord-youtube 29 | description: Версия zapret-discord-youtube на которой вы словили проблему 30 | placeholder: Версия 31 | validations: 32 | required: true 33 | 34 | - type: textarea 35 | id: reproduction 36 | attributes: 37 | label: Шаги воспроизведения проблемы 38 | description: Шаги по воспроизведению поведения (вашей проблемы). 39 | placeholder: | 40 | Напишите здесь шаги, с помощью которых можно повторить вашу проблему 41 | на других компьютерах 42 | 43 | - type: textarea 44 | id: bat-name 45 | attributes: 46 | label: Какой .bat файл вы используете? 47 | validations: 48 | required: true 49 | 50 | - type: textarea 51 | id: other-bat 52 | attributes: 53 | label: Использовали ли вы другие .bat? 54 | description: Пробовали ли вы использовать другой .bat для устранения проблемы? Если использовали, то какие? 55 | 56 | - type: textarea 57 | id: additions 58 | attributes: 59 | label: Дополнительные детали 60 | description: Дополнительные детали о которых нам нужно знать 61 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/87ee1785469625a1a72c5b93d5eb249ff04b14e5/.gitignore -------------------------------------------------------------------------------- /.service/version.txt: -------------------------------------------------------------------------------- 1 | 1.7.2b -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016-2025 bol-van 4 | Copyright (c) 2024-2025 Flowseal 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | 24 | --- 25 | 26 | This repository contains binary files originating from the project by bol-van, 27 | available at: https://github.com/bol-van/zapret/ (licensed under the MIT License). 28 | 29 | This repository also includes and depends on WinDivert 30 | (https://github.com/basil00/WinDivert), which is licensed under your choice of: 31 | 32 | 1. The GNU Lesser General Public License (LGPL) Version 3, or 33 | 2. The GNU General Public License (GPL) Version 2. 34 | 35 | Binary distributions of WinDivert are included in this project as-is, without modification. 36 | The corresponding source code and license terms for WinDivert are available at 37 | https://github.com/basil00/WinDivert. 38 | 39 | --- 40 | 41 | To comply with the licenses of these projects: 42 | 43 | 1. The original copyright notices and licenses (above) are retained. 44 | 2. The use of WinDivert in this project is governed by its licensing terms (LGPLv3/GPLv2). 45 | 3. This repository provides only binary files and does not include the source code of 46 | the project by bol-van or modifications to WinDivert. 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # Flowseal/zapret-discord-youtube 4 | 5 | *"Plug & Play"* обход блокировок Discord и YouTube для Windows 6 | 7 | Альтернатива https://github.com/bol-van/zapret-win-bundle 8 |
9 | 10 | > [!CAUTION] 11 | > 12 | > ### АНТИВИРУСЫ 13 | > WinDivert может вызвать реакцию антивируса. 14 | > WinDivert - это инструмент для перехвата и фильтрации трафика, необходимый для работы zapret. 15 | > Замена iptables и NFQUEUE в Linux, которых нет под Windows. 16 | > Он может использоваться как хорошими, так и плохими программами, но сам по себе не является вирусом. 17 | > Драйвер WinDivert64.sys подписан для возможности загрузки в 64-битное ядро Windows. 18 | > Но антивирусы склонны относить подобное к классам повышенного риска или хакерским инструментам. 19 | > В случае проблем используйте исключения или выключайте антивирус совсем. 20 | > 21 | > **Выдержка из [`readme.md`](https://github.com/bol-van/zapret-win-bundle/blob/master/readme.md#%D0%B0%D0%BD%D1%82%D0%B8%D0%B2%D0%B8%D1%80%D1%83%D1%81%D1%8B) репозитория [bol-van/zapret-win-bundle](https://github.com/bol-van/zapret-win-bundle)* 22 | 23 | > [!IMPORTANT] 24 | > Все файлы в папке [`bin`](./bin) взяты из [zapret-win-bundle/zapret-winws](https://github.com/bol-van/zapret-win-bundle/tree/master/zapret-winws). Вы можете это проверить с помощью хэшей/контрольных сумм. 25 | 26 | ## ⚙️Использование 27 | 28 | 1. Загрузите архив (zip/rar) со [страницы последнего релиза](https://github.com/Flowseal/zapret-discord-youtube/releases/latest) 29 | 30 | 2. Распакуйте содержимое архива по пути, который не содержит кириллицу/спец. символы 31 | 32 | 3. Запустите нужный файл 33 | 34 | ## ℹ️Краткие описания файлов 35 | 36 | - [**`discord.bat`**](./discord.bat) - запуск со стратегией для обхода блокировки Discord 37 | 38 | - [**`general.bat`**](./general.bat) - запуск со стратегией для обхода блокировок Discord и YouTube 39 | 40 | - [**`cloudflare_switch.bat`**](./cloudflare_switch.bat) - включение/выключение обхода Cloudflare *(на деле перетирает список `ipset-cloudflare`, перезапуск после изменения не нужен)* 41 | 42 | - [**`service.bat`**](./service.bat) - установка на автозапуск (`Install Service`), удаление из автозапуска (`Remove Services`), проверка сервисов, диагностика, проверка обновлений 43 | 44 | ## ☑️Распространенные проблемы 45 | 46 | ### Не работает Discord 47 | 48 | - См. [#252](https://github.com/Flowseal/zapret-discord-youtube/discussions/252) 49 | 50 | ### Не работает YouTube 51 | 52 | - См. [#251](https://github.com/Flowseal/zapret-discord-youtube/discussions/251) 53 | 54 | ### Обход не работает 55 | 56 | > [!IMPORTANT] 57 | > **Стратегии блокировок со временем изменяются.** 58 | > Определенная стратегия обхода zapret может работать какое-то время, но если меняется способ блокировки или обнаружения обхода блокировки, то она перестанет работать. 59 | > В репозитории представлены множество различных стратегий для обхода. Если ни одна из них вам не помогает, то вам необходимо создать новую, взяв за основу одну из представленных здесь и изменив её параметры. 60 | > Информацию про параметры стратегий вы можете найти [тут](https://github.com/bol-van/zapret/blob/master/docs/readme.md#nfqws). 61 | 62 | - Проверьте другие стратегии (**`ALT`**/**`МГТС`**) 63 | 64 | - Обновите файлы в папке [`bin`](./bin), взяв новые из [zapret-win-bundle/zapret-winws](https://github.com/bol-van/zapret-win-bundle/tree/master/zapret-winws) 65 | 66 | - См. [#765](https://github.com/Flowseal/zapret-discord-youtube/issues/765) 67 | 68 | ### Файлы не запускаются 69 | 70 | - См. [#522](https://github.com/Flowseal/zapret-discord-youtube/issues/522) 71 | 72 | ### Требуется цифровая подпись драйвера WinDivert (Windows 7) 73 | 74 | - Замените файлы `WinDivert.dll` и `WinDivert64.sys` в папке [`bin`](./bin) на одноименные из [zapret-win-bundle/win7](https://github.com/bol-van/zapret-win-bundle/tree/master/win7) 75 | 76 | ### Не работает вместе с VPN 77 | 78 | - Отключите функцию **TUN** (Tunneling) в настройках вашего VPN 79 | 80 | ### При удалении с помощью [**`service.bat`**](./service.bat), WinDivert остается в службах 81 | 82 | 1. Узнайте название службы с помощью команды, в командной строке Windows (Win+R, `cmd`): 83 | 84 | ```cmd 85 | driverquery | find "Divert" 86 | ``` 87 | 88 | 2. Остановите и удалите службу командами: 89 | 90 | ```cmd 91 | sc stop {название, которые вы узнали в шаге 1} 92 | 93 | sc delete {название, которые вы узнали в шаге 1} 94 | ``` 95 | 96 | ### Не нашли своей проблемы 97 | 98 | * Создайте её [тут](https://github.com/Flowseal/zapret-discord-youtube/issues) 99 | 100 | ## 🗒️Добавление адресов прочих заблокированных ресурсов 101 | 102 | Список блокирующихся адресов для обхода можно расширить, добавляя их в: 103 | - [`list-general.txt`](./list-general.txt) для файлов `general *.bat` 104 | - [`list-discord.txt`](./list-discord.txt) для файла [`discord.bat`](./discord.bat) 105 | 106 | > [!IMPORTANT] 107 | > После обновления списка адресов zapret необходимо перезапустить. 108 | 109 | ## ⭐Поддержка проекта 110 | 111 | Вы можете поддержать проект, поставив :star: этому репозиторию (сверху справа этой страницы) 112 | 113 | Также, вы можете материально поддержать разработчика zapret [тут](https://github.com/bol-van/zapret/issues/590#issuecomment-2408866758) 114 | 115 | 116 | 117 | 118 | 119 | Star History Chart 120 | 121 | 122 | 123 | ## ⚖️Лицензирование 124 | 125 | Проект распространяется на условиях лицензии [MIT](https://github.com/Flowseal/zapret-discord-youtube/blob/main/LICENSE.txt) 126 | 127 | ## 🩷Благодарность участникам проекта 128 | 129 | [![Contributors](https://contrib.rocks/image?repo=Flowseal/zapret-discord-youtube)](https://github.com/Flowseal/zapret-discord-youtube/graphs/contributors) 130 | 131 | 💖 Отдельная благодарность разработчику [zapret](https://github.com/bol-van/zapret) - [bol-van](https://github.com/bol-van) 132 | -------------------------------------------------------------------------------- /bin/WinDivert.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/87ee1785469625a1a72c5b93d5eb249ff04b14e5/bin/WinDivert.dll -------------------------------------------------------------------------------- /bin/WinDivert64.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/87ee1785469625a1a72c5b93d5eb249ff04b14e5/bin/WinDivert64.sys -------------------------------------------------------------------------------- /bin/cygwin1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/87ee1785469625a1a72c5b93d5eb249ff04b14e5/bin/cygwin1.dll -------------------------------------------------------------------------------- /bin/quic_initial_www_google_com.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/87ee1785469625a1a72c5b93d5eb249ff04b14e5/bin/quic_initial_www_google_com.bin -------------------------------------------------------------------------------- /bin/tls_clienthello_www_google_com.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/87ee1785469625a1a72c5b93d5eb249ff04b14e5/bin/tls_clienthello_www_google_com.bin -------------------------------------------------------------------------------- /bin/winws.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/87ee1785469625a1a72c5b93d5eb249ff04b14e5/bin/winws.exe -------------------------------------------------------------------------------- /cloudflare_switch.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | :: Admin rights check 6 | if "%1"=="admin" ( 7 | echo Started with admin rights 8 | ) else ( 9 | echo Requesting admin rights... 10 | powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/c \"\"%~f0\" admin\"' -Verb RunAs" 11 | exit /b 12 | ) 13 | 14 | set "LISTS=%~dp0lists\" 15 | set "FILE=%LISTS%ipset-cloudflare.txt" 16 | 17 | if not exist "%FILE%" ( 18 | echo Error! ipset-cloudflare.txt not found, path: %FILE% 19 | goto :eof 20 | ) 21 | 22 | findstr /C:"0.0.0.0" "%FILE%" >nul 23 | if %ERRORLEVEL%==0 ( 24 | echo Enabling cloudflare bypass... 25 | >"%FILE%" ( 26 | echo 173.245.48.0/20 27 | echo 103.21.244.0/22 28 | echo 103.22.200.0/22 29 | echo 103.31.4.0/22 30 | echo 141.101.64.0/18 31 | echo 108.162.192.0/18 32 | echo 190.93.240.0/20 33 | echo 188.114.96.0/20 34 | echo 197.234.240.0/22 35 | echo 198.41.128.0/17 36 | echo 162.158.0.0/15 37 | echo 104.16.0.0/13 38 | echo 104.24.0.0/14 39 | echo 172.64.0.0/13 40 | echo 131.0.72.0/22 41 | ) 42 | ) else ( 43 | echo Disabling cloudflare bypass... 44 | >"%FILE%" ( 45 | echo 0.0.0.0/32 46 | ) 47 | ) 48 | 49 | echo Done. 50 | pause 51 | -------------------------------------------------------------------------------- /discord.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: discord" /min "%BIN%winws.exe" --wf-tcp=443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-discord.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=443 --hostlist="%LISTS%list-discord.txt" --dpi-desync=split --dpi-desync-split-pos=1 --dpi-desync-autottl --dpi-desync-fooling=badseq --dpi-desync-repeats=8 17 | -------------------------------------------------------------------------------- /general (ALT).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general (ALT)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 17 | --filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split --dpi-desync-autottl=5 --dpi-desync-repeats=6 --dpi-desync-fooling=badseq --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" --new ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split --dpi-desync-autottl=5 --dpi-desync-repeats=6 --dpi-desync-fooling=badseq --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" 21 | -------------------------------------------------------------------------------- /general (ALT2).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general (ALT2)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 17 | --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="%BIN%tls_clienthello_www_google_com.bin" --new ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=split2 --dpi-desync-split-seqovl=652 --dpi-desync-split-pos=2 --dpi-desync-split-seqovl-pattern="%BIN%tls_clienthello_www_google_com.bin" 21 | -------------------------------------------------------------------------------- /general (ALT3).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general (ALT3)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 17 | --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 ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=split --dpi-desync-split-pos=1 --dpi-desync-autottl --dpi-desync-fooling=badseq --dpi-desync-repeats=8 21 | -------------------------------------------------------------------------------- /general (ALT4).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general (ALT4)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 17 | --filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-repeats=6 --dpi-desync-fooling=md5sig --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" --new ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-repeats=6 --dpi-desync-fooling=md5sig --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" 21 | -------------------------------------------------------------------------------- /general (ALT5).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | :: NOT RECOMMENDED 5 | 6 | cd /d "%~dp0" 7 | call service.bat status_zapret 8 | call service.bat check_updates 9 | echo: 10 | 11 | set "BIN=%~dp0bin\" 12 | set "LISTS=%~dp0lists\" 13 | 14 | start "zapret: general (ALT5)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 15 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 16 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 17 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 18 | --filter-l3=ipv4 --filter-tcp=443 --dpi-desync=syndata --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 21 | -------------------------------------------------------------------------------- /general (FAKE TLS MOD ALT).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general (FAKE TLS MOD ALT)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 17 | --filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-fooling=md5sig --dpi-desync-fake-tls-mod=rnd,rndsni,padencap --new ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-fooling=md5sig --dpi-desync-fake-tls-mod=rnd,rndsni,padencap 21 | -------------------------------------------------------------------------------- /general (FAKE TLS MOD AUTO).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general (FAKE TLS MOD AUTO)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,fakedsplit --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 17 | --filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,multidisorder --dpi-desync-split-pos=1,midsld --dpi-desync-repeats=11 --dpi-desync-fooling=md5sig --dpi-desync-fake-tls-mod=rnd,dupsid,sni=www.google.com --new ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,fakedsplit --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,multidisorder --dpi-desync-split-pos=1,midsld --dpi-desync-repeats=11 --dpi-desync-fooling=md5sig 21 | -------------------------------------------------------------------------------- /general (FAKE TLS MOD).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general (FAKE TLS MOD)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=8 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=3 --dpi-desync-fooling=md5sig --new ^ 17 | --filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-ttl=4 --dpi-desync-fake-tls-mod=rnd,rndsni,padencap --new ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=8 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=3 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-ttl=4 --dpi-desync-fake-tls-mod=rnd,rndsni,padencap 21 | -------------------------------------------------------------------------------- /general (МГТС).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general (MGTS)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 17 | --filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-autottl=2 --dpi-desync-repeats=6 --dpi-desync-fooling=badseq --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" --new ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-autottl=2 --dpi-desync-repeats=6 --dpi-desync-fooling=badseq --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" 21 | -------------------------------------------------------------------------------- /general (МГТС2).bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general (MGTS2)" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 17 | --filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fooling=md5sig --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" --new ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fooling=md5sig --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" 21 | -------------------------------------------------------------------------------- /general.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | :: 65001 - UTF-8 4 | 5 | cd /d "%~dp0" 6 | call service.bat status_zapret 7 | call service.bat check_updates 8 | echo: 9 | 10 | set "BIN=%~dp0bin\" 11 | set "LISTS=%~dp0lists\" 12 | 13 | start "zapret: general" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^ 14 | --filter-udp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 15 | --filter-udp=50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new ^ 16 | --filter-tcp=80 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 17 | --filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,multidisorder --dpi-desync-split-pos=midsld --dpi-desync-repeats=8 --dpi-desync-fooling=md5sig,badseq --new ^ 18 | --filter-udp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin" --new ^ 19 | --filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^ 20 | --filter-tcp=443 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,multidisorder --dpi-desync-split-pos=midsld --dpi-desync-repeats=6 --dpi-desync-fooling=md5sig,badseq 21 | -------------------------------------------------------------------------------- /lists/ipset-cloudflare.txt: -------------------------------------------------------------------------------- 1 | 173.245.48.0/20 2 | 103.21.244.0/22 3 | 103.22.200.0/22 4 | 103.31.4.0/22 5 | 141.101.64.0/18 6 | 108.162.192.0/18 7 | 190.93.240.0/20 8 | 188.114.96.0/20 9 | 197.234.240.0/22 10 | 198.41.128.0/17 11 | 162.158.0.0/15 12 | 104.16.0.0/13 13 | 104.24.0.0/14 14 | 172.64.0.0/13 15 | 131.0.72.0/22 16 | -------------------------------------------------------------------------------- /lists/list-discord.txt: -------------------------------------------------------------------------------- 1 | cloudflare-ech.com 2 | dis.gd 3 | discord-attachments-uploads-prd.storage.googleapis.com 4 | discord.app 5 | discord.co 6 | discord.com 7 | discord.design 8 | discord.dev 9 | discord.gift 10 | discord.gifts 11 | discord.gg 12 | discord.media 13 | discord.new 14 | discord.status 15 | discord.store 16 | discordapp.com 17 | discordapp.net 18 | discordcdn.com 19 | discordmerch.com 20 | discordpartygames.com 21 | discordsays.com 22 | discordsez.com 23 | discord-activities.com 24 | discordactivities.com 25 | stable.dl2.discordapp.net 26 | -------------------------------------------------------------------------------- /lists/list-general.txt: -------------------------------------------------------------------------------- 1 | cloudflare-ech.com 2 | dis.gd 3 | discord-attachments-uploads-prd.storage.googleapis.com 4 | discord.app 5 | discord.co 6 | discord.com 7 | discord.design 8 | discord.dev 9 | discord.gift 10 | discord.gifts 11 | discord.gg 12 | discord.media 13 | discord.new 14 | discord.store 15 | discord.status 16 | discord-activities.com 17 | discordactivities.com 18 | discordapp.com 19 | discordapp.net 20 | discordcdn.com 21 | discordmerch.com 22 | discordpartygames.com 23 | discordsays.com 24 | discordsez.com 25 | ggpht.com 26 | googlevideo.com 27 | jnn-pa.googleapis.com 28 | stable.dl2.discordapp.net 29 | wide-youtube.l.google.com 30 | youtube-nocookie.com 31 | youtube-ui.l.google.com 32 | youtube.com 33 | youtubeembeddedplayer.googleapis.com 34 | youtubekids.com 35 | youtubei.googleapis.com 36 | youtu.be 37 | yt-video-upload.l.google.com 38 | ytimg.com 39 | ytimg.l.google.com 40 | frankerfacez.com 41 | ffzap.com 42 | betterttv.net 43 | 7tv.app 44 | 7tv.io 45 | -------------------------------------------------------------------------------- /service.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal EnableDelayedExpansion 3 | set "LOCAL_VERSION=1.7.2b" 4 | 5 | :: External commands 6 | if "%~1"=="status_zapret" ( 7 | call :test_service zapret soft 8 | exit /b 9 | ) 10 | 11 | if "%~1"=="check_updates" ( 12 | call :service_check_updates soft 13 | exit /b 14 | ) 15 | 16 | if "%1"=="admin" ( 17 | echo Started with admin rights 18 | ) else ( 19 | echo Requesting admin rights... 20 | powershell -Command "Start-Process 'cmd.exe' -ArgumentList '/c \"\"%~f0\" admin\"' -Verb RunAs" 21 | exit /b 22 | ) 23 | 24 | 25 | :: MENU ================================ 26 | :menu 27 | cls 28 | set "menu_choice=null" 29 | echo ======================= 30 | echo 1. Install Service 31 | echo 2. Remove Services 32 | echo 3. Check Service Status 33 | echo 4. Run Diagnostics 34 | echo 5. Check Updates 35 | echo 0. Exit 36 | set /p menu_choice=Enter choice (0-5): 37 | 38 | if "%menu_choice%"=="1" goto service_install 39 | if "%menu_choice%"=="2" goto service_remove 40 | if "%menu_choice%"=="3" goto service_status 41 | if "%menu_choice%"=="4" goto service_diagnostics 42 | if "%menu_choice%"=="5" goto service_check_updates 43 | if "%menu_choice%"=="0" exit /b 44 | goto menu 45 | 46 | 47 | :: STATUS ============================== 48 | :service_status 49 | cls 50 | chcp 65001 > nul 51 | echo Checking services and tasks... 52 | call :test_service zapret 53 | call :test_service WinDivert 54 | 55 | tasklist /FI "IMAGENAME eq winws.exe" | find /I "winws.exe" > nul 56 | if !errorlevel!==0 ( 57 | echo Bypass is ACTIVE 58 | ) else ( 59 | echo Bypass NOT FOUND 60 | ) 61 | 62 | pause 63 | goto menu 64 | 65 | :test_service 66 | set "ServiceName=%~1" 67 | set "ServiceStatus=" 68 | 69 | for /f "tokens=3 delims=: " %%A in ('sc query "%ServiceName%" ^| findstr /i "STATE"') do set "ServiceStatus=%%A" 70 | set "ServiceStatus=%ServiceStatus: =%" 71 | 72 | if "%ServiceStatus%"=="RUNNING" ( 73 | if "%~2"=="soft" ( 74 | echo "%ServiceName%" is ALREADY RUNNING as service, use "service.bat" and choose "Remove Services" first if you want to run standalone bat. 75 | pause 76 | exit /b 77 | ) else ( 78 | echo "%ServiceName%" service is RUNNING. 79 | ) 80 | ) else if not "%~2"=="soft" ( 81 | echo "%ServiceName%" is NOT running. 82 | ) 83 | 84 | exit /b 85 | 86 | 87 | :: REMOVE ============================== 88 | :service_remove 89 | cls 90 | chcp 65001 > nul 91 | 92 | set SRVCNAME=zapret 93 | net stop %SRVCNAME% 94 | sc delete %SRVCNAME% 95 | 96 | net stop "WinDivert" 97 | sc delete "WinDivert" 98 | net stop "WinDivert14" 99 | sc delete "WinDivert14" 100 | 101 | pause 102 | goto menu 103 | 104 | 105 | :: INSTALL ============================= 106 | :service_install 107 | cls 108 | chcp 65001 > nul 109 | 110 | :: Main 111 | cd /d "%~dp0" 112 | set "BIN_PATH=%~dp0bin\" 113 | set "LISTS_PATH=%~dp0lists\" 114 | 115 | :: Searching for .bat files in current folder, except files that start with "service" 116 | echo Pick one of the options: 117 | set "count=0" 118 | for %%f in (*.bat) do ( 119 | set "filename=%%~nxf" 120 | if /i not "!filename:~0,7!"=="service" if /i not "!filename:~0,17!"=="cloudflare_switch" ( 121 | set /a count+=1 122 | echo !count!. %%f 123 | set "file!count!=%%f" 124 | ) 125 | ) 126 | 127 | :: Choosing file 128 | set "choice=" 129 | set /p "choice=Input file index (number): " 130 | if "!choice!"=="" goto :eof 131 | 132 | set "selectedFile=!file%choice%!" 133 | if not defined selectedFile ( 134 | echo Invalid choice, exiting... 135 | pause 136 | goto menu 137 | ) 138 | 139 | :: Args that should be followed by value 140 | set "args_with_value=sni" 141 | 142 | :: Parsing args (mergeargs: 2=start param|3=arg with value|1=params args|0=default) 143 | set "args=" 144 | set "capture=0" 145 | set "mergeargs=0" 146 | set QUOTE=" 147 | 148 | for /f "tokens=*" %%a in ('type "!selectedFile!"') do ( 149 | set "line=%%a" 150 | 151 | echo !line! | findstr /i "%BIN%winws.exe" >nul 152 | if not errorlevel 1 ( 153 | set "capture=1" 154 | ) 155 | 156 | if !capture!==1 ( 157 | if not defined args ( 158 | set "line=!line:*%BIN%winws.exe"=!" 159 | ) 160 | 161 | set "temp_args=" 162 | for %%i in (!line!) do ( 163 | set "arg=%%i" 164 | 165 | if not "!arg!"=="^" ( 166 | if "!arg:~0,2!" EQU "--" if not !mergeargs!==0 ( 167 | set "mergeargs=0" 168 | ) 169 | 170 | if "!arg:~0,1!" EQU "!QUOTE!" ( 171 | set "arg=!arg:~1,-1!" 172 | 173 | echo !arg! | findstr ":" >nul 174 | if !errorlevel!==0 ( 175 | set "arg=\!QUOTE!!arg!\!QUOTE!" 176 | ) else if "!arg:~0,1!"=="@" ( 177 | set "arg=\!QUOTE!@%~dp0!arg:~1!\!QUOTE!" 178 | ) else if "!arg:~0,5!"=="%%BIN%%" ( 179 | set "arg=\!QUOTE!!BIN_PATH!!arg:~5!\!QUOTE!" 180 | ) else if "!arg:~0,7!"=="%%LISTS%%" ( 181 | set "arg=\!QUOTE!!LISTS_PATH!!arg:~7!\!QUOTE!" 182 | ) else ( 183 | set "arg=\!QUOTE!%~dp0!arg!\!QUOTE!" 184 | ) 185 | ) 186 | 187 | if !mergeargs!==1 ( 188 | set "temp_args=!temp_args!,!arg!" 189 | ) else if !mergeargs!==3 ( 190 | set "temp_args=!temp_args!=!arg!" 191 | set "mergeargs=1" 192 | ) else ( 193 | set "temp_args=!temp_args! !arg!" 194 | ) 195 | 196 | if "!arg:~0,2!" EQU "--" ( 197 | set "mergeargs=2" 198 | ) else if !mergeargs!==2 ( 199 | set "mergeargs=1" 200 | ) else if !mergeargs!==1 ( 201 | for %%x in (!args_with_value!) do ( 202 | if /i "%%x"=="!arg!" ( 203 | set "mergeargs=3" 204 | ) 205 | ) 206 | ) 207 | ) 208 | ) 209 | 210 | if not "!temp_args!"=="" ( 211 | set "args=!args! !temp_args!" 212 | ) 213 | ) 214 | ) 215 | 216 | :: Creating service with parsed args 217 | set ARGS=%args% 218 | echo Final args: !ARGS! 219 | set SRVCNAME=zapret 220 | 221 | net stop %SRVCNAME% >nul 2>&1 222 | sc delete %SRVCNAME% >nul 2>&1 223 | sc create %SRVCNAME% binPath= "\"%BIN_PATH%winws.exe\" %ARGS%" DisplayName= "zapret" start= auto 224 | sc description %SRVCNAME% "Zapret DPI bypass software" 225 | sc start %SRVCNAME% 226 | 227 | pause 228 | goto menu 229 | 230 | 231 | :: CHECK UPDATES ======================= 232 | :service_check_updates 233 | chcp 437 > nul 234 | 235 | :: Set current version and URLs 236 | set "GITHUB_VERSION_URL=https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/main/.service/version.txt" 237 | set "GITHUB_RELEASE_URL=https://github.com/Flowseal/zapret-discord-youtube/releases/tag/" 238 | set "GITHUB_DOWNLOAD_URL=https://github.com/Flowseal/zapret-discord-youtube/releases/latest/download/zapret-discord-youtube-" 239 | 240 | :: Get the latest version from GitHub 241 | for /f "delims=" %%A in ('powershell -command "(Invoke-WebRequest -Uri \"%GITHUB_VERSION_URL%\" -Headers @{\"Cache-Control\"=\"no-cache\"} -TimeoutSec 5).Content.Trim()" 2^>nul') do set "GITHUB_VERSION=%%A" 242 | 243 | :: Error handling 244 | if not defined GITHUB_VERSION ( 245 | echo Warning: failed to fetch the latest version. Check your internet connection. This warning does not affect the operation of zapret 246 | pause 247 | if "%1"=="soft" exit /b 248 | goto menu 249 | ) 250 | 251 | :: Version comparison 252 | if "%LOCAL_VERSION%"=="%GITHUB_VERSION%" ( 253 | echo Latest version installed: %LOCAL_VERSION% 254 | ) else ( 255 | echo New version available: %GITHUB_VERSION% 256 | echo Release page: %GITHUB_RELEASE_URL%%GITHUB_VERSION% 257 | 258 | set "CHOICE=" 259 | set /p "CHOICE=Do you want to automatically download the new version? (Y/N) (default: Y) " 260 | if "!CHOICE!"=="" set "CHOICE=Y" 261 | if "!CHOICE!"=="y" set "CHOICE=Y" 262 | 263 | if /i "!CHOICE!"=="Y" ( 264 | echo Opening the download page... 265 | start "" "%GITHUB_DOWNLOAD_URL%%GITHUB_VERSION%.rar" 266 | ) 267 | ) 268 | 269 | if "%1"=="soft" exit /b 270 | pause 271 | goto menu 272 | 273 | 274 | :: DIAGNOSTICS ========================= 275 | :service_diagnostics 276 | chcp 437 > nul 277 | cls 278 | 279 | :: AdguardSvc.exe 280 | tasklist /FI "IMAGENAME eq AdguardSvc.exe" | find /I "AdguardSvc.exe" > nul 281 | if !errorlevel!==0 ( 282 | call :PrintRed "[X] Adguard process found. Adguard may cause problems with Discord" 283 | call :PrintRed "https://github.com/Flowseal/zapret-discord-youtube/issues/417" 284 | ) else ( 285 | call :PrintGreen "Adguard check passed" 286 | ) 287 | echo: 288 | 289 | :: Killer 290 | sc query | findstr /I "Killer" > nul 291 | if !errorlevel!==0 ( 292 | call :PrintRed "[X] Killer services found. Killer conflicts with zapret" 293 | call :PrintRed "https://github.com/Flowseal/zapret-discord-youtube/issues/2512#issuecomment-2821119513" 294 | ) else ( 295 | call :PrintGreen "Killer check passed" 296 | ) 297 | echo: 298 | 299 | :: Check Point 300 | set "checkpointFound=0" 301 | sc query | findstr /I "TracSrvWrapper" > nul 302 | if !errorlevel!==0 ( 303 | set "checkpointFound=1" 304 | ) 305 | 306 | sc query | findstr /I "EPWD" > nul 307 | if !errorlevel!==0 ( 308 | set "checkpointFound=1" 309 | ) 310 | 311 | if !checkpointFound!==1 ( 312 | call :PrintRed "[X] Check Point services found. Check Point conflicts with zapret" 313 | call :PrintRed "Try to uninstall Check Point" 314 | ) else ( 315 | call :PrintGreen "Check Point check passed" 316 | ) 317 | echo: 318 | 319 | :: SmartByte 320 | sc query | findstr /I "SmartByte" > nul 321 | if !errorlevel!==0 ( 322 | call :PrintRed "[X] SmartByte services found. SmartByte conflicts with zapret" 323 | call :PrintRed "Try to uninstall or disable SmartByte through services.msc" 324 | ) else ( 325 | call :PrintGreen "SmartByte check passed" 326 | ) 327 | echo: 328 | 329 | :: VPN 330 | sc query | findstr /I "VPN" > nul 331 | if !errorlevel!==0 ( 332 | call :PrintYellow "[?] Some VPN services found. Some VPNs can conflict with zapret" 333 | call :PrintYellow "Make sure that all VPNs are disabled" 334 | ) else ( 335 | call :PrintGreen "VPN check passed" 336 | ) 337 | echo: 338 | 339 | :: DNS 340 | set "dnsfound=0" 341 | for /f "skip=1 tokens=*" %%a in ('wmic nicconfig where "IPEnabled=true" get DNSServerSearchOrder /format:table') do ( 342 | echo %%a | findstr /i "192.168." >nul 343 | if !errorlevel!==0 ( 344 | set "dnsfound=1" 345 | ) 346 | ) 347 | if !dnsfound!==1 ( 348 | call :PrintYellow "[?] DNS servers are probably not specified." 349 | call :PrintYellow "Provider's DNS servers are automatically used, which may affect zapret. It is recommended to install well-known DNS servers and setup DoH" 350 | ) else ( 351 | call :PrintGreen "DNS check passed" 352 | ) 353 | echo: 354 | 355 | :: Discord cache clearing 356 | set "CHOICE=" 357 | set /p "CHOICE=Do you want to clear the Discord cache? (Y/N) (default: Y) " 358 | if "!CHOICE!"=="" set "CHOICE=Y" 359 | if "!CHOICE!"=="y" set "CHOICE=Y" 360 | 361 | if /i "!CHOICE!"=="Y" ( 362 | tasklist /FI "IMAGENAME eq Discord.exe" | findstr /I "Discord.exe" > nul 363 | if !errorlevel!==0 ( 364 | echo Discord is running, closing... 365 | taskkill /IM Discord.exe /F > nul 366 | if !errorlevel! == 0 ( 367 | call :PrintGreen "Discord was successfully closed" 368 | ) else ( 369 | call :PrintRed "Unable to close Discord" 370 | ) 371 | ) 372 | 373 | set "discordCacheDir=%appdata%\discord" 374 | 375 | for %%d in ("Cache" "Code Cache" "GPUCache") do ( 376 | set "dirPath=!discordCacheDir!\%%~d" 377 | if exist "!dirPath!" ( 378 | rd /s /q "!dirPath!" 379 | if !errorlevel!==0 ( 380 | call :PrintGreen "Successfully deleted !dirPath!" 381 | ) else ( 382 | call :PrintRed "Failed to delete !dirPath!" 383 | ) 384 | ) else ( 385 | call :PrintRed "!dirPath! does not exist" 386 | ) 387 | ) 388 | ) 389 | echo: 390 | 391 | pause 392 | goto menu 393 | 394 | :: Utility functions 395 | 396 | :PrintGreen 397 | powershell -Command "Write-Host \"%~1\" -ForegroundColor Green" 398 | exit /b 399 | 400 | :PrintRed 401 | powershell -Command "Write-Host \"%~1\" -ForegroundColor Red" 402 | exit /b 403 | 404 | :PrintYellow 405 | powershell -Command "Write-Host \"%~1\" -ForegroundColor Yellow" 406 | exit /b --------------------------------------------------------------------------------