Use proxy for CLI tools

Some, but not all, command line tools such as curl and homebrew support SOCKS5 proxy intrinsically.

You can set the environment variable ALL_PROXY in bash shell, type this:

export ALL_PROXY=socks5://

You can also put above line to the end of ~/.bash_profile file, so every time the opens, proxy setting will take effect automatically.