Standard module proxy
Speaks the GOPROXY protocol. Use it as the canonical proxy with ,direct as the safety fallback.
A GOPROXY-compatible module proxy for Go applications, APIs, CLIs, and CI runners.
Speaks the GOPROXY protocol. Use it as the canonical proxy with ,direct as the safety fallback.
Works with go get, go mod download, go install, and go build on any platform.
Configure once via GOPROXY and every Go command — local or pipeline — uses the mirror automatically.
export GOPROXY=https://mirror.kargadan.ir/repository/go-group/,direct
go mod download
go env -w GOPROXY=https://mirror.kargadan.ir/repository/go-group/,direct
go env -w GOSUMDB=off
# Verify
go env GOPROXY GOSUMDB
# ~/.bashrc · ~/.zshrc
export GOPROXY=https://mirror.kargadan.ir/repository/go-group/,direct
export GOSUMDB=off
# Optional: bypass the proxy for private modules
# export GOPRIVATE=github.com/myorg/*,gitlab.example.com/*
| Variable | Recommended value | Purpose |
|---|---|---|
GOPROXY |
https://mirror.kargadan.ir/repository/go-group/,direct |
Module proxy with VCS fallback |
GOSUMDB |
off |
Disable the checksum database (sum.golang.org is intermittently unreachable) |
GOPRIVATE |
github.com/myorg/* |
Private modules to bypass the proxy |
GOINSECURE |
mirror.kargadan.ir |
Allow plain HTTP (only when explicitly needed) |
go mod init myproject
go get github.com/gin-gonic/gin
go get github.com/spf13/cobra@latest
go get github.com/sirupsen/logrus@v1.9.3
go mod download
go mod tidy
go mod verify
go build -o myapp ./cmd/myapp
go run ./cmd/myapp
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
FROM golang:1.23-alpine AS builder
ENV GOPROXY=https://mirror.kargadan.ir/repository/go-group/,direct \
GOSUMDB=off \
CGO_ENABLED=0
WORKDIR /app
COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
COPY . .
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -ldflags="-s -w" -o /server ./cmd/server
FROM scratch
COPY --from=builder /server /server
ENTRYPOINT ["/server"]
name: Go Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
GOPROXY: https://mirror.kargadan.ir/repository/go-group/,direct
GOSUMDB: off
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- run: go mod download
- run: go build -v ./...
- run: go test -v ./...
variables:
GOPROXY: "https://mirror.kargadan.ir/repository/go-group/,direct"
GOSUMDB: "off"
build:
image: golang:1.23
script:
- go mod download
- go build -o app ./cmd/app
test:
image: golang:1.23
script:
- go test -v ./...
| Mirror type | Group Aggregated proxy |
| Upstream sources | Pardisco, Runflare, proxy.golang.org |
| Protocols | HTTPS · HTTP |
| Fallback | ,direct for VCS-direct download |
Always keep ,direct at the end of GOPROXY. If the mirror has not yet cached a freshly published module, Go will transparently fall back to the source repository.