187 字
1 分钟
常用代理配置
Windows CMD
set http_proxy=http://yourProxyServer:portset https_proxy=http://yourProxyServer:portLinux / Mac
# 设置代理export http_proxy=http://yourProxyServer:portexport https_proxy=http://yourProxyServer:port
# 取消代理unset http_proxyunset https_proxyGit
# 设置代理git config --global http.proxy http://yourProxyServer:port
# 查看代理git config --global --get http.proxy
# 删除代理git config --global --unset http.proxynpm
# 设置镜像npm config set registry https://registry.npm.taobao.org
# 设置代理npm config set proxy http://yourProxyServer:portnpm config set https-proxy http://yourProxyServer:port
# 取消代理npm config rm proxyyarn
yarn config set registry https://registry.npm.taobao.orgyarn config set proxy http://yourProxyServer:portnvm
nvm proxy "http://yourProxyServer:port"Bower (.bowerrc)
{ "directory": "bower_components", "proxy": "http://yourProxyServer:port/", "https-proxy": "http://yourProxyServer:port/"}Gradle (gradle.properties)
systemProp.http.proxyHost=yourProxyServersystemProp.http.proxyPort=yourPortsystemProp.https.proxyHost=yourProxyServersystemProp.https.proxyPort=yourPortPython pip
# 方式一:命令参数pip install yourPackage --proxy http://yourProxyServer:port
# 方式二:配置文件 pip.ini[install]proxy=http://yourProxyServer:portVSCode
"http.proxy": "http://yourProxyServer:port"Sublime
"http_proxy": "http://yourProxyServer:port","https_proxy": "http://yourProxyServer:port"wget
# 临时wget url -e http-proxy=yourProxyServer:port
http-proxy = yourProxyServer:portcurl
# 临时curl url -x yourProxyServer:port
# 永久:_curlrc (Windows) 或 .curlrc (Linux)proxy = yourProxyServer:portGolang go get
需设置系统变量 http_proxy 以及 Git 代理 git config --global http.proxy ...