首页 » Network » Network-else » 正文

linux/windows命令行设置代理

Windows

set http_proxy=http://127.0.0.1:8888

set https_proxy=http://127.0.0.1:8888

 

set http_proxy_user=test

set http_proxy_pass=123456

 

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

 

http_proxy=http://userName:password@proxyAddress:port

=空就是取消

 

Linux

$ export http_proxy=http://127.0.0.1:8888
$ export https_proxy=http://127.0.0.1:8888

 

$ export http_proxy=socks5://127.0.0.1:1080
$ export https_proxy=socks5://127.0.0.1:1080

 

$ export ALL_PROXY=socks5://127.0.0.1:1080

 

$ unset http_proxy
$ unset https_proxy
$ unset ALL_RPOXY

 

proxychain

 

GIT

git config –global http.proxy http://127.0.0.1:8888
git config –global https.proxy http://127.0.0.1:8888

 

git config –global http.proxy socks5://127.0.0.1:1080
git config –global https.proxy socks5://127.0.0.1:1080

 

git config –global –unset http.proxy
git config –global –unset https.proxy

 

参考资料

https://blog.fazero.me/2015/09/15/让终端走代理的几种方法/

 

Comment

please input captcha *