Wraps commands and GUI apps to require NordVPN before launching on macOS.
git clone <repo-url> # depends on whether you prefer SSH or HTTPS
cd check-script-wrapper
./setup.sh
source ~/.zshrcsetup.sh adds the wrappers/ directory to your PATH and installs vpn_check as a command.
Wraps a CLI command so it checks VPN before running.
./new_wrapper.sh <command>
# e.g. ./new_wrapper.sh sshCreates wrappers/<command>. Any invocation of <command> will now fail if VPN is off.
./unset_wrapper.sh <command>
# e.g. ./unset_wrapper.sh sshRemoves wrappers/<command>, restoring the original.
The command-line wrapper only checks VPN at launch time. If VPN disconnects while the process is running, the process is not killed.
Wraps a macOS .app bundle. The real app is moved to ~/hidden_from_spotlight/ and a lightweight wrapper app is placed in ~/Applications/.
Warning: Please ensure the app's update mechanism is not affected by the script moving the real app to a different location.
./new_app_wrapper.sh /Applications/SomeApp.app- Moves the real app to
~/hidden_from_spotlight/SomeApp.app - Creates a wrapper at
~/Applications/SomeApp.app - The wrapper shows an alert and refuses to open if VPN is off
After running, follow the next steps the script prints.
./unset_app_wrapper.sh <AppName>
# e.g. ./unset_app_wrapper.sh SomeAppAfter unwrapping, remove the app from NordVPN's Kill Switch app list if it was added.
To see all currently wrapped apps:
ls ~/hidden_from_spotlight