This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Toggle GlobalProtect VPN with AppleScript and automatically close the landing page in Chrome | |
# Adapted from Trevor Manternach https://gist.github.com/tmanternach/cbd4c213eab8569e38d6cd021b6255e5 | |
# Tested using macOS Sonoma 14.4 and GlobalProtect version 5.2 | |
# Use sleepwatcher `brew install sleepwatcher` and configure a bash script in `~/.wakeup` to run this script. | |
# Make sure to provide accessibility permissions to the sleepwatcher binary for the applescript to work. | |
# Update the GP_URL if your GlobalProtect's landing page has a different URL or make it more specific |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am zxlin on github. | |
* I am zxlin (https://keybase.io/zxlin) on keybase. | |
* I have a public key ASAa5_H6negJaaSXTVemcTXZwTxs2jmHyJCCrZTM0jz_Zgo | |
To claim this, I am signing this object: |