Skip to the content.

Backends: what the proxy does for each ecosystem

This is the operator’s and the reviewer’s side of the client guide: for every upstream type, which requests the proxy serves, what it rewrites, what it verifies before it caches or serves a byte, and what it leaves alone. How to point a package manager at each of them is in the per-ecosystem pages under clients/.

Each section is named after the upstream type. The examples use the upstream names of configs/config.example.yaml; an upstream is served under /v1/<name>/.

npm

Client configuration: clients/npm.md.

registry.npmjs.org proxied under /v1/npm. Packuments are revalidated; tarballs (.../-/...tgz) are cached immutably and their dist.tarball URLs are rewritten through the proxy.

upstreams:
  npm:
    type: npm
    url: https://registry.npmjs.org

The audit endpoints (POST /-/npm/v1/security/…) and every other write are not served: the pull-through core answers GET and HEAD only. A second registry — a private one, or JSR’s npm-compatible https://npm.jsr.io — is another upstream of type npm, which clients select per scope.

pip

Client configuration: clients/pip.md.

PyPI’s Simple API proxied under /v1/pypi. The proxy serves the Simple index at /simple/ and rewrites distribution file links (which normally point at files.pythonhosted.org) to a cached /files/<scheme>/<host>/... route. Only artifact hosts on the allowlist (settings.fileHosts, default files.pythonhosted.org) are fetched.

upstreams:
  pypi:
    type: pip
    url: https://pypi.org

cargo

Client configuration: clients/cargo.md.

The crates.io sparse index proxied under /v1/crates. The proxy serves config.json (rewriting its dl field to a cached download endpoint), the sparse index files, and .crate downloads.

upstreams:
  crates:
    type: cargo
    url: https://index.crates.io

The served config.json does not declare "auth-required", so cargo sends no token with crate downloads: with access control on, the cargo upstream has to be readable without one (see clients/cargo.md).

go

Client configuration: clients/go.md.

proxy.golang.org proxied under /v1/goproxy. The GOPROXY protocol is fully path-relative, so no URL rewriting is needed.

Checksum database. The go command verifies every module against sum.golang.org and, by default, contacts it directly — which fails for a client that can reach only the proxy. The proxy therefore serves the database itself under /v1/goproxy/sumdb/<name>/ (the GOPROXY protocol’s checksum-database proxying); the go command discovers this on its own and routes its lookups through the proxy. Every response is signed by the database and verified with the key built into the go command, so verification stays fully intact and no trust is placed in the proxy. The sumdb upstream setting names the databases to proxy (default sum.golang.org; off disables it).

For private modules that are not in the public checksum database, set GONOSUMDB/GOPRIVATE for those paths as usual.

upstreams:
  goproxy:
    type: go
    url: https://proxy.golang.org

nuget

Client configuration: clients/nuget.md.

api.nuget.org proxied under /v1/nuget. The v3 service index and registration documents are rewritten so same-host resources (flat container, registration) route through the proxy; .nupkg packages are cached immutably. Cross-host services such as search are left pointing upstream.

upstreams:
  nuget:
    type: nuget
    url: https://api.nuget.org

maven

Client configuration: clients/maven.md.

A Maven upstream (type: maven, e.g. Maven Central’s maven2 root) is proxied under /v1/maven using the standard GAV repository layout. Artifacts (.jar/.pom/.module/.war) and their .sha1/.sha256/.md5/.asc sidecars are cached immutably for release versions and resolved/timestamped snapshots; maven-metadata.xml (release version lists and snapshot resolution) is revalidated each request. Before an artifact is cached it is verified against the strongest checksum sidecar the upstream publishes (SHA-256 ≫ SHA-1 ≫ MD5); a mismatch is refused so a tampered mirror cannot poison the cache. The POM is parsed to feed the artifact’s groupId:artifactId coordinate, packaging, and declared licenses into the admission gates.

For an authenticated private repository, set credentials on the upstream in the proxy config; the proxy injects them on the outbound fetch so clients need no upstream credentials of their own.

upstreams:
  maven:
    type: maven
    url: https://repo1.maven.org/maven2

rubygems

Client configuration: clients/rubygems.md.

