Skip to content

cmd/go: GOPROXY=off results in no module being downloaded #71126

Closed as not planned
@3052

Description

@3052

Go version

go version go1.23.0 windows/amd64

Output of go env in your module/workspace:

set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Steven\AppData\Local\go-build
set GOENV=C:\Users\Steven\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Steven\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Steven\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=D:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=D:\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.23.0
set GODEBUG=
set GOTELEMETRY=off
set GOTELEMETRYDIR=C:\Users\Steven\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=D:\Desktop\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Windows\TEMP\go-build607440740=/tmp/go-build -gno-record-gcc-switches

What did you do?

$env:GOPROXY = 'off'
go mod init hello
go get 41.neocities.org/[email protected]

What did you see happen?

go: downloading 41.neocities.org/widevine v1.5.8
go: 41.neocities.org/[email protected]: module lookup disabled by GOPROXY=off

What did you expect to see?

note if I use direct it fails as well:

> $env:GOPROXY = 'direct'
> go get 41.neocities.org/[email protected]
go: downloading 41.neocities.org/widevine v1.5.8
go: 41.neocities.org/[email protected]: verifying module:
41.neocities.org/[email protected]: reading
https://sum.golang.org/lookup/41.neocities.org/[email protected]: 404 Not Found

server response: not found: 41.neocities.org/[email protected]: unrecognized
import path "41.neocities.org/widevine": https fetch: Get
"https://41.neocities.org/widevine?go-get=1": net/http: TLS handshake timeout

note the module is definitely reachable:

> curl -I -L -w 'time_total = %{time_total}' https://41.neocities.org/widevine?go-get=1
HTTP/2 301
date: Sat, 04 Jan 2025 16:48:46 GMT
content-type: text/html
content-length: 162
location: https://41.neocities.org/widevine/?go-get=1
server: neocities
strict-transport-security: max-age=31536000; includeSubDomains; preload
content-security-policy: upgrade-insecure-requests; default-src * 'unsafe-inline' 'unsafe-eval' data: blob:; connect-src 'self' data: blob:; form-action 'self'; img-src * data:; script-src * 'unsafe-inline' 'unsafe-eval'; style-src * 'unsafe-inline'; font-src * data:; object-src *; media-src *; frame-src *;
x-neocities-cdn: cdn-sea-1
upgrade-insecure-requests: 1
x-cached: MISS

HTTP/2 200
date: Sat, 04 Jan 2025 16:48:46 GMT
content-type: text/html
content-length: 15137
vary: Accept-Encoding
last-modified: Sat, 04 Jan 2025 15:38:35 GMT
etag: "677955fb-3b21"
server: neocities
strict-transport-security: max-age=31536000; includeSubDomains; preload
content-security-policy: upgrade-insecure-requests; default-src * 'unsafe-inline' 'unsafe-eval' data: blob:; connect-src 'self' data: blob:; form-action 'self'; img-src * data:; script-src * 'unsafe-inline' 'unsafe-eval'; style-src * 'unsafe-inline'; font-src * data:; object-src *; media-src *; frame-src *;
x-neocities-cdn: cdn-sea-1
upgrade-insecure-requests: 1
x-cached: HIT
accept-ranges: bytes

time_total = 0.723891

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions