Goproxy China - The most trusted Go module proxy in China

Note that Goproxy China has been completely handed over to China’s well-trusted cloud service provider Qiniu Cloud today, it’s now a business-supported project rather than a personal project, and it has been CDNed.

If you live in China or travel to China, then we hope that you’ll think of the goproxy.cn in the first place. :slight_smile:

By the way, the goproxy.cn supports proxying checksum databases (sum.golang.org). So don’t worry, you are safe.

2 Likes

我是小白。不是很懂。有简单的教程吗? github的用法看了。不过没有实例或者案例简单说明过程和效果。。。。所以不怎么懂操作啊。

2 Likes

@mytea003

你好,请问你现在用的 Go 版本是多少呀?

如果是 Go 1.13 的话设置起来很容易:

$ go env -w GO111MODULE=on
$ go env -w GOPROXY=https://goproxy.cn,direct # 注意,这里的 ",direct" 只能在 Go 1.13 使用,之前的版本无法识别

执行完这两条命令后 Go 就可以在使用 Modules 时自动使用模块代理了。

如果你是 Go 1.13 以下的版本,那么你只能通过手动设置环境变量的方法来使用了,设置方法参考 README(简体中文)就好。

所谓的“模块代理”就是指配合着 Go 1.11 一起发布的一个类似“依赖镜像”的机制,这个机制可以加快 Go 语言的依赖拉取速度,同时还可以解决诸如 GFW 把 golang.org/x/... 这些包屏蔽了的问题。通过使用模块代理,你以后就不用再在拉取依赖时设置其他的比如 VPN 之类的代理工具了。

还有什么不懂的可以随时提问!:blush:

2 Likes

我的版本是:go version go1.12.5 windows/amd64

但是我看了官网,最新版本的也就是:Microsoft Windows
Windows 7 or later, Intel 64-bit processor
go1.12.9.windows-amd64.msi (118MB)

13还是不稳定版本。。。暂时没用上。

2 Likes

Guys, with all respect for your language be kind and use English because this is an international forum and is appropriate to let others interested to follow your conversation without translate every post.

Thanks.

4 Likes

My apologies. And the next time I’ll reply in English, no matter what language the other party is. :smile:

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.