Skip to content

Proxy Configuration (Restricted / No Internet Access)

Repod is fully usable with zero internet access — nothing it does requires outbound connectivity by default. But a handful of optional features reach out to public sources, and if your server sits behind a restricted egress (a security team that only allows specific domains, or a fully air-gapped site), you need to know exactly what to allow — and how to route it through a proxy.

This page lists every outbound dependency, explains how to route them through a corporate proxy, and gives a worked example using Squid with a domain-allowlist, which is the pattern most regulated environments already use for controlled egress.


What actually needs internet access

Nothing in the core upload → scan → publish → serve pipeline requires internet access. Everything below is either optional or only triggered by a specific action.

Dependency Triggered by Can run fully offline?
ClamAV signature updates Automatic (freshclam daemon) Yes — works with whatever signatures are already cached; only updates need connectivity
Grype vulnerability database Automatic, periodic Yes — same as above, CVE matching uses the last successfully downloaded database
EPSS scores / CISA KEV catalog Every CVE scan Yes — 24h local cache; a package that was already scanned once keeps working offline
Dependency CVE lookup (OSV.dev, api.osv.dev) Publishing or importing an npm, Maven or PyPI package that declares dependencies Yes — fail-soft: if OSV.dev is unreachable the publish still succeeds and the dependency scan is simply empty
Upstream security sync (Debian/Ubuntu/RPM security advisories) Scheduled sync job (disabled by default) N/A — this feature is inherently about fetching external advisories
"Import from internet" (upstream package mirrors, Maven Central, PyPI, npmjs.org, Docker Hub) Explicit user action ("Import" tab) N/A — only used if you choose to import from a public source
Upstream cache (pull-through proxy for apt/dnf clients) Client requests to /upstream/... N/A — see Upstream cache, a separate air-gap-oriented feature
License usage reporting Opt-in only (settings["license_reporting"]["enabled"]) Yes — license validation is 100% offline; reporting is purely informational
LDAP / OIDC / SMTP / webhook notifications Whatever you configure Depends entirely on where your IdP/SMTP relay/webhook endpoint lives (often internal)

If your policy is "no internet, full stop", the pipeline still runs — CVE and antivirus scanning use whatever data was cached during your last connected window (or air-gapped security data and an air-gapped cache seeded from a relay host), and you simply never use the "Import from internet" tab.


Routing outbound calls through a proxy

From the interface

The proxy can also be set in Administration → Paramètres, card Proxy HTTP/HTTPS: fill in Proxy HTTP, Proxy HTTPS and Exceptions (NO_PROXY), then click Sauvegarder. A proxy saved there takes priority over the environment variables below, and it is applied without restarting the backend. Leave both proxy fields empty to fall back to the environment variables.

Most of the table above goes over plain HTTP(S) from the backend container, using clients that respect the standard proxy environment variables. Set these in backend.env:

backend.env
HTTP_PROXY=http://proxy.internal.example.com:3128
HTTPS_PROXY=http://proxy.internal.example.com:3128
NO_PROXY=localhost,127.0.0.1,db,depot-apt,depot-rpm,YOUR_INTERNAL_LDAP_HOST

This covers: the CVE/EPSS/KEV enrichment calls, the "Import from internet" feature (upstream mirrors, Maven Central, PyPI, npmjs.org, Docker Hub search), and Grype's own database updates — all of them use HTTP clients that honor these variables automatically, no extra configuration needed.

freshclam follows the same variables

The ClamAV signature updater (freshclam, version 1.4 in the image) honours HTTP_PROXY, HTTPS_PROXY and NO_PROXY, in upper or lower case. Tested with an unreachable mirror: without a proxy variable it ends in a timeout, with one it fails to connect to the proxy, which proves it goes through it. Nothing extra is needed for ClamAV.

A freshclam.conf override is only useful when the proxy asks for a user name and password (HTTPProxyUsername and HTTPProxyPassword, which the environment variables cannot carry in a way freshclam reads):

freshclam.conf
HTTPProxyServer proxy.internal.example.com
HTTPProxyPort 3128
HTTPProxyUsername repod
HTTPProxyPassword CHANGE_ME
docker-compose.override.yaml
services:
  backend:
    volumes:
      - ./freshclam.conf:/etc/clamav/freshclam.conf:ro

