Skip to the content.

The client lab

The client guide tells people what to put into .npmrc, settings.xml, daemon.json and thirty other files. The client lab is where those configurations are run: every one of them is a script that the real client executes against the real proxy.

The ecosystem tests already do that in CI for one client per ecosystem — on loopback, over plain HTTP, without access control. The lab covers what a deployment adds on top of that, and what the guide documents for it:

  Ecosystem tests Client lab
Runs on every push nightly, on demand, and when the lab or the guide changes
Clients one per ecosystem (32) every client the guide documents: also Yarn, pnpm, Bun, uv, Poetry, PDM, Gradle, containerd, skopeo, OpenTofu, micromamba, gem, puppet module, …
Proxy address http://127.0.0.1:<port> https://proxy.example.com, with a certificate from a private CA
Access control off off, on (a token is required), and on with an anonymous role
Asserts install, cache hit, refusal of a blocked package the configuration works — CA, token and all; lock files say what the guide says they do; a limitation the guide states is still there
A client that asks another host cannot reach it (no network) cannot reach it, and is caught asking

How it works

        ┌────────────── lab network (internal: no way out) ──────────────┐
        │                                                                │
        │  client container                    proxy.example.com         │
        │   the real client, its own image  ──►  the real pullthrough ───┼──► registries
        │   /etc/ssl/corp-ca.pem (the CA)        HTTPS, private CA       │
        │   /etc/resolv.conf ──► dnslog                                  │
        │                         answers proxy.example.com,             │
        │                         logs every other name: NXDOMAIN        │
        └────────────────────────────────────────────────────────────────┘

That last point is what the lab adds to “the client has no other network”. A package manager that tries the public registry first and shrugs when it does not answer installs just fine on a network without a way out — and talks to the registry directly on one that has it. The lab found one such configuration in the first hour (Composer, below), in a test that had been green in CI all along.

Run it

Requirements: Docker, Go, openssl, and network access to the public registries. Every client runs in its own image; nothing else is installed.

make client-lab                           # start the lab, run every script (a while)
make client-lab CLIENTS="npm yarn pnpm"   # a selection
make client-lab-report                    # write the result table below into this page
make client-lab-down

scripts/client-lab/lab.sh run npm auth    # one script in one mode
scripts/client-lab/lab.sh logs npm auth   # its output, the requests it made, the names it looked up
scripts/client-lab/lab.sh list            # every script, with its image and modes
scripts/client-lab/lab.sh check           # which scripts are missing a passing result

The lab’s CA and certificate last 30 days — a lab directory is scratch space — and lab.sh up makes new ones when they are about to run out.

Variable Default Meaning
CLIENT_LAB_DIR $TMPDIR/pullthrough-client-lab Where the lab keeps its state: the CA, the proxies’ caches, logs, results.
CLIENT_LAB_PROXY_BIN built from the checkout A prebuilt, statically linked pullthrough for linux to test.
CLIENT_LAB_PROXY_IMAGE alpine/git The image the proxy runs in: anything with git, CA certificates and wget.
LAB_KEEP_IMAGES 1 0 removes an image the lab pulled once its last script has run (small disks).
LAB_KEEP_WORK 0 1 keeps a run’s scratch directory for inspection.

Results

Last run: 2026-11-12, linux/x86_64.

