GOPROXY selects a Go module download service. HTTP_PROXY and HTTPS_PROXY select a network intermediary used to reach a destination. A generic HTTP proxy does not normally implement the module service's metadata and file API.

Module-source policy

go env GOPROXY GOPRIVATE GONOPROXY

These values describe where Go obtains modules. GONOPROXY selects module paths that bypass the module service. Likewise, GOPROXY=direct requests version-control access for modules; it does not disable HTTP proxy variables for every connection.

The network route

A POSIX-shell invocation can supply a forward proxy independently of the module source:

HTTPS_PROXY=http://203.0.113.10:8080 go mod download

Replace the documentation endpoint and keep the intended GOPROXY value. For public module downloads permitted to use public HTTP proxies, choose a candidate from the HTTP proxy list. Use NO_PROXY for HTTP transport destinations that should remain direct.

Depending on module policy, downloads may contact a module service, checksum service, artifact host, or version-control server. When a request fails, identify both the source Go selected and the route used to reach that particular host. The go env query alone does not show every proxy environment variable or prove which connection a download opened.

Mikanda mikatakata