A RubyGems upstream (type: rubygems, e.g. https://rubygems.org) is proxied under /v1/rubygems. The backend serves the modern compact index Bundler uses — /versions, /names, and per-gem /info/<gem> — plus .gem fetches (/gems/<name>-<version>.gem), the legacy Marshal gemspecs (/quick/Marshal.4.8/...), the Marshal spec indexes (/specs.4.8.gz and friends), and the dependency API (/api/v1/dependencies). Index documents are mutable and revalidated each request; .gem files and per-version gemspecs are cached immutably. Before a .gem is cached it is verified against the SHA-256 checksum the gem’s /info/<gem> document declares for that version (including platform-specific gems such as nokogiri-1.13.0-x86_64-linux.gem); a mismatch is refused so a tampered mirror cannot poison the cache. The gem name feeds the admission gates (vulnerability scanning maps it to the OSV RubyGems ecosystem).

upstreams:
  rubygems:
    type: rubygems
    url: https://rubygems.org

composer

Client configuration: clients/composer.md.

A Composer upstream (type: composer, e.g. https://repo.packagist.org) is proxied under /v1/packagist. The backend speaks the Composer 2 repository protocol: the repository root (packages.json), the v2 metadata layout (/p2/<vendor>/<package>.json and its ~dev sibling), and dist archive downloads.

A Composer client follows whatever URLs the repository hands it: the root names the URL templates for every later lookup, and each version in the metadata names the URL its archive is downloaded from. The proxy therefore rewrites both documents on the way out, so a client configured with only the proxy repository keeps every metadata and dist request on the proxy and never contacts Packagist or GitHub itself.

Set server.publicUrl so the rewritten URLs are absolute. Without it they are root-relative (/v1/<name>/...). Composer resolves a root-relative URL in packages.json but not in a dist.url, so in that case the proxy also advertises its dist endpoint as a preferred dist mirror, which Composer does resolve; installs stay on the proxy either way (the lock file then records the root-relative dist.url together with that mirror).

upstreams:
  packagist:
    type: composer
    url: https://repo.packagist.org

Composer — make the proxy the project’s only repository in composer.json. Adding it is not enough: unless the default repository is disabled with "packagist.org": false, Composer still resolves and downloads from packagist.org directly.

A proxy reached over plain http:// additionally needs "config": { "secure-http": false }.

Things to know:

helm

Client configuration: clients/helm.md.

Helm has two transports, and the proxy covers both with a single type: helm backend selected by the optional settings.oci flag.

Classic chart repositories (helm repo add)

A classic Helm upstream (type: helm, e.g. https://charts.bitnami.com/bitnami) is proxied under /v1/<name>; point url at the repository root that serves index.yaml.

Chart downloads always come back through the proxy. A repository’s index.yaml tells Helm where each chart archive lives, and real repositories publish absolute URLs there — often on a different host than the index (a GitHub Pages index listing release assets) or as oci:// references into a registry (Bitnami). Served as-is, such an index would send Helm straight to the upstream for the archive, past the cache and every gate. So the backend serves index.yaml live (revalidated against the upstream on every request) with each entry’s urls replaced, and nothing else changed, by

<server.publicUrl>/v1/<name>/-/<chart>/<version>/<file>

When server.publicUrl is not set the links are written relative to the repository instead (-/<chart>/<version>/<file>); Helm resolves those against the URL the repository was added under, so they reach the proxy either way.

Such a URL names an index entry rather than a location. On a request the backend looks the chart name and version up in the upstream index and fetches the location recorded there — on the upstream’s host, on another host, or as the chart layer of an OCI artifact — so anything the index does not list for that chart version is a 404 and the proxy cannot be pointed at an arbitrary URL. The fetch goes through the egress guard like any other (with an egress allowlist, include the hosts the repository keeps its archives on); upstream credentials are sent only to the upstream’s own host. The archive is verified against the SHA-256 digest the index publishes for it before the bytes are cached or served — a mismatch is refused — and the chart name + version coordinate feeds the admission gates (vulnerability scanning of the images a chart references, signature verification, risk scoring, policy). A repeat pull is served from the cache. Chart provenance is served the same way, at the archive URL plus .prov. A chart requested by its repository-relative path (/v1/<name>/<name>-<version>.tgz) keeps working: it is fetched from that path under the upstream and verified the same way.

Because the rewrite has to be airtight, an index the backend cannot fully account for is refused (502, reason in the proxy log) rather than passed through: one it cannot parse, or one that uses a YAML alias, merge key or tag to declare download locations (no index generator does). The upstream index is parsed once per change, not per request — the parsed index and the rewritten document are held in memory per upstream (about the size of the index, capped at 128 MiB) and revalidated with a conditional request — so only the first request after a change pays for the parse (roughly a second for a 25 MiB index).

OCI-registry-hosted charts (helm pull oci://)

Set settings.oci: "true" to serve charts pushed to an OCI registry. The backend reuses the Docker Registry v2 plumbing (token handshake, digest-addressed caching, content-digest verification):

upstreams:
  helm-oci:
    type: helm
    url: https://ghcr.io
    settings:
      oci: "true"

Like a docker upstream, an OCI chart upstream is served at the proxy’s host root, under its name: oci://proxy.example.com/helm-oci/<repository> (see docker for the routing rules).

apt

Client configuration: clients/apt.md.

An APT upstream (type: apt, e.g. https://deb.debian.org/debian or http://archive.ubuntu.com/ubuntu) is proxied under /v1/<name>. The backend serves the dists/<suite>/{InRelease,Release} trust anchor and the Packages[.gz] indices live (they are mutable), and on a pool .deb cache miss it verifies the package against the SHA-256 the chain of Release → Packages declares before the bytes are cached or served; a mismatch is refused. The package name + version coordinate feeds the admission gates (vulnerability scanning maps it to the OSV Debian/Ubuntu ecosystems).

upstreams:
  debian:
    type: apt
    url: https://deb.debian.org/debian
    # Optional: validate the Release (InRelease / Release.gpg) signature against a
    # pinned key. With no key, integrity rests on the SHA-256 content chain.
    settings:
      gpgKeyFile: /etc/pullthrough/keys/debian-archive.asc

When a trusted keyring is configured (settings.gpgKey inline, or settings.gpgKeyFile by path), a served InRelease/Release whose signature fails to validate against that key is refused, anchoring the whole digest chain.

yum

Client configuration: clients/yum.md.

A YUM upstream (type: yum, e.g. a Fedora/EPEL/CentOS-Stream repository base — the directory that contains repodata/) is proxied under /v1/<name>. The backend serves repodata/repomd.xml and the primary.xml.gz package list live (they are mutable), and on an .rpm cache miss it verifies the package against the checksum the chain of repomd.xml → primary.xml declares before the bytes are cached or served; a mismatch is refused. The package name + version coordinate feeds the admission gates.

upstreams:
  fedora:
    type: yum
    url: https://dl.fedoraproject.org/pub/fedora/linux/releases/40/Everything/x86_64/os
    # Optional: validate the repomd.xml (repomd.xml.asc) signature against a key.
    settings:
      gpgKeyFile: /etc/pullthrough/keys/fedora.asc

As with APT, a configured keyring turns a bad repomd.xml signature into a hard failure at the proxy boundary; otherwise integrity rests on the checksum chain.

docker

Client configuration: clients/docker.md.

A Docker upstream (type: docker) proxies a Registry v2 / OCI distribution endpoint. With

upstreams:
  dockerhub:
    type: docker
    url: https://registry-1.docker.io

the backend is mounted under /v1/dockerhub/, where it serves the read endpoints of the v2 API (/v2/, /v2/<name>/manifests/<ref>, /v2/<name>/blobs/<digest>, /v2/<name>/referrers/<digest>, /v2/<name>/tags/list, /v2/_catalog). Blobs and manifests requested by digest are cached immutably and digest-verified; manifests by tag are revalidated live. Any other path under /v2/ is refused with 501: the proxy logs in to the upstream itself, so a registry-hosted token endpoint (/v2/token, /v2/auth) is never forwarded — it would hand the client a token for the proxy’s account.

Container clients — the Docker Engine, containerd, podman, skopeo, the Helm OCI client — always insert /v2/ immediately after the registry host, so none of them can address the path-prefixed mount (docker pull host/v1/dockerhub/... does not work). The proxy therefore also serves the Registry v2 API at its host root (/v2/..., see server.registry), mapping each request onto the upstream’s /v1/<name>/v2/... mount — through the same access control and admission gates as any other pull. No reverse proxy is needed in front.

Routing rules at /v2/

  1. A request carrying ?ns=<registry host> is served by the upstream fronting that registry. This is what containerd sends for a mirror configured in a hosts.toml: /v2/myorg/myimage/manifests/1.2.3?ns=ghcr.io is served by the upstream whose url is https://ghcr.io; ns=docker.io selects the upstream for registry-1.docker.io.
  2. Otherwise, if the repository’s first path component is the name of a registry upstream, that upstream serves the rest (/v2/<upstream>/<repository>/...): /v2/dockerhub/library/nginx/... is served by the dockerhub upstream as repository library/nginx. This is the explicit reference (proxy.example.com/dockerhub/library/nginx), and the form a registries.conf mirror location with a path produces.
  3. Otherwise server.registry.defaultUpstream serves it; without one the request is refused with a registry error naming the configured upstreams. This is registry-mirror mode: the Docker Engine rejects a mirror URL that carries a path, so its mirror is the proxy’s host root, and the operator names the upstream that answers un-prefixed repositories:
server:
  registry:
    defaultUpstream: dockerhub

Avoid naming a registry upstream after a namespace you also mirror (an upstream called library would shadow Docker Hub’s library/... repositories in rule 2). Set server.registry.enabled: false to serve registries only under /v1/<name>/v2/.

Mirrors are fail-open. When a mirror refuses a pull (for example because the proxy’s admission policy blocked the image), the Docker Engine — and containerd, and the registries.conf clients — fall back to the registry itself. Mirror mode enforces admission only where direct egress to the registry is blocked; an explicit reference is fail-closed by construction.

Private upstreams authenticate with credentials configured on the upstream; clients never send registry credentials to the proxy for the pull itself (proxy access control, if enabled, is separate — see access-control-and-audit.md). A 401 from the proxy carries the challenge Bearer realm="pullthrough", which the Docker Engine and the registries.conf clients cannot answer; containerd can send the token as a configured header (see clients/docker.md).

terraform

Client configuration: clients/terraform.md.

A Terraform/OpenTofu upstream (type: terraform, e.g. https://registry.terraform.io or https://registry.opentofu.org) is proxied under /v1/<name>. The backend serves a synthesized service-discovery document and covers both registry protocols:

server:
  # Recommended: set publicUrl so rewritten provider/module artifact URLs are
  # absolute. Without it the proxy passes upstream artifact URLs through
  # unmodified (no caching/verification of those artifacts).
  publicUrl: https://proxy.example.com
upstreams:
  terraform:
    type: terraform
    url: https://registry.terraform.io

Because the proxy verifies the SHASUMS signature itself and re-serves the manifest and .sig, the client’s own checksum and signature verification continues to work end-to-end through the proxy.

The artifact URLs in a provider descriptor are fetched by the client without the credentials it sends to the registry API. With access control on, the Terraform upstream therefore has to be readable without a token for providers to install (see clients/terraform.md).

conan

Client configuration: clients/conan.md.

A Conan upstream (type: conan, e.g. https://center2.conan.io) is proxied under /v1/<name>. The backend speaks the Conan 2.x revisions REST API (the /v2/... endpoints that JFrog Artifactory, ConanCenter, and the reference conan_server expose), plus the one legacy route a Conan 2.x client still sends: the capability probe GET /v1/ping. The client reads the X-Conan-Server-Capabilities response header of that probe before any /v2 call and will not use a remote that does not advertise revisions, so the header is relayed from the upstream. The rest of the Conan 1.x API is not supported.

Recipe and package files are addressed beneath an immutable recipe revision (rrev) and package revision (prev), each of which is a content hash of the files it pins, so those files (and the per-revision file listings) are cached content-addressably and served indefinitely. The mutable discovery endpoints (/latest, /revisions, search, the ping) are served live from the upstream on every request and never cached.

On a cache miss the proxy verifies the MD5 of each fetched content file before the bytes are cached or served — streaming for the archives, in memory for the small conaninfo.txt — and refuses a mismatch. The expected digest is taken from:

The outcome is recorded in the cache entry’s metadata, visible through the admin cache API: conan.checksumVerified is md5 or none, and conan.checksumSource is manifest or upstream-header. Both digests are published by the same upstream that serves the file, so they catch corruption and truncation rather than a compromised upstream. conanmanifest.txt itself is cached as served, and no X-Checksum-* header is added to (or replayed on) the proxy’s own file responses — Conan does not use them for downloads.

upstreams:
  conancenter:
    type: conan
    url: https://center2.conan.io

Authentication. The proxy authenticates to a private remote with the credentials configured on the upstream; a client never logs in to the upstream through it. The Conan login endpoints (GET /v2/users/authenticate and /v2/users/check_credentials) are therefore refused with 501 rather than forwarded — the upstream would answer them with a session token for the proxy’s own account — so conan remote login and conan remote auth fail against a proxy remote (“Invalid server response”). That endpoint is also the only way a Conan client obtains a token to present, so Conan cannot send a proxy token. If the proxy enforces authentication, admit anonymous reads for the Conan upstream (auth.allowAnonymous with an auth.anonymousRoles role scoped to that upstream); the other upstreams keep requiring a token.

conda

Client configuration: clients/conda.md.

A Conda channel upstream (type: conda, e.g. https://conda.anaconda.org/conda-forge) is proxied under /v1/<name>, which the client treats as the channel root. The backend honors the channel’s per-subdir layout: each platform selector (noarch, linux-64, osx-arm64, win-64, …) has its own repodata.json index and the .conda / .tar.bz2 package archives it describes.

A package filename pins its name-version-build coordinate, so package archives are cached content-addressably and served indefinitely; the mutable repodata.json / channeldata.json indices are revalidated rather than cached.

On a cache miss for a package the proxy fetches the subdir’s repodata.json, reads the SHA-256 it records for the archive (falling back to MD5 only for older indices), and verifies the fetched bytes against it — streaming, so a mismatch aborts the cache write and the client stream (recorded as X-Checksum-Verified: sha256 on success). The package coordinate is associated for nameguard, vulnscan, provenance, policy, and license enforcement.

upstreams:
  conda-forge:
    type: conda
    url: https://conda.anaconda.org/conda-forge

cran

Client configuration: clients/cran.md.

A CRAN upstream (type: cran, e.g. https://cloud.r-project.org) is proxied under /v1/<name>, which the client treats as the repository root. The backend serves the standard CRAN tree: the per-area PACKAGES indices and the source (src/contrib/) and binary (bin/windows/, bin/macosx/) package tarballs they describe. CRAN-compatible repositories (Posit Package Manager, Bioconductor, a local miniCRAN) use the same layout.

A package filename pins its name_version coordinate, so tarballs are cached content-addressably and served indefinitely; the mutable PACKAGES indices are revalidated rather than cached.

On a cache miss for a tarball the proxy fetches the sibling PACKAGES index, reads the MD5sum it records for the package, and verifies the fetched tarball against it before the bytes are cached or served — streaming, so a mismatch is refused (recorded as X-Checksum-Verified: md5 on success). The package coordinate is associated for nameguard, vulnscan, provenance, policy, and license enforcement; CRAN coordinates are additionally OSV-scanned (OSV’s CRAN ecosystem).

upstreams:
  cran:
    type: cran
    url: https://cloud.r-project.org

hex

Client configuration: clients/hex.md.

A Hex upstream (type: hex, e.g. https://repo.hex.pm) is proxied under /v1/<name>, which mix/hex treats as the repository root. The backend serves the Hex registry-v2 tree: the signed, gzip-compressed protobuf resources /names, /versions, and /packages/<name>, plus the release tarballs under /tarballs/<name>-<version>.tar, and the /installs/ tree Mix and Hex use to install and update themselves (below).

A tarball filename pins its name-version coordinate, so tarballs are cached content-addressably and served indefinitely; the mutable registry resources are revalidated rather than cached and are passed through byte-exact, so a client that pins the repository public key still performs its own end-to-end signature verification.

On a cache miss for a tarball the proxy fetches the sibling /packages/<name> resource, decodes the signed protobuf, reads the release’s outer_checksum (a SHA-256 over the whole tarball), and verifies the fetched bytes against it before they are cached or served — streaming, so a mismatch is refused. The outcome is recorded as hex.checksumVerified (sha256 or none) in the cache entry’s metadata, visible through the admin cache API. The package coordinate is associated for nameguard, vulnscan, provenance, policy, and license enforcement; Hex coordinates are additionally OSV-scanned (OSV’s Hex ecosystem).

Hex and Rebar self-install (/installs/). With HEX_MIRROR set, Mix and Hex also fetch their own builds from the mirror. Hex’s update check (at most once a day, on mix deps.get and friends) reads /installs/hex-1.x.csv; mix local.hex and mix local.rebar read a builds list (hex-1.x.csv, rebar3-1.x.csv; hex.csv, rebar.csv from Elixir 1.18), its .signed signature, and then the build the list selects (/installs/<elixir>/hex-<version>.ez, /installs/<elixir>/rebar3-<version>). The proxy passes exactly these paths through live and byte-exact and refuses anything else under /installs/. Mix checks each list’s signature against its built-in public key (through Elixir 1.18; later releases rely on HTTPS) and each build against the SHA-512 its list records.

The builds are deliberately not cached and not gated. They are not hex.pm packages, so there is no package coordinate for the admission gates to evaluate; their only integrity record is a row in the mutable list, so a cached copy could only go stale against it (and then fail every client’s checksum check until purged); and the client verifies them itself on every install. repo.hex.pm redirects /installs/ to builds.hex.pm, so allow that host if you restrict the proxy’s egress.

upstreams:
  hex:
    type: hex
    url: https://repo.hex.pm

mix local.hex and mix local.rebar read only the environment, not Hex’s configuration: they use HEX_BUILDS_URL when it is set (Elixir 1.15+), then HEX_MIRROR, then the default builds host.

Do not register the proxy as a separately named repository (mix hex.repo add <name> <url>) to mirror hex.pm: the registry resources are signed for the repository name hexpm, and Hex rejects them under any other name.

The proxy serves the repository tree only (registry resources, tarballs, and /installs/); it does not front the hex.pm JSON API (api.hex.pm), which mix hex.publish, mix hex.search, and auth flows use directly.

bazel

Client configuration: clients/bazel.md.

A Bazel registry upstream (type: bazel, e.g. https://bcr.bazel.build) is proxied under /v1/<name>, which Bazel treats as a module registry (--registry=<url>). The backend serves the Bzlmod tree: the registry-root bazel_registry.json, each module’s modules/<name>/metadata.json, and the per-version modules/<name>/<version>/MODULE.bazel, source.json, and the patches/ and overlay/ files source.json declares (overlay files may be nested, e.g. overlay/src/BUILD.bazel).

A module version’s source archive lives at an arbitrary external URL (commonly a GitHub release), not under the registry. source.json records that archive’s URL and its Subresource-Integrity (integrity, e.g. sha256-<base64>) digest. So the proxy can cache and verify the archive, it rewrites each source.json so its url points at a proxy-synthetic modules/<name>/<version>/archive/<file> endpoint, leaving the integrity untouched (Bazel still verifies end-to-end). A request to that endpoint re-reads source.json, fetches the external archive, and verifies the fetched bytes against the SRI digest before they are cached or served — streaming, so a mismatch aborts the cache write and the client stream. The outcome is recorded as bazel.checksumVerified (sha256/sha384/sha512, or none) in the cache entry’s metadata, next to the upstream URL that served the archive (bazel.archiveURL). The module coordinate is associated for nameguard, provenance, policy, and license enforcement.

<file> is the upstream archive’s own file name (.../archive/platforms-0.0.10.tar.gz). Bazel (6, 7, and 8 alike) infers the archive format from the suffix of the URL’s last path segment, so the endpoint has to end in one; an extension-less URL fails with “Expected a file with a .zip, … suffix”. A declared archive_type is kept, and appended to the name when the upstream URL has no telling suffix. The name only labels the download: every spelling, including the bare modules/<name>/<version>/archive, serves the same verified bytes from the same cache entry.

What the rewrite does with the other source.json fields:

URL rewriting requires the proxy’s public URL. Set server.publicUrl so the rewritten source.json carries an absolute archive endpoint; without it the descriptor is passed through unchanged and archive fetches are not proxied.

Bazel modules are not OSV-scanned by coordinate (OSV defines no Bazel-module ecosystem). A module’s security posture is carried by its underlying source repository, which the provenance/commit-scanning paths cover.

server:
  publicUrl: https://proxy.example.com
upstreams:
  bazel:
    type: bazel
    url: https://bcr.bazel.build

MODULE.bazel.lock records the hash of every registry file per registry URL, including the rewritten source.json. A lockfile written against the proxy is therefore valid for that proxy URL, not for bcr.bazel.build directly (and vice versa); run bazel mod deps --lockfile_mode=update after switching.

julia

Client configuration: clients/julia.md.

A Julia upstream (type: julia, e.g. https://pkg.julialang.org) is proxied under /v1/<name>, which the Julia client treats as a Pkg Server (JULIA_PKG_SERVER). The backend serves the Pkg Server Protocol: the mutable /registries listing, each registry’s tarball at /registry/<uuid>/<hash>, package source tarballs at /package/<uuid>/<hash>, and artifact tarballs at /artifact/<hash>.

Every resource except /registries is addressed by its git-tree-sha1 — the SHA-1 Git tree object hash of the decompressed tarball’s contents — so the URL is itself the integrity record. On a cache miss the proxy recomputes that tree hash over the fetched gzip-compressed tarball (independently of git, exactly as the Pkg client does) and verifies the bytes against the hash in the URL before they are cached or served — streaming, so a mismatch aborts the cache write and the client stream (recorded as X-Tree-Hash-Verified: git-sha1 on success). The mutable /registries listing is revalidated rather than cached and passed through byte-exact.

Julia packages are not OSV-scanned by coordinate. OSV defines a Julia ecosystem, but it is keyed by package name and version, whereas the Pkg Server Protocol addresses packages only by UUID and git-tree-sha1 — never a name/semver — so no coordinate OSV lookup is possible at the pull layer. A package’s security posture is carried by its underlying source repository, which the provenance/commit-scanning paths cover.

upstreams:
  julia:
    type: julia
    url: https://pkg.julialang.org

The proxy fronts the Pkg Server Protocol (registry/package/artifact tarballs), which is how Pkg installs registered packages; it does not front unregistered ]add <git-url> dependencies, which Pkg clones directly from their source repository (use the git backend for those).

The Pkg server is fail-open. When the server refuses a package (for example because the proxy’s admission policy blocked it), Pkg silently falls back to cloning the package’s Git repository. Admission is therefore enforced only where clients have no direct route to the forges.

cpan

Client configuration: clients/cpan.md.

A CPAN upstream (type: cpan, e.g. https://www.cpan.org or https://cpan.metacpan.org) is proxied under /v1/<name>, which the client treats as the mirror root. The backend serves the standard CPAN tree: the modules/ master indices (notably modules/02packages.details.txt.gz, which maps a module to its distribution) and the distribution tarballs under the author tree authors/id/<A>/<AB>/<AUTHOR>/<Dist>-<Version>.tar.gz. Every author directory also publishes a CHECKSUMS file — a PGP-clearsigned Perl data structure recording each file’s SHA-256. CPAN-compatible mirrors (a local minicpan, an Artifactory CPAN repository) use the same layout.

A distribution filename pins its Dist-Version coordinate, so tarballs are cached content-addressably and served indefinitely; the mutable module indices, the CHECKSUMS file, and the sidecar .meta/.readme documents are revalidated rather than cached.

On a cache miss for a distribution the proxy fetches the sibling CHECKSUMS file, reads the SHA-256 it records for the tarball, and verifies the fetched bytes against it before they are cached or served — streaming, so a mismatch is refused (recorded as X-Checksum-Verified: sha256 on success). The distribution coordinate is associated for nameguard, vulnscan, provenance, policy, and license enforcement; CPAN coordinates are additionally OSV-scanned (OSV’s CPAN ecosystem, keyed by distribution name and version).

upstreams:
  cpan:
    type: cpan
    url: https://cpan.metacpan.org

The legacy CPAN.pm client can target the same mirror by setting its urllist to https://proxy.example.com/v1/cpan/.

swift

Client configuration: clients/swift.md.

A Swift registry upstream (type: swift) is proxied under /v1/<name>. The backend speaks the Swift Package Registry API (SE-0292 — the /{scope}/{name}, /{scope}/{name}/{version}, Package.swift, and /{scope}/{name}/{version}.zip endpoints the swiftlang reference server, the Swift Package Index and Tuist’s public registry implement). The ecosystem tests run the real SwiftPM through it against Tuist’s registry.

A published release is immutable, so its metadata, manifest, and source archive are cached content-addressably beneath their {scope}/{name}/{version} coordinate and served indefinitely. The mutable discovery endpoints (the release list and the /identifiers SCM-URL lookup) are revalidated rather than cached.

On a cache miss for a source archive the proxy fetches the release metadata, reads the SHA-256 checksum it records for the source-archive resource, and verifies the fetched .zip against it before the bytes are cached or served (recorded as X-Checksum-Verified: sha256 on success); a mismatch is refused. A registry that redirects the archive download (Tuist sends it to its object store) is followed by the proxy. The registry’s Content-Version and Digest: sha-256=... headers are passed through; Content-Version — which SwiftPM requires — and a manifest’s Link header (its Swift-version-specific variants) are kept with the cached resource and sent on every cache hit. The package’s source-repository URL (from the release metadata) is associated for provenance.

swift package-registry login checks a token by posting it to the registry address (or to /login below it). The proxy answers that itself — 200 once its access control has admitted the caller — and never forwards it to the upstream.

upstreams:
  swiftpm:
    type: swift
    url: https://tuist.dev/api/registry/swift

dart

Client configuration: clients/dart.md.

A pub upstream (type: dart, or the alias pub; e.g. https://pub.dev) is proxied under /v1/<name>. The backend speaks the Hosted Pub Repository API (repository-spec v2): the list-versions document (/api/packages/<package>) and package archives.

The list-versions document is served with every archive_url rewritten through the proxy, so a client’s archive download flows back through the proxy (where it is cached, verified, and gated) rather than directly to the upstream or its blob storage. Set server.publicUrl so those rewritten URLs are absolute. A concrete version’s .tar.gz archive is immutable and cached content-addressably; the list-versions and advisories documents are mutable and revalidated.

On a cache miss for an archive the proxy re-reads the list-versions document to recover the real upstream archive URL and the release’s archive_sha256, fetches the archive (following any redirect to blob storage), and verifies it against that SHA-256 before the bytes are cached or served (recorded as X-Checksum-Verified: sha256); a mismatch is refused. The package’s pubspec repository/homepage URL is associated for provenance.

upstreams:
  pub:
    type: dart
    url: https://pub.dev

huggingface

Client configuration: clients/huggingface.md.

A Hugging Face Hub upstream (type: huggingface, e.g. https://huggingface.co) is proxied under /v1/<name>. The backend speaks the Hub resolve protocol (GET /{repo}/resolve/{revision}/{path} for models, and the datasets/ and spaces/ variants) and the repository metadata API (/api/models/{repo}, /api/datasets/{repo}).

A resolve pinned to a 40-hex commit SHA is immutable, so its blob is cached content-addressably and served indefinitely; a resolve against a branch or tag (main) is mutable and revalidated — except a weight file (.safetensors, .bin, .pt, .gguf, .onnx, …), which is cached under the revision’s name as well, so that every weight download passes the content gates that run on cached artifacts. Such an entry does not follow a later push to the branch; clients that need a known state pin the commit. Large weight files are stored in Git LFS and served from a CDN via a redirect the proxy follows transparently; the resolve response advertises the object’s SHA-256 out-of-band (X-Linked-Etag), which the proxy verifies the delivered bytes against — streaming, so multi-GB weights are never buffered — recording X-Checksum-Verified: sha256 on success and refusing a mismatch. A git-lfs pointer body returned in place of content is recognized so the tiny text blob is never mistaken for a real weight.

Because malicious pickles are the dominant ML supply-chain attack, pickle-based weight files (.bin/.pkl/.pt/.pth/.ckpt, including the PyTorch ZIP container) pass through the ML weight-scanning gate (mlGuard): the proxy statically disassembles the pickle opcode stream and refuses (and quarantines) a file that imports a code-execution / network / filesystem primitive (os.system, subprocess.Popen, builtins.eval, a socket, …) invoked via __reduce__ — never unpickling anything. The safe, tensor-only safetensors format is recognized and preferred; a served pickle carries an advisory X-MLGuard-Prefer-Safetensors header. A refusal is an actionable 403 naming the unsafe imports and the offending opcode stream.

upstreams:
  huggingface:
    type: huggingface
    url: https://huggingface.co
    credentials:
      token: <hf-access-token>   # only for gated/private repos

openvsx

Client configuration: clients/openvsx.md.

An OpenVSX upstream (type: openvsx, e.g. https://open-vsx.org) is proxied under /v1/<name>. The backend speaks the Eclipse Open VSX REST API: the extension query/metadata documents (/api/-/query, /api/{namespace}, /api/{namespace}/{extension}[/{version}]) and the .vsix archive downloads (/api/{ns}/{ext}/…/file/{file}.vsix). A compatible VS Code gallery tree (/vscode/…) is proxied too.

The metadata/query documents are mutable and served live; the proxy rewrites the absolute upstream URLs they embed (files.download, files.sha256, gallery asset URLs, …) to its own public base, so an editor’s extension download routes back through the proxy (and its content gate) rather than directly to the registry or its CDN. External links in the metadata (an extension’s source repository, homepage) are left untouched.

A .vsix path pins its {namespace}.{extension}@{version} coordinate, so the archive is immutable and cached content-addressably. On a cache miss the proxy fetches the sibling .sha256 sidecar the registry publishes and verifies the delivered bytes against it — streaming, so a mismatch aborts the cache write and client stream — recording X-Checksum-Verified: sha256 on success and refusing a mismatch.

Because a .vsix is a zip whose extension/package.json carries the install/activation manifest, each archive passes through the install-script / lifecycle-hook content gate (installHooks): the proxy statically extracts the manifest’s npm-style lifecycle scripts (vscode:prepublish, postinstall, …), its activationEvents, and its declared contributes points, and scores them against the deterministic high-risk pattern set — never executing anything. A wildcard activationEvent: * (the extension activates on every editor startup) is flagged, and a malicious install script is refused with an actionable 403.

VS Code / OpenVSX extensions are not OSV-scanned by coordinate: OSV defines no ecosystem keyed by the {namespace}.{extension} identifier. The supply-chain defense for extensions is the install/activation content gate above plus the name / provenance / policy gates.

upstreams:
  openvsx:
    type: openvsx
    url: https://open-vsx.org
    credentials:
      token: <open-vsx-token>   # only for a private deployment

The POST-based VS Code gallery extensionquery is not proxied — the pull-through core serves idempotent GET/HEAD only — so clients use the OpenVSX REST API (GET /api/…), which this backend fully fronts.

nix

Client configuration: clients/nix.md.

A Nix binary cache (type: nix, e.g. https://cache.nixos.org, or any HTTP cache produced by nix copy --to) is proxied under /v1/<name>. The backend speaks the binary-cache protocol: the cache descriptor (/nix-cache-info), the per-store-path signed metadata (/<storehash>.narinfo), and the content-addressed NAR archives (/nar/<hash>.nar[.xz|.zst|…]).

Two independent integrity controls are enforced on the pull path:

The narinfo URL: field is rewritten to the proxy’s own /nar/… endpoint so a client’s NAR download routes back through the proxy (and its content gate). The signature covers neither the URL nor the FileHash, so this rewrite never invalidates it.

For the same reason a cache can put anything in that field without breaking its signature, and Nix fetches an absolute http(s):// or file:// URL there as it stands. A narinfo whose NAR location the proxy cannot route through itself and that would send the client to another host is therefore not served (the request fails, and pullthrough_nix_narinfo_location_refused_total counts it): the NAR would otherwise reach the client past the cache, the content-address verification and every gate. A relative location outside nar/ is passed on unchanged — the client asks the proxy for it, and the proxy does not serve a path outside the layout.

Nix store paths are not OSV-scanned by coordinate: a binary cache addresses content by an opaque store hash and the NAR’s SHA-256, never by a name/version. The defense is the signature + content-address verification above plus the name / provenance / policy gates; a derivation’s underlying source is covered by the provenance / commit-scanning paths.

upstreams:
  nix:
    type: nix
    url: https://cache.nixos.org
    settings:
      # nix.conf trusted-public-keys form; space-, comma- or newline-separated.
      trustedPublicKeys: "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="

homebrew

Client configuration: clients/homebrew.md.

Homebrew (type: homebrew, https://formulae.brew.sh) is proxied under /v1/<name>. It spans two upstreams, both fronted by this backend:

What the brew client does with them:

On the pull path:

For consumers of the unsigned formula JSON (/api/formula.json, /api/formula/<name>.json) — not the brew client — every bottle download URL on the bottle-registry host is additionally rewritten to the proxy’s own /bottle/<name>/<version>/v2/…/blobs/sha256:<digest> endpoint (under the configured public URL), which carries the coordinate in its path and serves the same verified, cached bottle.

Homebrew bottles are not OSV-scanned by coordinate: OSV.dev defines no Homebrew ecosystem (a bottle is addressed by an opaque OCI digest, and a formula coordinate is not an OSV key). The defense is the content-address verification above plus the name / content / provenance / policy gates; a formula’s underlying source is covered by the provenance / commit-scanning paths.

upstreams:
  homebrew:
    type: homebrew
    url: https://formulae.brew.sh
    settings:
      # OCI registry Homebrew bottles and their manifests are fetched from
      # (default https://ghcr.io). It is the only registry the /v2/ paths reach,
      # and only bottle URLs on this host are rewritten in the unsigned JSON.
      bottleRegistryUrl: https://ghcr.io

Things to know about the client:

ansible

Client configuration: clients/ansible.md.

Ansible Galaxy (type: ansible, https://galaxy.ansible.com) is the registry for Ansible collections and roles. It is proxied under /v1/<name>. The backend serves the Galaxy v3 REST API — the collection index (/api/v3/plugin/ansible/content/<repo>/collections/index/<ns>/<name>/), the versions list, and the per-version detail document — plus the content- addressable collection artifact tarballs (.../collections/artifacts/<ns>-<name>-<version>.tar.gz).

Ansible Galaxy is not OSV-scanned by coordinate. OSV.dev defines no Ansible-Galaxy ecosystem; a collection is addressed by a namespace.name FQCN that is not an OSV key, so no coordinate lookup is performed. The defense is the artifact SHA-256 verification above plus the name / content / provenance / policy gates; a collection’s underlying source repository is covered by the provenance / commit-scanning paths.

upstreams:
  ansible:
    type: ansible
    url: https://galaxy.ansible.com

A client’s server URL is the mount, with or without its trailing slash. ansible-galaxy first requests that URL, finds Galaxy’s web page rather than an API root, and falls back to <url>/api; https://proxy.example.com/v1/ansible/api/ skips that extra round trip. Dependencies are resolved and downloaded through the proxy as well.

puppet

Client configuration: clients/puppet.md.

Puppet Forge (type: puppet, https://forgeapi.puppet.com) is the registry for Puppet modules. It is proxied under /v1/<name>. The backend serves the Forge v3 REST API — module metadata (/v3/modules/<owner>-<name>), release metadata (/v3/releases/<owner>-<name>-<version>), and the listing/search endpoints — plus the content-addressable release tarballs (/v3/files/<owner>-<name>-<version>.tar.gz).

Puppet Forge is not OSV-scanned by coordinate. OSV.dev defines no Puppet-Forge ecosystem; a module is addressed by an owner-name slug that is not an OSV key, so no coordinate lookup is performed. The defense is the release digest verification above plus the name / content / provenance / policy gates; a module’s underlying source repository is covered by the provenance / commit-scanning paths.

upstreams:
  puppet:
    type: puppet
    url: https://forgeapi.puppet.com

jsr

Client configuration: clients/jsr.md.

The JSR registry (type: jsr, https://jsr.io) is the modern JavaScript/TypeScript registry used by Deno, Node, Bun and others. It is proxied under /v1/<name>. The backend serves the JSR static tree: the package metadata document (/@<scope>/<name>/meta.json), the per-version metadata that carries the publish manifest (/@<scope>/<name>/<version>_meta.json), and the content-addressable module files that make up a published version (/@<scope>/<name>/<version>/<path>).

JSR is not OSV-scanned by coordinate. OSV.dev defines no “JSR” ecosystem; although JSR is npm-adjacent (packages are mirrored to npm under the synthetic @jsr/<scope>__<name> name served from npm.jsr.io), a JSR-native coordinate (@scope/name) is not an npm name and OSV publishes no JSR-keyed advisories, so no coordinate lookup is performed. The defense is the manifest content verification above plus the name / content / provenance / policy gates.

upstreams:
  jsr:
    type: jsr
    url: https://jsr.io

hackage

Client configuration: clients/hackage.md.

Hackage (type: hackage, https://hackage.haskell.org) is the central package repository for the Haskell ecosystem. It is proxied under /v1/<name>. The backend serves the Hackage tree: the incremental package index (/01-index.tar.gz), the TUF security metadata (/root.json, /snapshot.json, /timestamp.json, /mirrors.json), per-package .cabal descriptions, and the immutable source-distribution (sdist) tarballs (/package/<name>-<version>/<name>-<version>.tar.gz).

Hackage is OSV-scanned by coordinate: OSV.dev’s Hackage ecosystem is keyed by Haskell package name and version, exactly the coordinate an sdist filename encodes.

upstreams:
  hackage:
    type: hackage
    url: https://hackage.haskell.org

generic

Client configuration: clients/generic.md.

When a registry is not covered by any dedicated backend above, a generic upstream (type: generic) fronts it with declarative routing rules — no code changes. It serves under /v1/<name>/ and routes through the same gated pull pipeline. With

upstreams:
  mysource:
    type: generic
    url: https://repo.example.com
    generic:
      publicBaseURL: https://proxy.example.com/v1/mysource
      routes:
        - name: metadata
          match: '^/packages/[^/]+/index\.json$'
          rewrite: true            # served live; embedded URLs rewritten through the proxy
        - name: artifact
          match: '^/packages/[^/]+/.+\.tar\.gz$'
          cacheable: true          # cached + routed through the content gates
          verify:                  # verified against a sibling .sha256 before caching/serving
            algorithm: sha256
            source: sidecar
            sidecarSuffix: .sha256

clients point at https://proxy.example.com/v1/mysource/…. The route set is an allowlist (an unmatched path is refused), artifacts are content-verified on fetch, and unsafe configs are rejected at load time. See generic-backend.md for the full field reference, path-embedded digests, content-gate selection, and metrics. The ecosystem tests run Alpine’s apk through a generic upstream in front of Alpine’s package mirror; its routes are in clients/generic.md.

git

Client configuration: clients/git.md.

A Git upstream (type: git) is served under /v1/<name>/: a repository is addressed by appending its path to the upstream prefix (https://proxy.example.com/v1/github/<owner>/<repository>.git).

upstreams:
  github:
    type: git
    url: https://github.com
    credentials:
      username: git
      token: ${GITHUB_TOKEN}   # optional; injected toward the upstream

The proxy speaks the Git smart-HTTP protocol, wire protocol v0/v1 and v2 (/info/refs?service=git-upload-pack and git-upload-pack); it is read-only (fetch/clone only, no push). Configured upstream credentials are injected toward the forge, so clients clone public and private mirrored repos without holding upstream tokens.

With proxy access control enabled, a client presents its proxy token as a request header (http.<url>.extraHeader). The proxy’s 401 carries a Bearer challenge, which Git does not answer with a stored credential or one in the URL (see clients/git.md).

When git.mirrorDir is set the proxy keeps local bare mirrors and serves packs/objects from cache (refreshed at most every git.refreshInterval); without it, smart-HTTP requests stream straight through with ref advertisements cached for git.infoRefsTtl (0, the default, does not cache them).

Git over SSH

The SSH gateway is active only when server.sshAddr is set and mirror mode is enabled (git.mirrorDir). It is read-only and serves from the local mirrors.

server:
  sshAddr: ":2222"
git:
  mirrorDir: /var/lib/pullthrough/mirrors
  ssh:
    hostKeyFile: /etc/pullthrough/ssh_host_ed25519_key   # stable host key
    authorizedKeysFile: /etc/pullthrough/authorized_keys # permitted clients
    # authorizedKeys: ["ssh-ed25519 AAAA... alice"]
    # noClientAuth: true   # trusted networks only; still read-only

The repository path is <upstream-name>/<repo-path> (ssh://git@proxy.example.com:2222/github/torvalds/linux.git). Pin the proxy’s host key in ~/.ssh/known_hosts (always set hostKeyFile in production; otherwise the proxy generates an ephemeral key whose fingerprint changes on every restart). Client authentication is public-key only — the key must appear in authorizedKeys/authorizedKeysFile unless noClientAuth: true.

SSH-transport upstreams are configured per upstream via settings:

upstreams:
  github-ssh:
    type: git
    url: ssh://git@github.com/
    settings:
      sshPrivateKeyFile: /etc/pullthrough/github_id_ed25519
      sshKnownHostsFile: /etc/pullthrough/known_hosts
      # sshInsecureIgnoreHostKey: "true"   # UNSAFE: skips upstream host-key check

Git LFS

When git.lfs.enabled is set, the proxy transparently fronts Git LFS for HTTPS git upstreams. It implements the LFS batch API (POST <repo>/info/lfs/objects/batch): a client’s download negotiation is forwarded upstream, then every download action is rewritten so its href points back at the proxy’s own per-object endpoint (GET <repo>/info/lfs/objects/<oid>). Upstream-issued auth headers are stripped — the proxy re-authenticates to upstream itself. Upload operations are rejected (the proxy is read-only).

Each LFS blob is streamed through the content-addressable cache keyed by its sha256 OID (sha256:<oid>), so it inherits the same guarantees as every other cached artifact:

Textual blobs under git.lfs.scanMaxBytes are run through the commit-scan secret detector; set git.lfs.blockOnFindings: true to refuse a blob that contains a detected secret rather than serving it with the finding recorded. The detector decides once per object, and a request is never served on the strength of a cache hit alone: an object is in the cache from the moment it is fetched, which is before the detector has looked at it, so a second request arriving in that window runs the detector itself rather than being served.

With the LLM package-content scan enabled, every LFS object request — cache hit or miss, whole or ranged — also passes that gate before a byte is written (scope key git-lfs). An object that is an archive, an executable, a script or a pickle is examined; an image, a video or a dataset is not. A refused object is answered 403 with a message the git lfs client prints, and evicted.

git:
  lfs:
    enabled: true
    maxObjectBytes: 5368709120   # 5 GiB cap per object (0 = default)
    scanMaxBytes: 5242880        # scan the first 5 MiB of a text blob (0 = default)
    blockOnFindings: false       # true: fail closed on a secret finding

Clients need no special configuration — a normal git lfs pull / git clone through the proxy transparently fetches and caches LFS objects. Metrics are exported under pullthrough_lfs_* (batch requests, cache hits/misses, bytes fetched/served, OID/size mismatches, gate findings/blocks, serve-gate refusals), labeled by backend.

What is cached

Ecosystem Cached immutably Revalidated each request
npm tarballs (.../-/...tgz) packuments
pip wheels/sdists (/files/...) Simple pages
cargo .crate downloads config.json, sparse index files
go .info / .mod / .zip per version @v/list, @latest
nuget .nupkg packages service index, registration, version lists
maven release & timestamped-snapshot artifacts (.jar/.pom/.module/.war) + sidecars maven-metadata.xml, non-timestamped -SNAPSHOT artifacts
rubygems .gem files, /quick/Marshal.4.8 gemspecs compact index (/versions, /names, /info/<gem>), Marshal indexes, dependency API
composer dist archives (/dist/<vendor>/<package>/<version>/<ref>.<ext>) packages.json, /p2/... v2 metadata, /p/... providers
helm chart archives (<name>-<version>.tgz) + .prov provenance (classic); manifests/blobs by digest (OCI) index.yaml (classic); manifests by tag (OCI)
docker blobs & manifests by digest manifests by tag, tag/ping endpoints
conan recipe/package files under a pinned revision (.../revisions/{rrev}/files/...), MD5-verified via conanmanifest.txt (unpacked files) or the upstream X-Checksum-Md5 header (archives) /latest, /revisions, search, /ping
swift release metadata, Package.swift, source archives (.../{version}.zip) under a pinned version, SHA-256-verified via the release metadata checksum release list (/{scope}/{name}), /identifiers lookup
dart package archives (/api/archives/<pkg>-<ver>.tar.gz), SHA-256-verified via archive_sha256 list-versions (/api/packages/<pkg>, archive URLs rewritten), advisories
huggingface commit-pinned resolve blobs (.../resolve/{sha}/...), SHA-256-verified via X-Linked-Etag, LFS/CDN-followed, pickle weights opcode-scanned branch/tag resolve, /api/models + /api/datasets metadata
openvsx .vsix archives (.../file/{file}.vsix), SHA-256-verified via the sibling .sha256 sidecar, install/activation manifest content-scanned /api/... metadata + query (download URLs rewritten), /vscode/... gallery, .sha256/manifest sidecars
git packs/objects (mirror mode) ref advertisements (infoRefsTtl)
git LFS LFS blobs by sha256 OID (sha256:<oid>), OID+size-verified on fetch batch-API negotiation (/info/lfs/objects/batch)

Immutable artifacts are stored in the content-addressable cache and served on subsequent requests without contacting the upstream. Mutable index documents are revalidated with the upstream using ETag / Last-Modified conditional requests, so unchanged documents cost only a 304 round-trip.