How ph2n1a/zapret2-tui works
zapret2-tui is a Linux terminal interface for managing zapret2 strategy profiles, not a standalone DPI-bypass engine. The main workflow loads configuration and profiles, prepares profile configs, then runs an interactive loop that accepts input, updates application state, and redraws the interface. Users can apply a profile, manage the zapret2 service, and optionally test one or all profiles through NFQUEUE and HTTPS. The README documents these capabilities; links for some core actions rely on that documentation because their implementation excerpts were not provided.
Main entry points: main.c Program entry · app.c Application loop · core.c Action handling · testing_profiles.c Profile testing
Components 18
Startup and configuration
- Program entry
src/main.c - Dependency check
src/utils/check_dependencies.c - App configuration
src/utils/readconf.c - zapret config reader
src/core/read_zapret_conf.c - First-run wizard
src/core/first_start.c - Application logging
src/utils/log.c
Interactive interface
- Application loop
src/ui/app.c - Input handling
src/ui/input.c - Action handling
src/ui/core.c - Interface rendering
src/ui/ui.c
Profile management
- Profile configuration
src/utils/readconf.c - Profile config generation
src/core/create_zapret_configs.c - Profile application
src/core/create_link.c
Profile testing
- Profile testing
src/core/testing_profiles.c - NFQUEUE rules
Other components
- Operator
- zapret2 service
- HTTPS test domain
Connections 19
- Operator → Program entry: launches
README.md - Program entry → Dependency check: checks dependencies
src/main.c - Program entry → App configuration: loads config
src/main.c - Program entry → First-run wizard: starts wizard
src/main.c - Program entry → zapret config reader: reads zapret config
src/main.c - Program entry → Profile configuration: loads profiles
src/main.c - Program entry → Profile config generation: prepares configs
src/main.c - Program entry → Application loop: initializes app
src/main.c - Operator → Application loop: uses controls
README.md - Application loop → Input handling: polls input
src/ui/app.c - Application loop → Action handling: updates state
src/ui/app.c - Application loop → Interface rendering: draws interface
src/ui/app.c - Action handling → Profile application: applies profile
README.md - Profile application → zapret2 service: copies active config
README.md - Action handling → zapret2 service: controls service
README.md - Action handling → Profile testing: starts tests
README.md - Profile testing → NFQUEUE rules: sets queue rules
README.md - Profile testing → HTTPS test domain: sends HTTPS test
README.md - Program entry → Application logging: logs startup
src/main.c