|
|
2 months ago | |
|---|---|---|
| .. | ||
| Resources | 2 months ago | |
| Sources | 2 months ago | |
| Info.plist | 2 months ago | |
| README.md | 2 months ago | |
| build.sh | 2 months ago | |
| install.sh | 2 months ago | |
| uninstall.sh | 2 months ago | |
| zapret-menu-helper | 2 months ago | |
README.md
Zapret Menu for macOS
Attention
Это репозиторий fork от версии
zapret. В данной адаптации для macOS добавлена совместимость с macOS и визуальный интерфейс для удобной работы без ручного запуска скриптов.P.S. Человек не написал ни одной строки добавленного кода вручную; всё было сделано Cursor + GPT-5.5.
This repository is a fork/adaptation of
zapret. This macOS-oriented solution adds compatibility notes for macOS usage and a visual menu bar interface so users can work with zapret without manually running shell scripts.P.S. No human wrote a single line of this added code manually; it was generated and assembled with Cursor + GPT-5.5.
Optional macOS menu bar controller for a local zapret installation.
The app lives in the macOS menu bar and provides:
- start, stop, and restart controls;
- hostlist update;
- connection check;
- human-readable status;
- Russian/English interface switch;
- launch at user login while keeping zapret itself off after reboot.
Requirements
- macOS;
- Xcode Command Line Tools (
swiftc); - zapret installed at
/opt/zapret(or another path viaZAPRET_BASE); - administrator account for installing the helper and sudoers rule.
Install Command Line Tools if needed:
xcode-select --install
Install
From the repository root:
extras/macos-menu/install.sh
Custom zapret location:
ZAPRET_BASE=/opt/zapret extras/macos-menu/install.sh
Custom app install directory:
INSTALL_DIR="$HOME/Applications/Zapret Control" extras/macos-menu/install.sh
The installer:
- Builds
Zapret Menu.app. - Copies it to
$HOME/Applications/Zapret Control. - Installs
/opt/zapret/zapret-menu-helper. - Adds a limited sudoers rule in
/etc/sudoers.d/zapret-menu. - Adds a user LaunchAgent so the menu app starts at login.
Security note
The menu app needs elevated privileges because zapret controls PF rules and root-owned daemons.
The installer does not grant broad passwordless sudo. It grants passwordless access only to:
/opt/zapret/zapret-menu-helper start
/opt/zapret/zapret-menu-helper stop
/opt/zapret/zapret-menu-helper restart
/opt/zapret/zapret-menu-helper update
The sudoers file is validated with visudo -cf before installation.
Use
Menu bar icons:
📳zapret is running;📴zapret is stopped;🔀zapret is restarting.
Menu actions:
📳 Startstarts zapret.📴 Stopstops zapret and clears rules.🔀 Restartrefreshes zapret only when it is already running and internet check passes.🔂 Update Hostlistdownloads the domain list.📶 Check Connectionchecks internet reachability with ping to1.1.1.1and HTTPS request toapple.com.▶ Show Statusshows runtime, last stop, list update date, and list sizes.ℹ️ Aboutshows app dates and a short usage guide.✖ Quitstops zapret first, verifies it stopped, then closes the menu app.
Uninstall
extras/macos-menu/uninstall.sh
The uninstaller removes:
- user LaunchAgent;
- menu app bundle;
- privileged helper;
- sudoers rule.
It does not remove zapret itself.
Build only
extras/macos-menu/build.sh
The built app is written to:
extras/macos-menu/build/Zapret Menu.app