Compare commits

...

7 Commits

Author SHA1 Message Date
idesync
0a75784ebe
Merge 9a624df92a into 3ef216b71b 2025-06-17 03:58:41 +03:00
unknown
3ef216b71b Fixed DelayedExpansion, game filter template 2025-06-17 03:47:27 +03:00
unknown
785b8de6d2 added update ipset script 2025-06-16 22:53:13 +03:00
idesync
9a624df92a
Update twitter.bat 2025-05-08 23:31:21 +07:00
idesync
2b159468e0
Update twitter.bat 2025-05-08 23:19:00 +07:00
idesync
b8ecc3f103
Add twitter.bat 2025-05-08 23:18:38 +07:00
idesync
4846ffb27d
Add X domens 2025-05-08 23:17:48 +07:00
4 changed files with 118 additions and 18 deletions

1
bin/game_filter.enabled Normal file
View File

@ -0,0 +1 @@
ENABLED

View File

@ -1,3 +1,7 @@
x.com
twitter.com
t.co
twimg.com
cloudflare-ech.com
dis.gd
discord-attachments-uploads-prd.storage.googleapis.com

View File

@ -1,5 +1,4 @@
@echo off
setlocal EnableDelayedExpansion
set "LOCAL_VERSION=1.7.2b"
:: External commands
@ -13,6 +12,12 @@ if "%~1"=="check_updates" (
exit /b
)
if "%~1"=="load_game_filter" (
call :game_switch_status
exit /b
)
if "%1"=="admin" (
echo Started with admin rights
) else (
@ -23,9 +28,11 @@ if "%1"=="admin" (
:: MENU ================================
setlocal EnableDelayedExpansion
:menu
cls
call :ipset_switch_status
call :game_switch_status
set "menu_choice=null"
echo =======================
@ -34,16 +41,20 @@ echo 2. Remove Services
echo 3. Check Service Status
echo 4. Run Diagnostics
echo 5. Check Updates
echo 6. Switch ipset (%IPsetStatus%)
echo 6. Switch Game Filter (%GameFilterStatus%)
echo 7. Switch ipset (%IPsetStatus%)
echo 8. Update ipset list
echo 0. Exit
set /p menu_choice=Enter choice (0-6):
set /p menu_choice=Enter choice (0-8):
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 ipset_switch
if "%menu_choice%"=="6" goto game_switch
if "%menu_choice%"=="7" goto ipset_switch
if "%menu_choice%"=="8" goto ipset_update
if "%menu_choice%"=="0" exit /b
goto menu
@ -256,21 +267,26 @@ if not defined GITHUB_VERSION (
:: Version comparison
if "%LOCAL_VERSION%"=="%GITHUB_VERSION%" (
echo Latest version installed: %LOCAL_VERSION%
) else (
echo New version available: %GITHUB_VERSION%
echo Release page: %GITHUB_RELEASE_URL%%GITHUB_VERSION%
if "%1"=="soft" exit /b
pause
goto menu
)
set "CHOICE="
set /p "CHOICE=Do you want to automatically download the new version? (Y/N) (default: Y) "
if "!CHOICE!"=="" set "CHOICE=Y"
if "!CHOICE!"=="y" set "CHOICE=Y"
echo New version available: %GITHUB_VERSION%
echo Release page: %GITHUB_RELEASE_URL%%GITHUB_VERSION%
if /i "!CHOICE!"=="Y" (
echo Opening the download page...
start "" "%GITHUB_DOWNLOAD_URL%%GITHUB_VERSION%.rar"
)
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 /b
pause
goto menu
@ -397,15 +413,47 @@ pause
goto menu
:: GAME SWITCH ========================
:game_switch_status
chcp 437 > nul
set "gameFlagFile=%~dp0bin\game_filter.enabled"
if exist "%gameFlagFile%" (
set "GameFilterStatus=enabled"
set "GameFilter=1024-65535"
) else (
set "GameFilterStatus=disabled"
set "GameFilter=0"
)
exit /b
:game_switch
chcp 437 > nul
cls
if not exist "%gameFlagFile%" (
echo Enabling game filter...
echo ENABLED > "%gameFlagFile%"
) else (
echo Disabling game filter...
del /f /q "%gameFlagFile%"
)
pause
goto menu
:: IPSET SWITCH =======================
:ipset_switch_status
chcp 437 > nul
findstr /R "^0\.0\.0\.0/32$" "%~dp0lists\ipset-all.txt" >nul
if !errorlevel!==0 (
set "IPsetStatus=load"
set "IPsetStatus=empty"
) else (
set "IPsetStatus=unload"
set "IPsetStatus=loaded"
)
exit /b
@ -425,7 +473,7 @@ if !errorlevel!==0 (
del /f /q "%listFile%"
ren "%backupFile%" "ipset-all.txt"
) else (
echo Error: no backup to restore. Download list from repoistory
echo Error: no backup to restore. Update list from service menu by yourself
)
) else (
@ -447,6 +495,33 @@ pause
goto menu
:: IPSET UPDATE =======================
:ipset_update
chcp 437 > nul
cls
set "listFile=%~dp0lists\ipset-all.txt"
set "url=https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/refs/heads/main/lists/ipset-all.txt"
echo Updating ipset-all...
if exist "%SystemRoot%\System32\curl.exe" (
curl -L -o "%listFile%" "%url%"
) else (
powershell -Command ^
"$url = '%url%';" ^
"$out = '%listFile%';" ^
"$dir = Split-Path -Parent $out;" ^
"if (-not (Test-Path $dir)) { New-Item -ItemType Directory -Path $dir | Out-Null };" ^
"$res = Invoke-WebRequest -Uri $url -TimeoutSec 10 -UseBasicParsing;" ^
"if ($res.StatusCode -eq 200) { $res.Content | Out-File -FilePath $out -Encoding UTF8 } else { exit 1 }"
)
echo Finished
pause
goto menu
:: Utility functions
:PrintGreen

20
twitter.bat Normal file
View File

@ -0,0 +1,20 @@
@echo off
chcp 65001 > nul
:: 65001 - UTF-8
cd /d "%~dp0"
call service.bat status_zapret
call service.bat check_updates
echo:
set "BIN=%~dp0bin\"
set "LISTS=%~dp0lists\"
start "zapret: twitter" /min "%BIN%winws.exe" --wf-tcp=80,443 --wf-udp=443,50000-50100 ^
--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 ^
--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=badseq --new ^
--filter-tcp=443 --hostlist="%LISTS%list-general.txt" --dpi-desync=fake,split2 --dpi-desync-repeats=6 --dpi-desync-fooling=badseq --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" --new ^
--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 ^
--filter-tcp=80 --ipset="%LISTS%ipset-cloudflare.txt" --dpi-desync=fake,split2 --dpi-desync-autottl=2 --dpi-desync-fooling=md5sig --new ^
--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"