电脑开了SS但是终端用不了,有时候想git东西比较缓慢,现在有了一个好的解决办法。

Cmder几种终端模式命令如下:

Mac快捷方法
修改vim ~/.bash_profile文件,添加如下代码

#proxy for shell
alias proxy='export all_proxy=socks5://127.0.0.1:1089'
alias unproxy='unset all_proxy'

CMD模式

set http_proxy=http://127.0.0.1:1080
set https_proxy=http://127.0.0.1:1080

Bash模式,同样适用Kali和Mac

export http_proxy=http://127.0.0.1:1080
export https_proxy=http://127.0.0.1:1080

Powershell模式

$env:http_proxy=http://127.0.0.1:1080
$env:https_proxy=http://127.0.0.1:1080