Documentation
¶
Overview ¶
Package gomodproxy serves the Go module proxy protocol on loopback so the Dependency Firewall can check module zips without a MITM certificate: go and git on macOS trust only the system store, and installing the firewall's CA there needs sudo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend serves allowed module proxy requests through goproxy and owns the temp tree goproxy fetches into.
func NewBackend ¶
func NewBackend(goBin string, proxiedSumDBs []string, envOverrides map[string]string) (*Backend, error)
NewBackend builds a goproxy handler that shells out to goBin for direct fetches. proxiedSumDBs names the checksum databases served under /sumdb/. envOverrides replaces the fetcher environment's value for each key it sets, except the isolation pins, which always win.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves the Go module proxy protocol on loopback and gates module zip downloads against the Dependency Firewall.
The backend's fetcher carries the user's version-control credentials, so only a client that knows the per-run path token and addresses the listener by its own address reaches it: that excludes other local processes and DNS-rebinding web pages.
func (*Server) BaseURL ¶
BaseURL is the value to hand the child as GOPROXY. It is empty before Start.
func (*Server) CheckedZips ¶
CheckedZips reports how many module zips got a policy decision.