Client Version No access control Token required Token required, anonymous role Other hosts looked up Script
ansible-galaxy 2.21.6 ✔ ✔ — — ansible.sh
APT 2.6.1 ✔ ✔ — — apt.sh
Bazel 7.4.1 ✔ ✔ — — bazel.sh
Homebrew 4.6.20 ✔ ✔ — — brew.sh
Bundler 2.5.22 ✔ ✔ — — bundler.sh
Bun 1.1.45 ✔ ✔ — — bun.sh
cabal 3.16.1.0 ✔ ✔ — _mirrors.proxy.example.com cabal.sh
cargo (–config flags) 1.99.1 ✔ — — index.crates.io cargo-flags.sh
cargo 1.99.1 ✔ — — — cargo.sh
cargo (with a token: refused) 1.99.1 — ✔ ✔ — cargo-token.sh
Composer 2.11.2 ✔ ✔ — — composer.sh
Conan 2 2.34.0 ✔ — ✔ — conan.sh
Conan 2 (with a token: refused) 2.34.0 — ✔ — — conan-token.sh
conda 24.9.2 ✔ ✔ — — conda.sh
containerd v1.7.25 ✔ ✔ — — containerd.sh
cpanm 1.7049 ✔ ✔ — — cpanm.sh
R (install.packages) 4.4.1 ✔ ✔ — — cran.sh
dart pub 3.5.4 ✔ ✔ — — dart.sh
Deno 2.9.8 ✔ ✔ — — deno.sh
DNF 4.14.0 ✔ ✔ — — dnf.sh
Docker Engine (docker login) 27.5.1 — ✔ — — docker-login.sh
Docker Engine 27.5.1 ✔ — — docker.io docker.sh
RubyGems (gem) and a Gemfile source 3.5.22 ✔ ✔ — — gem.sh
Git 2.49.1 ✔ ✔ — — git.sh
go 1.24.13 ✔ ✔ — — go.sh
Gradle 8.10.2 ✔ ✔ — — gradle.sh
Helm v3.16.3+gcfd0749 ✔ ✔ — — helm.sh
mix (Hex) 1.16.3 ✔ — — — hex.sh
mix (with a token: refused) 1.16.3 — ✔ — — hex-token.sh
huggingface_hub 2.4.0 ✔ ✔ — — huggingface.sh
Julia Pkg 1.10.13 ✔ ✔ — — julia.sh
Composer (an existing lock file, written against packagist.org) 2.11.2 ✔ ✔ — api.github.com lock-composer.sh
npm (an existing lock file, written against npmjs.org) 10.9.9 ✔ ✔ — — lock-npm.sh
Poetry (an existing lock file, written against PyPI) 2.5.1 ✔ ✔ — — lock-poetry.sh
dart pub (an existing lock file, written against pub.dev) 3.5.4 ✔ ✔ — — lock-pub.sh
uv (an existing lock file, written against pypi.org) 0.13.7 ✔ ✔ — — lock-uv.sh
Yarn 1 (an existing lock file, written against the public registry) 1.22.22 ✔ ✔ — registry.yarnpkg.com lock-yarn-classic.sh
Maven (user name + password) 3.9.16 — ✔ — — maven-basic.sh
Maven 3.9.16 ✔ ✔ — — maven.sh
micromamba 2.0.5 ✔ ✔ — — micromamba.sh
Nix 2.35.6 ✔ ✔ — — nix.sh
npm (environment only) 10.9.9 ✔ ✔ — — npm-env.sh
npm (JSR packages through npm.jsr.io) 10.9.9 ✔ ✔ — — npm-jsr.sh
npm 10.9.9 ✔ ✔ — — npm.sh
NuGet (dotnet) 8.0.428 ✔ — — — nuget.sh
NuGet (with a token: refused) 8.0.428 — ✔ — — nuget-token.sh
ovsx 1.4.0 ✔ ✔ — — openvsx.sh
PDM 2.29.7 ✔ ✔ — — pdm.sh
pip (environment + ~/.netrc) 25.0.1 ✔ ✔ — — pip-netrc.sh
pip 25.0.1 ✔ ✔ — — pip.sh
pnpm 9.15.0 ✔ ✔ — — pnpm.sh
Poetry 2.5.1 ✔ ✔ — — poetry.sh
puppet module 8.10.0 ✔ ✔ — — puppet.sh
r10k 5.0.3 ✔ ✔ — — r10k.sh
cargo (a refused crate) 1.99.1 ✔ — — — refused-cargo.sh
go (a refused module) 1.24.13 ✔ ✔ — — refused-go.sh
npm (a refused package) 10.9.9 ✔ ✔ — — refused-npm.sh
pip (a refused package) 25.0.1 ✔ ✔ — — refused-pip.sh
skopeo (Podman, Buildah, CRI-O) 1.17.0 ✔ ✔ — — skopeo.sh
Terraform v1.9.8 ✔ ✔ — — terraform.sh
OpenTofu v1.8.11 ✔ ✔ — — tofu.sh
uv 0.13.7 ✔ ✔ — — uv.sh
Yarn 1 (classic) 1.22.22 ✔ ✔ — — yarn-classic.sh
Yarn 4 (berry) 4.5.3 ✔ ✔ — — yarn.sh

