7 Commits

Author SHA1 Message Date
Auto Fix
827c3bc63e fix(functions): use dash in GameFilterTCP/UDP ports (nfqws expects 1024-65535 not colon) 2026-05-11 17:48:42 +04:00
Auto Fix
e47a7e2461 fix(build): GCC15 segfault fallback, bin dir fix, check_nfqws --version 2026-05-11 08:22:56 +04:00
OpenCode Agent
efdb5902a6 fix(core): nfqws segfault, trap cleanup, strategy name extraction
- install_nfqws.sh: strip LTO and --gc-sections flags from Makefile before
  build to prevent segfault on some systems; verify binary runs before install
- lib/functions.sh: check_nfqws() now also tests --help to catch segfaulting
  or missing-dependency binaries
- run_strategy.sh: replace broken single-quoted trap string with proper
  cleanup_tmp function so temp file is actually removed
- service.sh: extract strategy name by stripping general_ prefix from
  wrapper filename so ExecStart points to correct config

Fixes: nfqws segfault on build, service start failure, temp file leak.
2026-05-10 19:48:30 +04:00
OpenCode Agent
62ec6c5749 fix(core): critical fixes for service menu, autotest, strategy runner, dependencies
- service.sh: split service_remove into internal (no prompts) and interactive
  versions to prevent 'eternal wait' when installing new strategy.
  Install now calls service_remove_internal > /dev/null instead of service_remove.
  Also filter strategy list to general*.sh only to avoid clutter.
  Systemd ExecStart now points to run_strategy.sh <name> consistently.

- run_strategy.sh: add SIGTERM/SIGINT trap cleanup_strategy() that kills nfqws
  and cleans up firewall. Prevents stale nfqws/firewall rules after autotest kill.
  Also handles nfqws exit gracefully with final cleanup.

- autotest.sh: rewritten to test strategies by config name (not wrapper filename).
  Stop now sends SIGTERM to wrapper (which triggers trap cleanup) instead of
  bare kill. Added extra sleep after stop to let trap fire.
  Auto-install ExecStart fixed to run_strategy.sh <strategy>.

- setup.sh: added libmnl-dev and zlib1g-dev to Ubuntu/Debian dependency install
  to prevent build failures (missing libmnl/libmnl.h and zlib.h).

- general*.sh: removed UTF-8 BOM (0xEF 0xBB 0xBF) that caused 'exec format error'
  when running scripts on Linux. All 19 wrappers cleaned.

- ensure_wrappers.sh: always rewrite wrappers to ensure no stale BOM or paths.

Fixes: eternal wait on menu option 1, nfqws build failure, stale processes after test.
2026-05-10 22:47:48 +04:00
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
Stitch505
2a6a358baf feat(ru): full Russia/offline support (#RF)
- Add lib/download_helper.sh: proxy detection, GitHub mirrors, offline cache, tarball fallback
- Rewrite install_nfqws.sh: offline bundle support, bol-van/zapret via git clone + tarball + mirror fallback
- Rewrite sync_from_upstream.sh: proxy aware, --offline flag, graceful degradation
- Add prepare_offline_bundle.sh: create tar.gz with sources + lists + fake bins on machine WITH internet
- Add .env.example: GITHUB_PROXY, HTTPS_PROXY configuration
- Update install.sh: check GitHub reachability, suggest proxy/offline, --offline flag
- Update README: Russia section at top, Offline section, VPN/proxy examples, .env guide
2026-05-10 20:11:08 +04:00
Stitch505
80e0a116e1 Initial commit: zapret-discord-youtube-linux v1.9.8c-linux 2026-05-10 19:06:04 +04:00