Created
January 4, 2013 16:16
-
-
Save johnagan/4453805 to your computer and use it in GitHub Desktop.
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 | |
disable_proxy() | |
{ | |
networksetup -setsocksfirewallproxystate Wi-Fi off | |
networksetup -setsocksfirewallproxystate Ethernet off | |
echo "SOCKS proxy disabled." | |
} | |
trap disable_proxy INT | |
networksetup -setsocksfirewallproxy Wi-Fi 127.0.0.1 9999 | |
networksetup -setsocksfirewallproxy Ethernet 127.0.0.1 9999 | |
networksetup -setsocksfirewallproxystate Wi-Fi on | |
networksetup -setsocksfirewallproxystate Ethernet on | |
echo "SOCKS proxy enabled." | |
echo "Tunneling..." | |
ssh -ND 9999 your.proxy.server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment