Sunday, June 14, 2015

Quickly Turns On/Off SOCKS Proxy for MacOS X

#!/bin/bash

case "$1" in
  'on'|'off')
    networksetup -setsocksfirewallproxystate Wi-Fi $1
    networksetup -setsocksfirewallproxystate Ethernet $1
    ;;
  *)
    echo "Usage: sudo $0 on|off"
    exit
    ;;
esac

networksetup -getsocksfirewallproxy Wi-Fi
networksetup -getsocksfirewallproxy Ethernet

1 comment:

JmK said...

I thought you may get a kick out of this. I found you through oocities at siliconvalley 9166. Don't know if you will see this,as it has been two years since your last blog entry but I thought it was cool to see a link off cached geocities sites that worked.