Add Go module proxy support - #2
Merged
Merged
Conversation
timReynolds
marked this pull request as ready for review
May 18, 2026 19:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds first-class Go module proxy support so Vouch can sit in front of
https://proxy.golang.orgusing the standard GOPROXY URL space.The new
goecosystem adapter understands the official module proxy endpoints:/{module}/@v/list/{module}/@v/{version}.info/{module}/@v/{version}.mod/{module}/@v/{version}.zip/{module}/@latestIt uses
golang.org/x/mod/modulefor Go's case-encoded module and version path elements, and uses the.infotimestamp as the publish time sidecar for cooldown checks on.zipdownloads.Why
Vouch did not previously have a tracked Go ecosystem adapter, so enabling a
goecosystem in config failed at adapter registration. This aligns Vouch with the protocol exposed byproxy.golang.organd lets operators configure clients with, for example:Notes
Go proxy responses do not expose a registry-provided artifact digest in the proxy protocol itself. The default policy now treats Go blobs as a protocol-specific exception for Vouch's registry-hash requirement, while still applying cooldown based on
.infopublish time. This leaves checksum validation to the Go toolchain and its checksum database behavior.Blob cache writes are also guarded so artifacts without a native registry digest are served but not inserted into the digest-indexed blob cache.
Included Changes
internal/ecosystem/gomodadapter and tests.goecosystem adapter in the server.gowith upstreamhttps://proxy.golang.org/and path prefix/go/..zipcooldown behavior without registry hash metadata.Validation
go test ./...