某些站点必须爬墙才能访问,但在mac上设置的全局代理,对终端又不起作用,终端需要单独设置代理。 在终端中执行:
export http_proxy=socks5://127.0.0.1:1080
export https_proxy=socks5://127.0.0.1:1080
如果是http的代理:
export http_proxy=http://127.0.0.1:1080/
export https_proxy=http://127.0.0.1:1080/
如果需要开机自动设置,把上面的代码加到~/.bash_profile里