Last active
August 29, 2015 14:07
-
-
Save kgriffs/cc09b1db157a7f989154 to your computer and use it in GitHub Desktop.
Max OS X - Toggle SOCKS Proxy
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
#!/usr/bin/env bash | |
STATUS=`networksetup -getsocksfirewallproxy USB\ Ethernet | sed -n 1p` | |
if test "$STATUS" = "Enabled: No" | |
then | |
echo "Enabling..." | |
NEW_SETTING="on" | |
else | |
echo "Disabling..." | |
NEW_SETTING="off" | |
fi | |
`networksetup -setsocksfirewallproxystate USB\ Ethernet $NEW_SETTING` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment