Welcome to AWSVPNKiller, the solution to avoid the annoying browser tabs open that AWS VPN Client creates during your MacBook's sleep and wake cycles.
π Features π
- Kills the "AWS VPN Client" when your MacBook goes to sleep.
- Optionally restarts the "AWS VPN Client" when your MacBook wakes up.
π οΈ Installation Instructions π οΈ
- Clone the Repository
git clone https://github.com/sennav/AWSVPNKiller.git
cd AWSVPNKiller- Compile the Code
swiftc -o AWSVPNKiller AWSVPNKiller.swift- Run the Code to test
./AWSVPNKillerCtrl+c to kill it.
π‘ To Restart or Not to Restart? π‘
This repo is set to not restart the AWS VPN Client by default. To change this behavior, uncomment the restartAWSVPNClient() call in AWSVPNKiller.swift:
@objc func handleWakeNotification(notification: NSNotification) {
print("System woke up")
// restartAWSVPNKiller() // Uncomment this line to restart the VPN
}π Add to Launch Agents π
To run AWSVPNKiller in the background and have it start automatically:
- Copy the Launch Agent plist File
cp org.sanity.AWSVPNKiller.plist ~/Library/LaunchAgents/
# Or create a symlink- Load the Launch Agent
launchctl load ~/Library/LaunchAgents/org.sanity.AWSVPNKiller.plist- Verify that the Launch Agent is Running
launchctl list | grep AWSVPNKillerThank you for using AWSVPNKiller! Enjoy your VPN-free naps and worry-free tab-less wake-ups. π€
