Skip to content

SiteConfig

sites is a list where each entry configures one proxy site. Pavonis routes incoming requests to the matching site based on the Host header and path prefix.

Fields

Each site shares the following common fields:

FieldTypeRequiredDescription
idstringNoUnique site identifier used as a log prefix. Auto-generated as site0, site1, etc. if omitted
modeSiteModeYesSite working mode; see enum values below
hoststring | []stringYesBound hostname(s). Can be a single string or a list. Use "*" to match all hosts (wildcard)
self_urlstringDependsExternally accessible URL of this site, in scheme://host format (no path, no trailing /)
path_prefixstringNoPath prefix filter; must start with /. Used to distinguish multiple sites on the same host
ip_pool_strategyIpPoolStrategyNoIP pool outbound strategy for this site, overrides global request.ip_pool.default_strategy. Requires the global IP pool to be enabled
settingsobjectDependsMode-specific configuration; see each mode's documentation

mode Enum

ValueDescription
gh_proxyGitHub asset acceleration
container_registry_singleSingle-target container registry proxy
container_registry_anyAny-target container registry proxy
httpGeneral HTTP reverse proxy
pypiPyPI index mirror
hugging_faceHuggingFace download proxy
speed_testUpload/download speed test

When self_url is Required

self_url must be configured in the following cases:

ConditionReason
mode: container_registry_singleAuth realm URL must be rewritten to point to this site
mode: container_registry_anyAuth realm URL must be rewritten to point to this site
mode: hugging_faceRedirect and Link header URLs must be rewritten
mode: gh_proxy with settings.raw_text_url_rewrite: trueURLs in text content must be rewritten to point to this site

ip_pool_strategy Enum

ValueDescription
noneDo not use the IP pool
randomRandomly select a pool IP
ip_hashPin outbound IP by client IP hash

Routing Priority

  • When multiple sites bind the same host, the site with the longest path_prefix wins
  • A wildcard host (host: '*') has lower priority than exact hostname matches

Configuration Examples

Basic Site

yaml
sites:
  - id: dockerhub
    host: docker.example.com
    mode: container_registry_single
    self_url: https://docker.example.com

Bind Multiple Hostnames

yaml
sites:
  - id: ghproxy
    host:
      - gh.example.com
      - gh2.example.com
    mode: gh_proxy

Same Host, Multiple Path Prefixes

yaml
sites:
  - host: proxy.example.com
    mode: pypi
    path_prefix: /pypi

  - host: proxy.example.com
    mode: speed_test
    path_prefix: /speedtest

  - host: proxy.example.com
    mode: http
    path_prefix: /cf
    settings:
      destination: https://speed.cloudflare.com

Per-Site IP Pool Strategy

yaml
sites:
  - host: docker.example.com
    mode: container_registry_single
    self_url: https://docker.example.com
    ip_pool_strategy: ip_hash

  - host: hf.example.com
    mode: hugging_face
    self_url: https://hf.example.com
    ip_pool_strategy: random