This file replaces the image's own freshclam.conf: start from a copy of it (docker compose exec backend cat /etc/clamav/freshclam.conf) and add the four lines.


Worked example: Squid with a domain allowlist

Rather than a general-purpose "allow everything" proxy, most regulated environments want an explicit allowlist — only the domains Repod actually needs, nothing else. Squid's dstdomain ACL is the standard tool for this.

1. Allowlist file

squid/allowed_domains.txt
# Security feeds
api.first.org
www.cisa.gov

# ClamAV / Grype update infrastructure — consult their own docs for the
# current full list, these CDN domains do change over time
database.clamav.net
.cvdupdate.clamav.net
grype.anchore.io
toolbox-data.anchore.io

# OS package mirrors — only the ones matching the distributions you serve
archive.ubuntu.com
ports.ubuntu.com        # arm64 packages
security.ubuntu.com
deb.debian.org
security.debian.org
dl-cdn.alpinelinux.org
repo.almalinux.org
dl.rockylinux.org
yum.oracle.com
dl.fedoraproject.org
mirror.stream.centos.org
download.opensuse.org

# Build-tool ecosystems — only if you use "Import from internet" for these
api.osv.dev               # dependency CVE lookup for npm / Maven / PyPI
repo1.maven.org
search.maven.org
pypi.org
registry.npmjs.org
hub.docker.com
registry-1.docker.io
production.cloudflare.docker.com

2. squid.conf

squid/squid.conf
http_port 3128

acl allowed_domains dstdomain "/etc/squid/allowed_domains.txt"
acl repod_net src 172.20.0.0/16   # adjust to your Docker network / server subnet

http_access allow repod_net allowed_domains
http_access deny all

# Standard hardening
via off
forwarded_for delete
request_header_access X-Forwarded-For deny all

3. Run it (standalone, or as a compose overlay)

docker-compose.proxy.yaml
services:
  squid:
    image: ubuntu/squid:latest
    container_name: repod-squid
    ports:
      - "127.0.0.1:3128:3128"   # bind to loopback; only the Repod host should reach it
    volumes:
      - ./squid/squid.conf:/etc/squid/squid.conf:ro
      - ./squid/allowed_domains.txt:/etc/squid/allowed_domains.txt:ro
    restart: unless-stopped
docker compose -f docker-compose.proxy.yaml up -d

Then point backend.env at it:

backend.env
HTTP_PROXY=http://squid:3128
HTTPS_PROXY=http://squid:3128

Put Squid on the backend's Docker network

The docker-compose.proxy.yaml above creates its own network, so the name squid does not resolve from backend. And 127.0.0.1:3128 on the host is not reachable from inside a container either (localhost there is the container). Either attach Squid to the Repod network (add networks: [repod_network] with that network declared external: true, its name is shown by docker network ls), or publish the port on an address the container can reach and use that address.

4. Verify

# From inside the backend container. The image has no curl or wget: use Python,
# which reads HTTP_PROXY / HTTPS_PROXY like the rest of the backend.
docker exec backend-api python3 -c "import urllib.request as u; print(u.urlopen('https://api.first.org', timeout=15).status)"
# Should print 200 (allowlisted)

docker exec backend-api python3 -c "import urllib.request as u; print(u.urlopen('https://example.com', timeout=15).status)"
# Should fail with "Tunnel connection failed: 403 Forbidden" (not on the allowlist)

Watch docker logs repod-squid (or Squid's access.log) while triggering a CVE scan or an "Import from internet" — any legitimately needed domain that gets denied will show up there as TCP_DENIED, letting you extend the allowlist deliberately rather than guessing upfront.


Fully air-gapped (no proxy at all)

If the server truly has no outbound path — not even through a proxy — see Upstream cache for seeding package mirrors via removable media through a relay host, and Air-gapped security data updates to refresh the EPSS/KEV/Grype/ClamAV data the same way, or rely on their local caches for CVE and antivirus data (refreshed manually during a maintenance window with connectivity, if one ever exists — otherwise the pipeline keeps using whatever was cached at deployment time).