Skip to content

Instantly share code, notes, and snippets.

@Ins1ne
Forked from jordelver/gist:3073101
Last active January 18, 2017 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ins1ne/893b87e40a84c53216d4ec4439e2a399 to your computer and use it in GitHub Desktop.
Save Ins1ne/893b87e40a84c53216d4ec4439e2a399 to your computer and use it in GitHub Desktop.
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Start SSH tunel

ssh -D 8888 -C -N user@example.com

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port

networksetup -setsocksfirewallproxy "Ethernet" "" ""

To turn the SOCKS proxy off

networksetup -setsocksfirewallproxystate "Ethernet" off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment