How to Point Go Modules at Chainsaw

Beginner 15 minutes Developers / DevOps Engineers Getting Started

Configure the Go module proxy (GOPROXY) to fetch modules through your Chainsaw instance.

Overview

Point Go modules at your Chainsaw instance by setting GOPROXY so every go get / go mod download routes through the firewall.

Replace chain305.com with your own Chainsaw deployment host and swap CLIENT_ID / CLIENT_SECRET for credentials issued from the Access page in the dashboard. The @default segment is the org slug — confirm yours under Settings → Organization → Slug. Legacy non-org-scoped URLs return HTTP 400 with error CHW-4314.

Prerequisites

  • A running Chainsaw instance (see Tutorial 01)
  • Client credentials (Client ID and Secret)
  • Go installed

Clear Local Caches (First-Time Setup)

go clean -modcache

Environment Variables

export GOPROXY=https://CLIENT_ID:CLIENT_SECRET@chain305.com/chainproxy/repository/@default/gomod/,direct
export GONOSUMCHECK=*

The trailing ,direct lets Go fall back to a direct fetch for modules the proxy does not serve.

Verify

Run a go build or go mod download in a module, then confirm with chainsaw doctor verify-hook and the Traffic page in the dashboard.

Next Steps