✔ the script passed · — the script is not for that mode · Other hosts looked up: names besides the proxy’s that the client asked the name server for, all declared in the script.

A script named with a token: refused asserts a limitation: it passes when the client still cannot do what the guide says it cannot (present a token, mostly), and fails — telling the guide to be updated — when it can. So do single steps of other scripts (git, helm, skopeo, terraform, tofu, openvsx). The scripts named a refused package (crate, module) are something else: they show what a client prints when the proxy blocks a package.

A row is the result of the script as it is now. Each run records a fingerprint of what its script executes, lab.sh document writes the table only when every script has passed in every mode it is for, and a test fails when a script has changed since its row was written — so an edited script has to be run again before its ✔ is worth anything.

What the lab found

Running the documented configurations for real changed the documentation, the tooling and the proxy:

Writing a script

A script is a POSIX sh file in scripts/client-lab/clients that configures one client the way the guide says and uses it. It starts with a few header lines:

#!/bin/sh
# lab: client=npm                 the name in the result table (required)
# lab: image=node:22-slim         the client's image, pinned (required)
# lab: modes=open auth            the modes it is for (this is the default)
# lab: entrypoint=sh              for images whose entrypoint is the tool itself
# lab: daemon=docker              the client is a container engine: run it as a private daemon
# lab: user=0                     for images that default to an unprivileged user
# lab: lookups=docker.io          hosts besides the proxy the client is known to look up
set -eu
echo "LAB_CLIENT_VERSION=$(npm --version)"

Rules, most of which a test enforces:

<!-- verified: lab:npm -->
(a fenced block whose every line is in scripts/client-lab/clients/npm.sh)

The markers a block of the guide may carry, and what internal/clientguide checks for each:

Marker Meaning Check
verified: lab:<script> ci:<ecosystem> executed by these scripts every line is a whole line one of them executes (a comment in a script is not executed), in the script’s order; the lines of a file are written by one script and nested as it nests them; every script named executes a line of the block; the block has no comments of its own
output: lab:<script> what a run printed the script exists; the block has no language
proxy-config a fragment of the proxy’s configuration it decodes as the proxy’s configuration: real settings, values of their types, upstream types that exist
untested: <reason> not executed a reason is given
illustration not something to type —

What the check cannot show is that a block is complete: a block may be part of a file — the registry line of an .npmrc under Configure, its token line under Authenticate — so one that leaves out a line the client needs passes all the same. Two things narrow that gap: a block of a configuration language has to close the brackets it opens (a file cut short does not), and the lines without which a configured client still goes to the public registry — default_channels: [], { "packagist.org": false }, <clear />, --mirror-only and the like — are listed in the test and have to be on their pages. The rest is for a reader of the page to catch.

The same scripts stand behind ptctl config: for the ecosystems listed in the test (heldGenerators), every line it prints is a line a lab script executes.

In CI

The Client lab workflow (.github/workflows/client-lab.yml) builds the proxy once, derives one job per client image from the scripts themselves (lab.sh matrix), runs each group, and assembles the result table into the run summary. It fails unless every script ran and passed in every mode it is for. It runs nightly — a canary for client releases and registry changes — on demand, and on changes to the lab or the guide; it does not gate a push, because it depends on some thirty images and as many public registries being up.

go test ./internal/clientguide/, which holds the guide to the scripts, is part of the ordinary test run.