Created
July 22, 2013 05:27
-
-
Save Leask/6051470 to your computer and use it in GitHub Desktop.
toggle your Mac's proxy status
This file contains hidden or 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/sh | |
| # Proxy Switch by LeaskH.com | |
| if [ "`echo 'PUT YOUR PASSWORD HERE' | sudo -S networksetup -getsocksfirewallproxy Wi-Fi | grep '^Enabled'`" = 'Enabled: Yes' ]; then | |
| sudo networksetup -setsocksfirewallproxystate Wi-Fi off | |
| echo 'Turned off!' | |
| else | |
| sudo networksetup -setsocksfirewallproxystate Wi-Fi on | |
| echo 'Turned on!' | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment