Every endpoint here needs a superadmin session, with two exceptions:
GET /api/proxies works
for any signed-in user (the record editor uses it), and the Traefik endpoint takes the connect key
or a proxy’s own token. See API overview for how to authenticate.Settings and proxies
Routes, routers, services and middlewares
Entry points. Under dnz-proxy,
routes/entry-points lists the proxy’s own entry points. Under
Traefik it lists the ones its API lists. from says which (dnz-proxy / traefik). Without either,
it offers web (:80) and websecure (:443). http and https are the ones on port 80 and 443 that
a new route uses.
One-step routes. In POST /api/proxies/{id}/routes, http_entry_point and https_entry_point
default to the http and https entry points above.
Auth users. POST /api/proxy/auth-user with {"user", "password"} returns {"line"} for basic
auth. Add "digest": true and an optional "realm" for digest auth.
Checks and DNS
Records from Traefik’s routers
A host has
host, zone_id, zone, routers, records (how many DNZ keeps) and status:
Traefik’s HTTP provider
Objects
A proxy
- Leave
traefik_api_passwordout to keep the stored one;nullremoves it. - Add
"connects_from": "10.0.0.12"to set the address the Traefik calls DNZ from. Leave it out to keep the current one, or sendnullto recognize the Traefik byipv4/ipv6again.
A router
matchersare conditions such as{"kind": "Header", "name": "X-Env", "values": ["prod"], "not": false}.kindisPath,PathPrefix,PathRegexp,Method,Header,HeaderRegexp,Query,QueryRegexporClientIP;nameis the header or query parameter.extra_ruleis Traefik rule syntax.optionsholdstls.options,tls.domainsandobservability, in Traefik’s shape.
A service
serversmay also be plain URLs (weight 1). A server can add"preserve_path": true.kindisloadBalancer(the default),weighted,mirroringorfailover.optionshold the rest in Traefik’s shape. For a load balancer:healthCheck(besidespathandinterval),sticky.cookie(besidesname),passiveHealthCheckandresponseForwarding. For the others, the whole service:
A middleware
kindis its Traefik type (redirectScheme,headers,chain, …; the setup’skindslists them), orrawfor any other.configholds exactly that one type.- The first kinds (
redirect_https,basic_auth,strip_prefix,ip_allow_list,rate_limit) are still accepted. - A chain’s
middlewaresand an error-pagesserviceare names in the same proxy.
Objects: TLS, transports, TCP and UDP
TLS, transports, TCP and UDP are objects under/api/proxies/{id}/objects:
{"kind", "name", "config"}, with config in Traefik’s shape.
Names of other objects go as they are (
name@provider for another provider’s). Unknown fields are
refused.
The setup lists certificates without keyFile, with has_key and info (names, validity, issuer).
Proxying records
On records,proxies puts an A, AAAA or CNAME record behind one or more proxies ([1, 3]); [] is
DNS only. Each proxy needs a router for the record’s name. The bulk API’s set_proxies moves a name’s
records at once. See Records API.