Skip to content

Instantly share code, notes, and snippets.

@liubin
Forked from jordelver/gist:3073101
Last active January 15, 2021 16:51
Show Gist options
  • Save liubin/7db1f942753f40e510674c0b997e950f to your computer and use it in GitHub Desktop.
Save liubin/7db1f942753f40e510674c0b997e950f 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 :(

Get devices list

networksetup -listnetworkserviceorder

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Wi-Fi" localhost 8080

To clear the domain and port

networksetup -setsocksfirewallproxy "Wi-Fi" "" ""

To turn the SOCKS proxy off

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