Set http proxy in terminal on Mac

Sometimes we need a proxy to connect some website, but on Mac, if we start a proxy, the terminal might not use the proxy directly, here is…

Set http proxy in terminal on Mac

Sometimes we need a proxy to connect some website, but on Mac, if we start a proxy, the terminal might not use the proxy directly, here is how to set proxy in Terminal.

For example, the http proxy port is 8889, and socks port is 1089, then the command can be like below:

export http_proxy=http://127.0.0.1:8889 
export https_proxy=http://127.0.0.1:8889 
export ALL_PROXY=socks5://127.0.0.1:1089