├── .gitattributes ├── .github ├── FUNDING.yml └── workflows │ └── release_archive.yml ├── system ├── winws.exe ├── cygwin1.dll ├── WinDivert.dll ├── WinDivert64.sys ├── quic_initial_www_google_com.bin ├── tls_clienthello_www_google_com.bin └── checker.ps1 ├── youtube.txt ├── ignore.txt ├── config.txt ├── LICENSE ├── check.cmd ├── start_now.cmd ├── README.md ├── README_EN.md ├── autohosts.txt └── start_stop_service.cmd /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=crlf 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ['https://boosty.to/notmalware/donate'] 2 | -------------------------------------------------------------------------------- /system/winws.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ImMALWARE/zapret-windows/HEAD/system/winws.exe -------------------------------------------------------------------------------- /system/cygwin1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ImMALWARE/zapret-windows/HEAD/system/cygwin1.dll -------------------------------------------------------------------------------- /system/WinDivert.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ImMALWARE/zapret-windows/HEAD/system/WinDivert.dll -------------------------------------------------------------------------------- /system/WinDivert64.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ImMALWARE/zapret-windows/HEAD/system/WinDivert64.sys -------------------------------------------------------------------------------- /system/quic_initial_www_google_com.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ImMALWARE/zapret-windows/HEAD/system/quic_initial_www_google_com.bin -------------------------------------------------------------------------------- /system/tls_clienthello_www_google_com.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ImMALWARE/zapret-windows/HEAD/system/tls_clienthello_www_google_com.bin -------------------------------------------------------------------------------- /youtube.txt: -------------------------------------------------------------------------------- 1 | ggpht.com 2 | googlevideo.com 3 | jnn-pa.googleapis.com 4 | wide-youtube.l.google.com 5 | youtu.be 6 | youtube-nocookie.com 7 | youtube-ui.l.google.com 8 | youtube.com 9 | youtubeembeddedplayer.googleapis.com 10 | youtubei.googleapis.com 11 | yt-video-upload.l.google.com 12 | yt.be 13 | ytimg.com 14 | ytimg.l.google.com 15 | -------------------------------------------------------------------------------- /ignore.txt: -------------------------------------------------------------------------------- 1 | accounts.google.com 2 | ajax.googleapis.com 3 | android.googleapis.com 4 | blum.codes 5 | connectivitycheck.gstatic.com 6 | firefox.com 7 | fonts.googleapis.com 8 | fonts.gstatic.com 9 | github.com 10 | githubusercontent.com 11 | googlesyndication.com 12 | gosuslugi.ru 13 | mi.com 14 | mozilla.com 15 | mozilla.net 16 | mozilla.org 17 | sberbank.ru 18 | steamstatic.com 19 | t2.ru 20 | tele2.ru 21 | tonhub.com 22 | userapi.com 23 | vivaldi.com 24 | vk.com 25 | vtb.ru 26 | www.google.com 27 | www.googleapis.com 28 | www.gstatic.com 29 | xiaomi.com 30 | xiaomi.net -------------------------------------------------------------------------------- /system/checker.ps1: -------------------------------------------------------------------------------- 1 | if (-not (Get-Command curl.exe -ErrorAction SilentlyContinue)) { 2 | Write-Host "curl not installed!" 3 | pause 4 | exit 5 | } 6 | 7 | Get-Content "autohosts.txt" | ForEach-Object { 8 | Write-Host "Checking $_... " -NoNewline 9 | $response = ((curl.exe --connect-timeout 5 --max-time 5 -s --show-error -o NUL -w "%{http_code}" "https://$_" 2>&1) -join "`n") 10 | if ($response.EndsWith("000")) { 11 | Write-Host $response.Substring(0, $response.Length - 3).Trim() -ForegroundColor Red 12 | } else { 13 | Write-Host $response -ForegroundColor Green 14 | } 15 | } -------------------------------------------------------------------------------- /config.txt: -------------------------------------------------------------------------------- 1 | --wf-tcp=80,443,2053,2083,2087,2096,8443 --wf-udp=443,19294-19344,50000-50100 2 | --filter-udp=443 --hostlist-auto={hosts} --hostlist-exclude={ignore} --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic={quicgoogle} --new 3 | --filter-udp=19294-19344,50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6 --new 4 | --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={tlsgoogle} --new 5 | --filter-tcp=443 --hostlist-auto={hosts} --hostlist-exclude={ignore} --ip-id=zero --dpi-desync=multisplit --dpi-desync-split-seqovl=681 --dpi-desync-split-pos=1 --dpi-desync-split-seqovl-pattern={tlsgoogle} --new 6 | --filter-tcp=80 --hostlist={hosts} --hostlist-exclude={ignore} --dpi-desync=multisplit --dpi-desync-split-seqovl=568 --dpi-desync-split-pos=1 --dpi-desync-split-seqovl-pattern={tlsgoogle} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /check.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 >nul 3 | setlocal DisableDelayedExpansion 4 | set "batchPath=%~dpnx0" 5 | for %%k in (%0) do set "batchName=%%~nk" 6 | set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" 7 | setlocal EnableDelayedExpansion 8 | 9 | whoami /groups /nh | find "S-1-16-12288" >nul 10 | if '%errorlevel%'=='0' ( 11 | net session >nul 2>&1 12 | if '%errorlevel%'=='0' goto gotPrivileges 13 | ) 14 | 15 | if '%1'=='ELEV' shift /1 & goto gotPrivileges 16 | 17 | > "%vbsGetPrivileges%" ( 18 | echo Set UAC = CreateObject^("Shell.Application"^) 19 | echo args = "ELEV " 20 | echo For Each strArg in WScript.Arguments 21 | echo args = args ^& strArg ^& " " 22 | echo Next 23 | echo args = "/c """ + "%batchPath%" + """ " + args 24 | echo UAC.ShellExecute "%SystemRoot%\System32\cmd.exe", args, "", "runas", 1 25 | ) 26 | 27 | "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* 28 | exit /B 29 | 30 | :gotPrivileges 31 | setlocal & cd /d %~dp0 32 | if '%1'=='ELEV' del "%vbsGetPrivileges%" >nul 2>&1 & shift /1 33 | 34 | 35 | reg add "HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" /v ExecutionPolicy /t REG_SZ /d Unrestricted /f 36 | 37 | powershell system/checker.ps1 38 | pause -------------------------------------------------------------------------------- /start_now.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 >nul 3 | cd /d "%~dp0" 4 | IF NOT EXIST "system\" ( 5 | echo Распакуйте архив! 6 | echo Unpack the archive! 7 | pause 8 | exit /b 9 | ) 10 | setlocal enabledelayedexpansion 11 | 12 | sc query bfe | find "RUNNING" >nul 13 | if errorlevel 1 ( 14 | echo Служба BFE не запущена! Откройте "Службы" и запустите "Служба базовой фильтрации"! 15 | echo BFE service is not running! Open "Services" and start "Base Filtering Engine"! 16 | pause 17 | exit 18 | ) 19 | 20 | set "autohosts="%~dp0autohosts.txt"" 21 | set "ignore="%~dp0ignore.txt"" 22 | set "youtube="%~dp0youtube.txt"" 23 | set "quicgoogle="%~dp0system\quic_initial_www_google_com.bin"" 24 | set "tlsgoogle="%~dp0system\tls_clienthello_www_google_com.bin"" 25 | 26 | set "args=" 27 | 28 | for /f "usebackq delims=" %%A in ("config.txt") do ( 29 | set "line=%%A" 30 | set "line=!line:{hosts}=%autohosts%!" 31 | set "line=!line:{ignore}=%ignore%!" 32 | set "line=!line:{youtube}=%youtube%!" 33 | set "line=!line:{quicgoogle}=%quicgoogle%!" 34 | set "line=!line:{tlsgoogle}=%tlsgoogle%!" 35 | set "args=!args! !line!" 36 | ) 37 | 38 | start "zapret t.me/immalware" "system\winws.exe" !args! -------------------------------------------------------------------------------- /.github/workflows/release_archive.yml: -------------------------------------------------------------------------------- 1 | name: Release archive 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | permissions: 7 | contents: write 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Create archive 18 | run: | 19 | zip -r zapret.zip system autohosts.txt check.cmd config.txt ignore.txt start_now.cmd start_stop_service.cmd youtube.txt 20 | 21 | - name: Get latest release tag 22 | id: get_latest_tag 23 | run: echo "next_tag=$(( $(git tag --sort=-version:refname | head -n 1) + 1 ))" >> $GITHUB_OUTPUT 24 | 25 | - name: Create release 26 | id: create_release 27 | uses: softprops/action-gh-release@v1 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | with: 31 | tag_name: ${{ steps.get_latest_tag.outputs.next_tag }} 32 | name: "Архив ${{ steps.get_latest_tag.outputs.next_tag }}" 33 | body: | 34 | Смотрите гайд в [README](https://github.com/ImMALWARE/zapret-windows/blob/master/README.md) 35 | See guide in [README in English](https://github.com/ImMALWARE/zapret-windows/blob/master/README_EN.md) 36 | files: zapret.zip -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Сборка https://github.com/bol-van/zapret для Windows 2 | [README in English](https://github.com/ImMALWARE/zapret-windows/blob/master/README_EN.md) 3 | 4 | 1. Скачиваем архив: https://github.com/ImMALWARE/zapret-windows/releases/latest/download/zapret.zip 5 | 2. Распаковываем в какую-нибудь папку (например, C:\zapret) 6 | 7 | **start_now.cmd** — запустить в окне, zapret будет работать, пока открыта командная строка 8 | 9 | **start_stop_service.cmd** — создать или удалить службу. При создании службы, zapret будет запущен без окна и будет автоматически запускаться при запуске Windows. 10 | 11 | **autohosts.txt** — список доменов заблокированных сайтов. Обязательно должна быть пустая строка в конце файла. 12 | 13 | **check.cmd** — проверить доступ к сайтам из autohosts.txt. 14 | 15 | **ignore.txt** — список доменов незаблокированных сайтов. Если не работает незаблокированный сайт, добавьте его домен сюда. 16 | 17 | **config.txt** — конфиг winws. Вместо путей к файлам используйте {переменные}. 18 | 19 | ## Переменные в config.txt 20 | 21 | `{hosts}` — подставит путь к autohosts.txt 22 | 23 | `{ignore}` — подставит путь к ignore.txt 24 | 25 | `{youtube}` — подставить путь к youtube.txt 26 | 27 | `{quicgoogle}` — подставит путь к system\quic_initial_www_google_com.bin 28 | 29 | `{tlsgoogle}` — подставит путь к system\tls_clienthello_www_google_com.bin 30 | 31 | ## Как использовать на Windows 7? 32 | Чтобы zapret работал на Windows 7, необходимо отключить проверку подписи драйверов. Для этого [выполните команды в командной строке от имени администратора](https://wiki.malw.link/windows/run) и перезагрузите систему: 33 | 34 | ``` 35 | bcdedit.exe -set loadoptions DISABLE_INTEGRITY_CHECKS 36 | bcdedit.exe -set TESTSIGNING ON 37 | ``` 38 | После перезагрузки, zapret должен работать корректно. -------------------------------------------------------------------------------- /README_EN.md: -------------------------------------------------------------------------------- 1 | # A build of https://github.com/bol-van/zapret for Windows 2 | [README на русском](https://github.com/ImMALWARE/zapret-windows/blob/master/README.md) 3 | 4 | 1. Download the archive: https://github.com/ImMALWARE/zapret-windows/releases/latest/download/zapret.zip 5 | 2. Unpack it into a folder (e.g., C:\zapret) 6 | 7 | **start_now.cmd** — Runs the program in a window, zapret will be active as long as the command prompt window is open. 8 | 9 | **start_stop_service.cmd** — Creates or deletes the service. When the service is created, zapret will run in the background (without a window) and will start automatically with Windows. 10 | 11 | **autohosts.txt** — A list of domains for blocked sites. There must be an empty line at the end of the file. 12 | 13 | **check.cmd** — Checks access to the sites listed in autohosts.txt. 14 | 15 | **ignore.txt** — A list of domains for unblocked sites. If an unblocked site isn't working, add its domain here. 16 | 17 | **config.txt** — The config file. Use {variables} instead of file paths. 18 | 19 | ## Variables in config.txt 20 | 21 | `{hosts}` — Substitutes the path to autohosts.txt 22 | 23 | `{ignore}` — Substitutes the path to ignore.txt 24 | 25 | `{youtube}` — Substitutes the path to youtube.txt 26 | 27 | `{quicgoogle}` — Substitutes the path to system\quic_initial_www_google_com.bin 28 | 29 | `{tlsgoogle}` — Substitutes the path to system\tls_clienthello_www_google_com.bin 30 | 31 | ## How to use on Windows 7? 32 | To make zapret work on Windows 7, you need to disable driver signature verification. To do this, [run the following commands in a command prompt as an administrator](https://wiki.malw.link/windows/run) and then reboot your system: 33 | 34 | ``` 35 | bcdedit.exe -set loadoptions DISABLE_INTEGRITY_CHECKS 36 | bcdedit.exe -set TESTSIGNING ON 37 | ``` 38 | After rebooting, zapret should work correctly. -------------------------------------------------------------------------------- /autohosts.txt: -------------------------------------------------------------------------------- 1 | 7tv.app 2 | amnezia.org 3 | ampproject.org 4 | api.cloudflareclient.com 5 | apkmirror.com 6 | appspot.com 7 | avira.com 8 | blancvpn.net 9 | botnadzor.org 10 | cdninstagram.com 11 | censorship.no 12 | censortracker.org 13 | chess.com 14 | cloudflare-ech.com 15 | cock.li 16 | conversations.im 17 | discord-attachments-uploads-prd.storage.googleapis.com 18 | discord.com 19 | discord.gg 20 | discord.media 21 | discordapp.com 22 | discordapp.net 23 | dolphin-anty.com 24 | emkei.cz 25 | engage.cloudflareclient.com 26 | facebook.com 27 | fbcdn.net 28 | fbsbx.com 29 | ficbook.net 30 | files.catbox.moe 31 | forumlib.me 32 | freedomhouse.org 33 | gekkk.co 34 | ggpht.com 35 | godaddy.com 36 | google.ua 37 | googlevideo.com 38 | imagedelivery.net 39 | instagram.com 40 | ipvanish.com 41 | itch.io 42 | jnn-pa.googleapis.com 43 | jut.su 44 | kemono.su 45 | linkedin.com 46 | linktr.ee 47 | lolz.guru 48 | matrix-client.matrix.org 49 | matrix.org 50 | matrix.to 51 | medium.com 52 | mega.co.nz 53 | mega.nz 54 | mullvad.net 55 | musixmatch.com 56 | news.google.com 57 | nnmclub.to 58 | nordvpn.com 59 | notepad-plus-plus.org 60 | ntc.party 61 | pages.dev 62 | patreon.com 63 | picuki.com 64 | play.google.com 65 | privateinternetaccess.com 66 | prnt.sc 67 | proton.me 68 | protonmail.ch 69 | protonmail.com 70 | protonvpn.com 71 | protonvpn.net 72 | psiphon.ca 73 | quora.com 74 | redshieldvpn.com 75 | rentry.co 76 | rentry.org 77 | riseup.net 78 | roskomsvoboda.org 79 | rutracker.cc 80 | rutracker.org 81 | sb.scorecardresearch.com 82 | signal.org 83 | snapchat.com 84 | sndcdn.com 85 | soundcloud.com 86 | speedtest.net 87 | t.co 88 | te-st.org 89 | thonny.org 90 | tmailor.com 91 | torproject.org 92 | tuta.com 93 | twimg.com 94 | twitter.com 95 | ulta.team 96 | vector.im 97 | viber.com 98 | vpnlove.me 99 | wide-youtube.l.google.com 100 | windscribe.com 101 | wixmp.com 102 | x.com 103 | xvpn.io 104 | youtu.be 105 | youtube-nocookie.com 106 | youtube-ui.l.google.com 107 | youtube.com 108 | youtubeembeddedplayer.googleapis.com 109 | youtubei.googleapis.com 110 | yt-video-upload.l.google.com 111 | yt.be 112 | yt3.googleusercontent.com 113 | ytimg.com 114 | ytimg.l.google.com 115 | zelenka.guru 116 | znanija.com 117 | -------------------------------------------------------------------------------- /start_stop_service.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 >nul 3 | cd /d "%~dp0" 4 | IF NOT EXIST "system\" ( 5 | echo Распакуйте архив! 6 | echo Unpack the archive! 7 | pause 8 | exit /b 9 | ) 10 | sc query bfe | find "RUNNING" >nul 11 | if errorlevel 1 ( 12 | echo Служба BFE не запущена! Откройте "Службы" и запустите "Служба базовой фильтрации"! 13 | echo BFE service is not running! Open "Services" and start "Base Filtering Engine"! 14 | pause 15 | exit 16 | ) 17 | setlocal DisableDelayedExpansion 18 | set "batchPath=%~dpnx0" 19 | for %%k in (%0) do set "batchName=%%~nk" 20 | set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs" 21 | setlocal EnableDelayedExpansion 22 | 23 | whoami /groups /nh | find "S-1-16-12288" >nul 24 | if '%errorlevel%'=='0' ( 25 | net session >nul 2>&1 26 | if '%errorlevel%'=='0' goto gotPrivileges 27 | ) 28 | 29 | if '%1'=='ELEV' shift /1 & goto gotPrivileges 30 | 31 | > "%vbsGetPrivileges%" ( 32 | echo Set UAC = CreateObject^("Shell.Application"^) 33 | echo args = "ELEV " 34 | echo For Each strArg in WScript.Arguments 35 | echo args = args ^& strArg ^& " " 36 | echo Next 37 | echo args = "/c """ + "%batchPath%" + """ " + args 38 | echo UAC.ShellExecute "%SystemRoot%\System32\cmd.exe", args, "", "runas", 1 39 | ) 40 | 41 | "%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %* 42 | exit /B 43 | 44 | :gotPrivileges 45 | setlocal & cd /d %~dp0 46 | if '%1'=='ELEV' del "%vbsGetPrivileges%" >nul 2>&1 & shift /1 47 | 48 | 49 | 50 | sc query ZapretService >nul 2>&1 51 | IF %ERRORLEVEL% EQU 0 ( 52 | taskkill /f /im "winws.exe" 53 | sc stop "ZapretService" 54 | sc delete "ZapretService" 55 | sc stop "WinDivert" 56 | echo . 57 | echo Служба zapret удалена. Вы можете закрыть эту командную строку. 58 | echo Для запуска службы запустите этот же файл. 59 | echo The zapret service has been removed. You can close this command prompt. 60 | echo To start the service, run this same file. 61 | pause > nul 62 | exit 63 | ) 64 | 65 | set "autohosts="%~dp0autohosts.txt"" 66 | set "ignore="%~dp0ignore.txt"" 67 | set "youtube="%~dp0youtube.txt"" 68 | set "quicgoogle="%~dp0system\quic_initial_www_google_com.bin"" 69 | set "tlsgoogle="%~dp0system\tls_clienthello_www_google_com.bin"" 70 | 71 | set "args=" 72 | 73 | for /f "usebackq delims=" %%A in ("config.txt") do ( 74 | set "line=%%A" 75 | set "line=!line:{hosts}=%autohosts%!" 76 | set "line=!line:{ignore}=%ignore%!" 77 | set "line=!line:{youtube}=%youtube%!" 78 | set "line=!line:{quicgoogle}=%quicgoogle%!" 79 | set "line=!line:{tlsgoogle}=%tlsgoogle%!" 80 | set "args=!args! !line!" 81 | ) 82 | 83 | sc create "ZapretService" binPath= "\"%CD%\system\winws.exe\" !args!" DisplayName= "ZapretService" start= auto 84 | sc description "ZapretService" "Ускорение устаревших серверов" 85 | sc start "ZapretService" 86 | 87 | echo . 88 | echo zapret запущен в фоне. Вы можете закрыть эту командную строку. 89 | echo Для остановки службы запустите этот же файл. 90 | echo zapret is running in the background. You can close this command prompt. 91 | echo To stop the service, run this same file. 92 | pause > nul --------------------------------------------------------------------------------