nginx-proxy-manager/backend/lib/access
Tom Winnerl 6bd369299a feat(upstreams): discovery, reachability check and health monitor
New /api/upstreams endpoints that help picking and watching forward hosts:

- GET /upstreams/candidates suggests upstreams from three sources: hosts
  already used by other proxy hosts/streams, containers found through
  Docker's embedded DNS on the networks NPM is attached to
  (NPM_DNS_DISCOVERY, on by default) and, opt-in, containers from the
  Docker API (NPM_DOCKER_DISCOVERY + DOCKER_HOST, e.g. a docker-socket-proxy).
- POST /upstreams/check resolves a host with the same resolver nginx uses
  and opens a TCP connection to the port, returning a status code
  (ok, dns_not_found, tcp_refused, ...) and the round trip time. Checks
  are rate limited per user and can be turned off with NPM_UPSTREAM_CHECK=false.
- GET /upstreams/health returns the results of a background monitor that
  checks the targets of all enabled hosts every NPM_UPSTREAM_HEALTH_INTERVAL
  seconds (default 60, 0 turns it off). It shows the hosts the proxy host
  and stream lists show the user (with proxy hosts shared through
  permissions.meta.proxy_host_ids). The monitor starts with the backend
  and stops on SIGTERM.

Access is controlled by the new upstreams:discover permission (users who may
manage proxy hosts or streams); access.can() gets a quiet option so this
lookup doesn't log a denial for every request. The OpenAPI schema
documents the three paths and their result objects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 09:03:56 +01:00
..
access_lists-create.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
access_lists-delete.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
access_lists-get.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
access_lists-list.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
access_lists-update.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
auditlog-list.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
certificates-create.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
certificates-delete.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
certificates-get.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
certificates-list.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
certificates-update.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
dead_hosts-create.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
dead_hosts-delete.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
dead_hosts-get.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
dead_hosts-list.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
dead_hosts-update.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
logs-list.json feat: Add a Logs viewer to the admin UI 2026-09-22 13:11:38 -03:00
permissions.json Openapi Schema improvements 2024-10-10 15:53:11 +10:00
proxy_hosts-create.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
proxy_hosts-delete.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
proxy_hosts-get.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
proxy_hosts-list.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
proxy_hosts-update.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
redirection_hosts-create.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
redirection_hosts-delete.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
redirection_hosts-get.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
redirection_hosts-list.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
redirection_hosts-update.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
reports-hosts.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
roles.json Openapi Schema improvements 2024-10-10 15:53:11 +10:00
settings-get.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
settings-list.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
settings-update.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
streams-create.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
streams-delete.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
streams-get.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
streams-list.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
streams-update.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
upstreams-discover.json feat(upstreams): discovery, reachability check and health monitor 2026-11-14 09:03:56 +01:00
users-create.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
users-delete.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
users-get.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
users-list.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
users-loginas.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
users-password.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
users-permissions.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
users-update.json v2.1.0 (#293) 2020-02-19 15:55:06 +11:00