Files
zapret-discord-youtube-linux/strategies/ALT10.conf
T
OpenCode Agent c6d843bd23 fix: critical nfqws startup failures + root-check + strategy bugs
Fixed the following critical issues that prevented zapret from working:

1. strategies/*.conf: Remove --dpi-desync-fake-discord/--dpi-desync-fake-stun
   These are Windows winws.exe parameters that do NOT exist in Linux nfqws.
   nfqws immediately exited with 'unrecognized option', causing the
   infamous 'error 0000' / all strategies failing in autotest.

2. run_strategy.sh: Remove 'set -e' that broke on SIGTERM and empty arrays.
   Remove useless service.sh sub-command calls (status_zapret/check_updates/
   load_game_filter/load_user_lists) that did nothing and could fork bomb.
   Add root check with clear 'sudo ' message.

3. autotest.sh: Fix typo '2&1' -> '2>&1' (bash parse error on cleanup).
   Remove redundant 'sudo' when already root. Properly kill strategy wrapper
   PID before cleanup_firewall to avoid nfqws orphan processes.

4. service.sh: Add root check at main() entry. Remove nested 'sudo' inside
   already-root scripts (systemctl cp/daemon-reload/...). Fix recursive
   'bash  remove_services' -> call service_remove directly.

5. lib/functions.sh: Fix stray space before detect_distro(). Add check_root()
   helper for all scripts. Add missing fake-bin warning in check_nfqws().

6. setup.sh / install_nfqws.sh / install.sh: Add root check. Remove nested
   'sudo' inside package manager calls. Fix EUID portability (use id -u fallback).

26 files changed. All 19 strategy configs now produce valid nfqws arguments.
2026-05-10 17:33:30 +04:00

14 lines
3.0 KiB
Plaintext

# Strategy: ALT10
# Auto-converted from upstream: general (ALT10).bat
# Version: upstream latest from git
RULE1=--filter-udp=443 --hostlist="%LISTS%list-general.txt" --hostlist="%LISTS%list-general-user.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --hostlist-exclude="%LISTS%list-exclude-user.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude-user.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin"
RULE2=--filter-udp=19294-19344,50000-50100 --filter-l7=discord,stun --dpi-desync=fake --dpi-desync-repeats=6
RULE3=--filter-tcp=2053,2083,2087,2096,8443 --hostlist-domains=discord.media --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fooling=ts --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin" --dpi-desync-fake-tls-mod=none
RULE4=--filter-tcp=443 --hostlist="%LISTS%list-google.txt" --ip-id=zero --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fooling=ts --dpi-desync-fake-tls="%BIN%tls_clienthello_www_google_com.bin"
RULE5=--filter-tcp=80,443 --hostlist="%LISTS%list-general.txt" --hostlist="%LISTS%list-general-user.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --hostlist-exclude="%LISTS%list-exclude-user.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude-user.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fooling=ts --dpi-desync-fake-tls="%BIN%stun.bin" --dpi-desync-fake-tls="%BIN%tls_clienthello_4pda_to.bin" --dpi-desync-fake-http="%BIN%tls_clienthello_max_ru.bin"
RULE6=--filter-udp=443 --ipset="%LISTS%ipset-all.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --hostlist-exclude="%LISTS%list-exclude-user.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude-user.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fake-quic="%BIN%quic_initial_www_google_com.bin"
RULE7=--filter-tcp=80,443,8443 --ipset="%LISTS%ipset-all.txt" --hostlist-exclude="%LISTS%list-exclude.txt" --hostlist-exclude="%LISTS%list-exclude-user.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude-user.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-fooling=ts --dpi-desync-fake-tls="%BIN%stun.bin" --dpi-desync-fake-tls="%BIN%tls_clienthello_4pda_to.bin" --dpi-desync-fake-http="%BIN%tls_clienthello_max_ru.bin"
RULE8=--filter-tcp=%GAME_TCP% --ipset="%LISTS%ipset-all.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude-user.txt" --dpi-desync=fake --dpi-desync-repeats=6 --dpi-desync-any-protocol=1 --dpi-desync-cutoff=n3 --dpi-desync-fooling=ts --dpi-desync-fake-tls="%BIN%stun.bin" --dpi-desync-fake-tls="%BIN%tls_clienthello_4pda_to.bin" --dpi-desync-fake-http="%BIN%tls_clienthello_max_ru.bin"
RULE9=--filter-udp=%GAME_UDP% --ipset="%LISTS%ipset-all.txt" --ipset-exclude="%LISTS%ipset-exclude.txt" --ipset-exclude="%LISTS%ipset-exclude-user.txt" --dpi-desync=fake --dpi-desync-repeats=12 --dpi-desync-any-protocol=1 --dpi-desync-fake-unknown-udp="%BIN%quic_initial_dbankcloud_ru.bin" --dpi-desync-cutoff=n2