在开发中使用代理

python

Windows:

1
2
3
set http_proxy=http://proxy.myproxy.com
set https_proxy=https://proxy.myproxy.com
python main.py

Linux/OS X:

1
2
3
export http_proxy=http://proxy.myproxy.com
export https_proxy=https://proxy.myproxy.com
python main.py

git

1
git config --global http.proxy http://proxyuser:[email protected]:8080

如果要取消代理,消除http.proxy配置项就好

1
git config --global --unset http.proxy

node

1
2
npm config set proxy http://LanguidSquid:[email protected]:8080
npm config set https-proxy http://LanguidSquid:[email protected]:8080

取消代理

1
2
npm config delete http-proxy
npm config delete https-proxy