a.k.a. what to do when your ISP starts blocking sites :(
1 ssh to remote server as a SOCKS server
ssh -D 6080 {user}@{ssh_server} -p {ssh_port}
2 Get current using device
~$ networksetup -listnetworkserviceorder
An asterisk (*) denotes that a network service is disabled.
(1) Wi-Fi
(Hardware Port: Wi-Fi, Device: en0)
(2) iPhone USB
(Hardware Port: iPhone USB, Device: en4)
(3) Bluetooth PAN
(Hardware Port: Bluetooth PAN, Device: en3)
(4) Thunderbolt Bridge
(Hardware Port: Thunderbolt Bridge, Device: bridge0)
In my situation, "Wi-Fi" is the device I am using.
3 Set the SOCKS proxy to local SSH tunnel
networksetup -setsocksfirewallproxy "Wi-Fi" localhost 6080
Then enjoy visiting those sites by safari now!
To clear the domain and port
networksetup -setsocksfirewallproxy "Ethernet" "" ""
To turn the SOCKS proxy off
networksetup -setsocksfirewallproxystate "Ethernet" off