Skip to content

Instantly share code, notes, and snippets.

@cristianobecker
Created May 2, 2015 18:12
Show Gist options
  • Save cristianobecker/0c8a271a66b495631821 to your computer and use it in GitHub Desktop.
Save cristianobecker/0c8a271a66b495631821 to your computer and use it in GitHub Desktop.
Use SSH Tunnel as a SOCKS proxy on MacOS
my-proxy() {
sudo networksetup -setsocksfirewallproxystate Wi-Fi on
sudo networksetup -setsocksfirewallproxy Wi-Fi localhost 8001
ssh cbecker -C -N -D 8001 # change your ssh info here
sudo networksetup -setsocksfirewallproxystate Wi-Fi off
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment