Skip to content

Instantly share code, notes, and snippets.

@timwis
Last active September 20, 2016 15:17
Show Gist options
  • Save timwis/9981a65beb2c7b4325177cb396057233 to your computer and use it in GitHub Desktop.
Save timwis/9981a65beb2c7b4325177cb396057233 to your computer and use it in GitHub Desktop.
Toggle proxy script for OSX
#######################
# Toggle Proxy
# Usage:
# sudo ./proxy.sh on
# sudo ./proxy.sh off
#######################
NETWORK_SERVICE=Wi-Fi # The name of the device in "Network Settings" left-hand panel
networksetup -setwebproxystate $NETWORK_SERVICE $1
networksetup -setsecurewebproxystate $NETWORK_SERVICE $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment