{{define "usageMaven"}}
How to use this repository

Point your build tool at {{.Base}} — artifacts are fetched from upstream and cached on first request.

Gradle (Kotlin DSL)

repositories {
    maven {
        url = uri("{{.Base}}"){{if .Auth}}
        credentials {
            username = "user"
            password = "password"
        }{{end}}
    }
}

Gradle (Groovy DSL)

repositories {
    maven {
        url '{{.Base}}'{{if .Auth}}
        credentials {
            username 'user'
            password 'password'
        }{{end}}
    }
}

Maven — settings.xml mirror

<mirrors>
  <mirror>
    <id>tiny-proxy</id>
    <mirrorOf>*</mirrorOf>
    <url>{{.Base}}</url>
  </mirror>
</mirrors>
{{if .Auth}}

Maven — credentials (settings.xml, same file)

<servers>
  <server>
    <id>tiny-proxy</id>
    <username>user</username>
    <password>password</password>
  </server>
</servers>
{{end}}

curl

curl {{if .Auth}}-u user:password {{end}}-O \
  {{.Base}}<group/path>/<artifact>/<version>/<file>
{{end}} {{define "usageGithub"}}
How to use this repository

Fetch cached GitHub release assets and metadata. Path shape: {{.Base}}<owner>/<repo>/<selector>[/<asset>]

Selectors

latest — latest stable release · snapshot — most recent release, incl. pre-releases · <tag> — pinned tag

Download a release asset

curl {{if .Auth}}-u user:password {{end}}-LO \
  {{.Base}}<owner>/<repo>/latest/<asset>

Release metadata (JSON)

curl {{if .Auth}}-u user:password {{end}}{{.Base}}<owner>/<repo>/latest.json
curl {{if .Auth}}-u user:password {{end}}{{.Base}}<owner>/<repo>/<tag>.json
{{end}} {{define "usageDocker"}}
How to use this repository

Pull images through this proxy by prefixing the reference with {{.Host}}/{{.Repo}}/.

docker pull

{{if .Auth}}docker login {{.Host}}

{{end}}docker pull {{.Host}}/{{.Repo}}/<image>:<tag>

Fetch a manifest directly

curl {{if .Auth}}-u user:password {{end}}-H "Accept: application/vnd.oci.image.manifest.v1+json" \
  {{.Base}}<image>/manifests/<tag>
{{end}} {{define "usageGitea"}}
How to use this repository

Fetch cached Gitea release assets and metadata. Path shape: {{.Base}}<owner>/<repo>/<selector>[/<asset>]

Selectors

latest — latest stable release · snapshot — most recent release, incl. pre-releases · <tag> — pinned tag

Download a release asset

curl {{if .Auth}}-u user:password {{end}}-LO \
  {{.Base}}<owner>/<repo>/latest/<asset>

Release metadata (JSON)

curl {{if .Auth}}-u user:password {{end}}{{.Base}}<owner>/<repo>/latest.json
curl {{if .Auth}}-u user:password {{end}}{{.Base}}<owner>/<repo>/<tag>.json
{{end}} {{define "usageDebian"}}
How to use this repository

Point apt at {{.Base}} — metadata is refreshed per the configured TTL, packages are cached on first request. The proxy passes InRelease/Release.gpg through byte-identical, so apt verifies signatures with the distro's regular keyring — no key changes are needed.

sources.list

{{if .Dists}}
{{range .Dists}}deb {{$.Root}} {{.Name}} {{.Components}}
{{end}}

One line per distro version this mirror serves — copy the one matching your system. Each line works for every architecture the dist carries; add [ arch=amd64 ] after deb to pin a subset.

Architectures per version

{{range .Dists}}{{.Name}}: {{if .Architectures}}{{.Architectures}}{{else}}unknown{{end}}
{{end}}
{{else}}
deb {{.Root}} <dist> <component>
# e.g. deb {{.Root}} bookworm main

The full list of supported versions appears here once the upstream mirror has been probed successfully.

{{end}}{{if .Auth}}

apt credentials — /etc/apt/auth.conf.d/tiny-proxy.conf

machine {{.Host}}
login user
password password
{{end}}

curl

curl {{if .Auth}}-u user:password {{end}}-O \
  {{.Base}}dists/<dist>/<component>/binary-amd64/Packages.gz
{{end}} {{define "usagePacman"}}
How to use this repository

Use this proxy as a pacman mirror: databases (<repo>.db, <repo>.files) refresh per the configured TTL, packages are cached forever on first request.

pacman.conf

[<repo>]
Server = {{.Base}}$repo/os/$arch
{{if .Auth}}

Serving pacman over Basic auth requires a small wrapper (pacman has no native credentials support) — e.g. an auth-injecting local mirror, or run this vrepo in public mode on a trusted network.

{{end}}

curl

curl {{if .Auth}}-u user:password {{end}}-O \
  {{.Base}}core/os/x86_64/core.db
{{end}}