3

Golang设置国内代理

 3 years ago
source link: https://studygolang.com/articles/25267?fr=sidebar
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Golang设置国内代理

李小西033 · 2019-12-11 06:32:39 · 26714 次点击 · 预计阅读时间不到 1 分钟 · 大约8小时之前 开始浏览    
这是一个创建于 2019-12-11 06:32:39 的文章,其中的信息可能已经有所发展或是发生改变。

Golang V1.13之后支持通过设置变量GOPROXY来修改代理地址,默认的代理服务器
https://proxy.golang.org在国内访问经常出现timeout

5a5f34befc1d73c082b58d767f3c78a2.png
image.png
可以通过设置国内代理来加速下载
详见:https://github.com/goproxy/goproxy.cn/blob/master/README.zh-CN.md
在终端执行即可
go env -w GOPROXY=https://goproxy.cn,direct
dd53effe1a73bc209564253f05476f04.png
image.png

有疑问加站长微信联系(非本文作者)

280

本文来自:简书

感谢作者:李小西033

查看原文:Golang设置国内代理

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:701969077


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK