GOPROXY="https://proxy.golang.org,direct" behaviour

513 views
Skip to first unread message

Lei Ni

unread,
Jul 5, 2019, 2:34:59 AM7/5/19
to golang-nuts
Hi all,

I am a little bit confused at what is the expected behaviour for GOPROXY="https://proxy.golang.org,direct". 

On my system when using Go 1.13 beta 1, go env reports that GOPROXY="https://proxy.golang.org,direct". When `go build .` tries to access a package hosted on github.com, proxy.golang.org gets involved as the proxy. Thanks to the GFW in China, proxy.golang.org is not accessible from my machine and I ended up with a timeout error. My question is what does that "direct" mean in the GOPROXY setting? I was assuming that direct access to where the package is hosted is going to be tried once the specified proxy is not accessible, but it seems to me that it doesn't work in that way. 

`go help goproxy` doesn't really help on my question above, can someone here kindly shed some light on the expected GOPROXY="https://proxy.golang.org,direct" behaviour?  



Cheers,


Lei




sulinehk

unread,
Jul 8, 2019, 10:45:04 AM7/8/19
to golang-nuts
GOPROXY=https://goproxy.io is work for me.

在 2019年7月5日星期五 UTC+8下午2:34:59,Lei Ni写道:
Reply all
Reply to author
Forward
0 new messages