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://127.0.0.1:7070
You can also put above line to the end of ~/.bash_profile
file, so every time the Terminal.app opens, proxy setting will take effect automatically.