golang 设置代理

go env -w GOPROXY=https://goproxy.cn,direct
  • 阿里云
    配置如下:
export GOPROXY=https://mirrors.aliyun.com/goproxy/
  • nexus社区提供的
    配置如下:
export GOPROXY=https://gonexus.dev
  • goproxy.io 的
    配置如下:
export GOPROXY=https://goproxy.io/
  • 基于athens的公共服务
    配置如下:
export GOPROXY=https://athens.azurefd.net

  • 官方提供的(jfrog,golang)
export GOPROXY=https://gocenter.io
export GOPROXY=https://proxy.golang.org

  • 七牛云赞助支持的
export GOPROXY=https://goproxy.cn
原文地址:https://www.cnblogs.com/feiquan/p/13357971.html