This commit is contained in:
Mateusz Gruszczyński committed 2026-11-14 17:24:12 +01:00
1 parent 78dbb31487
commit f48843e934
83 files changed
+7304 -1203

No files matched your search

+2
View File
@@ -5,6 +5,8 @@ Access control can be configured globally, on a Vhost and on selected Custom loc
## Global block / allow policy
**Settings → Rules & headers → Global block / allow** applies to public HTTP traffic across all vhosts, redirects and not-found hosts before upstream access. In addition to the existing User-Agent deny patterns, use the global country block/allow list (ISO two-letter codes), client IP/CIDR and allow-only DNS ACL, HTTP method policy, request Content-Type denylist and shared per-IP rate limit. All are disabled by default except previously configured User-Agent blocking. An explicit IP allow does **not** bypass the country policy: both must permit a request. Missing GeoIP country is allowed for country block mode and denied for country allow mode.
The page starts with a **status bar** listing every rule (country access, User-Agent blocklist, IP/CIDR and DDNS access, HTTP methods, Content-Type and shared rate limit) with its current state (*off*, *on*, *block list*, *allow list*); click an entry to jump to its section. Each section heading shows the same badge, and a section that is off hides its fields until it is switched on. **Countries** are chosen from a searchable list (ISO code and country name in the panel language); typing a name or a two-letter code and pressing Enter adds it.
Global restrictions add to per-vhost and path rules. Rate-limit requests are counted for each client IP **across** vhosts. Prefer a conservative shared ceiling to avoid blocking shared NAT clients. A global method denial returns 405, the content-type/ACL/UA policy returns 403, and the shared rate limiter returns 429 with `Retry-After`. Admin and TCP/UDP stream listeners are outside this HTTP scope. For global response headers, use the adjacent **Security headers** subtab; see [Security](SECURITY.md).
## IP, country and DDNS rules
+9 -2
View File
@@ -21,6 +21,7 @@ The current bundled `src/admin/openapi.json` declares these operations (among ot
| `GET /api/config/history` · `POST /api/config/history/restore` | Review/restore retained configuration snapshots. |
| `GET /api/status` · `GET /api/backends` | Operational status and backend observations. |
| `GET /api/cache` · `POST /api/cache/purge` · `POST /api/cache/invalidate` | Cache observations and authenticated invalidation. `GET` supports the lightweight `view=live` polling view. |
| `GET /api/cache/rules/stats` · `POST /api/cache/rules/test` · `POST /api/cache/rules/import-vcl` | Cache rule match counters, simulation of saved or draft rules for a test request/response, and conversion of a VCL subset into rules (nothing is saved). See [Cache rules](CACHE.md#cache-rules-vcl-style). |
| `GET /api/transform` | Transform observations and resource usage. Supports the lightweight `view=live` polling view. |
| `GET /api/logs` · `GET /api/live-logs` | Recent and streaming request logs. |
| `GET /api/file-logs` · `GET /api/file-logs/query` | Stored-log exploration. |
@@ -47,12 +48,16 @@ The administration listener is HTTP on loopback (`127.0.0.1:9090`) by default an
| Credential | Scope |
|---|---|
| Browser session | Full administration. HttpOnly, SameSite=Strict cookie (Secure on HTTPS), absolute lifetime 7–30 days. Writes require matching Origin, `X-CSRF-Token` and `X-RustProxy-Request: 1`. |
| General API token (`ro` / `rw`) | Created in **Settings → Security → API tokens**. Displayed once, stored as a hash, bound to a mandatory IP/CIDR allowlist. Sent as `Authorization: Bearer <token>`. `ro` reads resources and sections; `rw` also writes configuration sections and selected operations. Cannot manage authentication, backups, tokens or certificate credentials. |
| General API token (`ro` / `rw`) | Created in **Settings → Security → API tokens** (see [API tokens in the panel](#api-tokens-in-the-panel)). Displayed once, stored as a hash, bound to a mandatory IP/CIDR allowlist. Sent as `Authorization: Bearer <token>`. `ro` reads resources and sections; `rw` also writes configuration sections and selected operations. Cannot manage authentication, backups, tokens or certificate credentials. |
| Certificate API key | Key ID + Bearer token limited to specific certificate IDs and actions (reload by default, deploy opt-in). |
| Prometheus token | Scrape-only credential for the separate exporter; see [Monitoring](MONITORING.md). |
IP checks use the transport peer, never forwarded headers. Outside loopback, Bearer credentials require administration HTTPS.
### API tokens in the panel
**Settings → Security → API tokens** lists the tokens first (ID, RO/RW badge, description, allowed addresses, created / last used, **Revoke token**). **New token** opens an editor with a description, the permission as two choices (*Read only* / *Read and write*) and **Allowed source addresses** entered as chips: type an IP or CIDR and press Enter; a single address becomes `/32` or `/128`, invalid entries are rejected before saving (at most 32). The token is shown once in a highlighted box with **Copy**; RustProxy stores only its hash. Tokens cannot be edited — revoke and create a new one to change the permission or addresses.
### `/docs` Reader and Swagger
The authenticated `/docs` page has two tabs: **Reader** with the guides embedded at build time, and **API** with the bundled OpenAPI schema rendered by Swagger UI. All assets are served locally; no CDN is used. Swagger uses the current session, executes read calls directly and asks for confirmation before any write.
@@ -145,7 +150,9 @@ Run CLI commands as an authorized local operator with the correct private data d
## Restricted Certificate API credentials
**Settings → Certificate API** can create credentials containing a **Key ID + Bearer token** with explicit certificate-ID grants. New keys default to reload-only; deploy permission is separate. The clear token is displayed at creation/rotation and is not a general admin API token.
For the panel workflow (permissions, certificate picker, legacy `*` keys) see [Certificates → Restricted certificate API](CERTIFICATES.md#restricted-certificate-api); for an OPNsense example see the [OPNsense ACME client integration](../integrations/opnsense-acme/README.md).
**Settings → Certificate API** can create credentials containing a **Key ID + Bearer token** with explicit certificate-ID grants. New keys default to reload-only; deploy permission is separate. The clear token is displayed at creation/rotation and is not a general admin API token. In the panel, **New key** opens an editor with *Reload only* or *Deploy and reload* and a searchable certificate picker; for deploy keys a not yet stored certificate ID can be typed in, and the first deploy creates it. `*` (all certificates) cannot be saved; keys migrated with `*` keep working until edited, and the editor then asks for explicit certificates.
An authorized client sends:
+20
View File
@@ -3,6 +3,8 @@
RustProxy provides an optional shared HTTP response cache with a bounded in-memory **HOT** tier and optional persistent-disk **COLD** tier. Both the global cache and a Vhost's effective policy must permit caching. **COLD storage is disabled by default**, and newly created Vhosts do not automatically cache dynamic content.
### Cache controls in Settings
The **Rules** subtab holds the conditional cache rules described in [Cache rules (VCL-style)](#cache-rules-vcl-style).
The static-extension cookie-bypass warning sits with its extension list, separate from **Cache response headers** options. Only enable this optimization for files whose bytes do not depend on the user's session. `Cookie` can then be omitted from the shared cache key for the configured extensions; responses with `Set-Cookie`, `private`, `no-store` or `Vary: Cookie` remain uncacheable.
## Enable caching safely
@@ -51,6 +53,24 @@ With the policy enabled, the middle request stays `HIT` if the entry is fresh. C
In **Vhosts → Cache**, overrides for static extensions, bypass path prefixes and unsafe force targets each place the enable/override checkbox immediately above the associated multiline list. The fields are disabled while their individual override is off; their saved values and cache policy are unchanged. Never enable unsafe forced caching for personalized responses.
## Cache rules (VCL-style)
**Settings → Cache → Rules** holds global rules; **Vhosts → Cache → Cache rules for this vhost** holds rules for one vhost. They are built graphically ("If … Then …") and replace the most common Varnish VCL snippets without a scripting language.
| Stage | VCL equivalent | Conditions | Actions |
|---|---|---|---|
| Request | `vcl_recv`, `vcl_hash` | host, URL, path, extension, method, query parameter, request header, cookie, client IP | bypass cache (`pass`), remove cookies (all or all except listed), remove query parameters (list with `*`, or keep only listed), add a header or cookie value to the cache key |
| Backend response | `vcl_backend_response` | the request conditions plus status (`200`, `4xx`, `500-599`), Content-Type, response header | set TTL, set grace, do not store, ignore backend `Cache-Control`/`Expires`, remove `Set-Cookie` |
| Deliver | `vcl_deliver` | the request and response conditions | set or remove a response header |
- Rules run top to bottom (drag to reorder). Each rule matches when all (or any) of its conditions match; a rule without conditions matches every request. *Stop evaluating later rules* ends the stage, like `return` in VCL.
- Vhost rules run before global rules. A global rule can be limited to selected vhosts. For TTL, grace, bypass and *do not store*, the first matching rule wins: the vhost editor and the global list show which rules override others, and the tester lists every overridden action. *Ignore global cache rules* switches global rules off for that vhost.
- Request rules change the request like VCL does: removed cookies and query parameters are also not sent to the backend. Values added to the cache key create separate variants (for example one per `lang` cookie).
- Safeguards stay in place: only GET/HEAD without a body are cached, `Authorization`, Basic Auth, login providers and sticky sessions still bypass the cache, and a response with `Set-Cookie` is never stored unless a rule removes it. *Ignore backend Cache-Control* keeps the original header for the browser; it only changes what RustProxy stores.
- **Test a request** checks the rules on screen (including unsaved edits) against a sample URL, headers, client IP and backend response, and shows the decision, cache key, TTL/grace, matched and overridden rules. **Import VCL** converts supported statements from `vcl_recv`, `vcl_hash`, `vcl_backend_response`/`vcl_fetch` and `vcl_deliver` (`if`/`elsif`/`else`, `~`, `!~`, `==`, `!=`, status comparisons, `return (pass)`, `unset req.http.Cookie`, query-parameter `regsuball` on `req.url`, `hash_data(req.http.X)`, `beresp.ttl`, `beresp.grace`, `beresp.uncacheable`, `unset beresp.http.Set-Cookie`, `set/unset resp.http.X`); everything else is listed as a warning. **Copy as VCL** shows the equivalent VCL (read-only).
- Limits: 128 rules per list, 16 conditions and 16 actions per rule, regular expressions with linear-time matching. Match counters live in memory (reset on restart) and are exported as `rust_proxy_cache_rule_matches_total{origin,vhost,rule}` when the *Domains and effectiveness* metric group is enabled.
- Rules apply to Reverse Proxy vhosts (including Docker vhosts) while the cache is active for the route; built-in web server sources are not affected.
## Stored object rules
- Reuse is scoped by frontend scheme, Host, exact client URL, Vhost/content policy and eligible `Vary` dimensions. HTTP and HTTPS objects do not cross-share.
+10 -2
View File
@@ -63,7 +63,7 @@ When another service owns the certificate, add a manual certificate with the act
### One vhost, several certificates (SNI selection)
A vhost normally uses one certificate for all of its names. When a single vhost serves domains that have **different** certificates (for example several `autodiscover.<domain>` names, each with its own certificate), leave the vhost certificate on **Global SNI / default certificate**. RustProxy then picks the certificate for every TLS connection by the requested server name (SNI) from the stored certificates whose **SNI names** include it. Wildcard names match one label (`*.example.com` matches `a.example.com`, not `a.b.example.com`).
A vhost normally uses one certificate for all of its names. When a single vhost serves domains that have **different** certificates (for example several `autodiscover.<domain>` names, each with its own certificate), leave the vhost certificate on **Global SNI / default certificate**. RustProxy then picks the certificate for every TLS connection by the requested server name (SNI) from the stored certificates whose **SNI names** include it. Wildcard names match one label (`*.example.com` matches `a.example.com`, not `a.b.example.com`). When no SNI name matches, RustProxy also checks the names each stored certificate really covers (its DNS SAN entries), preferring the certificate with the fewest names, before it falls back to the default certificate; so `app.apps.example.com` gets a `*.apps.example.com` certificate even when only `*.example.com` is listed in SNI names.
1. Open **Certificates**, edit the certificate and open **Existing files / advanced**.
2. Check **SNI names**: it is filled automatically from the certificate's SAN entries and can be edited.
@@ -88,7 +88,15 @@ Keep the original Certbot renewal system and use the RustProxy certificate reloa
### Restricted certificate API
Create an appropriately scoped credential in **Settings → Certificate API**. Its allowed certificate IDs and action permissions control **reload** or **deploy**; it is not a general administration token. A caller supplies both a Bearer credential and its configured `X-RustProxy-Certificate-Key` ID. Use HTTPS outside local/trusted transport and never store the clear token in the repository. See [Administration API](API.md).
Create an appropriately scoped credential in **Settings → Certificate API**. Its allowed certificate IDs and action permissions control **reload** or **deploy**; it is not a general administration token. A caller supplies both a Bearer credential and its configured `X-RustProxy-Certificate-Key` ID. Use HTTPS outside local/trusted transport and never store the clear token in the repository. See [Administration API](API.md#restricted-certificate-api-credentials).
The tab lists the existing keys first: permission badge (*reload only* or *deploy + reload*), the allowed certificates as chips (a dashed chip is an ID that is not stored yet), creation and last-use time, and the actions **Edit**, **Regenerate token** and **Revoke token**.
- **New key** opens the editor: Key ID, comment, the permission as two choices — **Reload only** for Certbot/acme.sh hooks that write the PEM files themselves, **Deploy and reload** for automation that uploads certificate and key (for example the [OPNsense ACME client integration](../integrations/opnsense-acme/README.md)) — and **Allowed certificates**, chosen in the same searchable picker as elsewhere in the panel (it shows the host names of every stored certificate).
- For deploy keys, type a new ID in the picker and press Enter: the first deploy creates that certificate. Certificates managed by RustProxy ACME are marked *reload only*; a deploy to them is refused (409).
- A custom token is optional (*Custom token*); otherwise a strong token is generated. The token appears once in a highlighted box with **Copy**. **Edit** never changes the token.
- `*` (all certificates) can no longer be saved. Keys migrated from versions before 0.28.2 may still carry `*`; they keep working, are marked in the list, and the editor asks for explicit certificates when the key is edited. Saving an empty list, more than 32 IDs, `*` or an ID with characters other than letters, digits, `-` and `_` is rejected with *Certificate API keys need 1-32 explicit certificate IDs*.
- The collapsible *Usage example (curl)* shows the reload and deploy calls for the key being edited.
## Problems to check
+11
View File
@@ -86,10 +86,21 @@ On upgrade, older JSON, database rows, backups and revision history containing a
## Cache and transforms
Global cache rules are stored in `cache.rules`, vhost rules in the vhost `cache.rules` with `cache.ignore_global_rules`; see [Cache rules](CACHE.md#cache-rules-vcl-style).
Caching is opt-in. HOT holds bounded memory entries; COLD is an optional disk tier (off by default). Freshness follows eligible HTTP policy and `Vary`; private/no-store responses and protected requests are not shared. Configuration saves selectively invalidate only the affected cached responses. HTTP BAN/PURGE is **disabled by default** and uses an explicit source-IP allowlist. See [Cache](CACHE.md).
Response transformations are optional and apply only to configured eligible MIME types and scopes. See [Response delivery](RESPONSE_DELIVERY.md) for codec defaults, transformation limits and header precedence. Content rewriting can affect validators, compression and cache entries; test actual representations after configuration changes.
## Settings pages
- Cards that mix live and restart-only settings (*Administration*, *Prometheus*) show **LIVE + RESTART** in the header and a **RESTART** badge on exactly the fields that need a restart; everything else applies when saved.
- Long help texts are shortened to two lines; click (or press Enter on) a help text to expand it.
- The save button of every settings form stays visible at the bottom of the window while you scroll and shows *Unsaved changes* after an edit; the settings tab is marked as well.
- Lists of credentials (Certificate API keys, API tokens) and addresses (API tokens, Prometheus scrapers) use the same list-first layout and chip inputs; see [Certificates](CERTIFICATES.md#restricted-certificate-api) and [API](API.md#api-tokens-in-the-panel).
- Global block / allow and listener pages are described in [Access](ACCESS.md#global-block--allow-policy) and [Transport](TRANSPORT.md#frontend-listeners); conditional cache rules in [Cache](CACHE.md#cache-rules-vcl-style).
- **System information** is a read-only diagnostic page (host, CPU/load/RAM/descriptors, RustProxy process memory and budgets, network interfaces, certificate toolchain, data paths, *Copy diagnostics*); see [Monitoring](MONITORING.md#system-information).
## Administration preferences
Appearance settings, Dashboard Presets and Overview cards belong to the administrator profile. **Settings → Appearance → Interface** also includes the default-on stable dialog position option, which keeps editor dialogs anchored near the top while tab content changes height; disabling it restores vertical centering. **Settings → Appearance → Data refresh** keeps the automatic-refresh toggle separate from four intervals arranged in two equal columns (one on narrow screens). The saved corner style (Square, Subtle, Rounded or Extra) applies to controls and surfaces in the main panel and the authenticated Reader/OpenAPI page. **Original** keeps the legacy appearance. Up to 16 named presets can store card visibility, order, widths, density and sample count. Changing the dashboard does not restart proxy listeners or rewrite routing rules. Source sections under `config` have a revision guard to prevent accidental overwrite by a stale editor.
+9 -1
View File
@@ -25,7 +25,7 @@ Optional quick-health tiles (since 0.35.2, hidden by default; enable them in the
Enabled tiles are added at the end of the Overview, so the standard block layout does not change.
Optional Docker cards (since 0.37.0, hidden by default): **Docker agents**, **Docker apps**, **Docker app requests**, **Docker hosts network**, **Docker hosts load** and **Containers**. They summarize agent connectivity, published Docker vhost health and traffic, and the host diagnostics reported by Docker/Podman agents 0.37.0+; With several agents each card can show all agents or one selected agent; see [Docker discovery](DOCKER_DISCOVERY.md#overview-cards).
Optional Docker cards (since 0.37.0, hidden by default): **Docker agents**, **Docker apps**, **Docker app requests**, **Docker hosts network**, **Docker hosts load** and **Containers**. They summarize agent connectivity, published Docker vhost health and traffic, and the host diagnostics reported by Docker/Podman agents 0.37.0+. The hidden-cards lists show each Docker card type once; with several agents choose the agent next to it before adding, and add the same type again (up to four copies) for other agents. A visible copy shows the selected agent in its title; see [Docker discovery](DOCKER_DISCOVERY.md#overview-cards).
In the **Backends** table with **Table density: Ultra compact**, the backend name line under each vhost is hidden to save space; hover the vhost name (dotted underline) to see the vhost and backend names in a tooltip.
@@ -57,6 +57,14 @@ Controls whose label is already a single symbol (`×`, `−`, `+`, `←`, `→`,
Under **Settings → Appearance → Interface**, enable **Animate logo** to let the sidebar `r/p` logo play a short, subtle effect (rotating slash, letter flip, wave, glow, sheen, glitch or wobble) at random intervals of roughly 10–25 seconds and when the pointer moves over it. The preference is stored per administrator as `logo_animation: true|false` in `/api/preferences` and is **off by default**. Animations pause while the browser tab is hidden and are suppressed entirely when the operating system or browser requests reduced motion.
### Interface scale and dialogs
**Settings → Appearance → Interface scale** shrinks or enlarges the whole panel. Dialogs (vhost and redirect editors, logs, configuration history, About, help) keep their on-screen size at every scale and only their content is scaled, so a smaller scale shows more content instead of a smaller window. Layout sizes based on the browser window are corrected for the scale as well.
### Corner style
The **Corner style** setting (Original, Square, Subtle, Rounded, Extra) also applies to newer controls such as key and token lists, chips, status badges, container meters, listener cards, the rule status bar and cache-rule cards.
### Stable dialog position
Under **Settings → Appearance → Interface**, **Keep dialogs at a stable top position** is **on by default**. It anchors primary panel dialogs near the top of the viewport, so switching between editor tabs whose contents have different heights does not make the dialog jump vertically. The account preference is `stable_dialog_position: true|false` in `/api/preferences`; turning it off restores the browser's vertically centered dialog behavior. The setting changes only panel presentation and does not affect proxy configuration or editor data.
+6 -6
View File
@@ -46,7 +46,7 @@ Go 1.22+ is required only for the manual build, not for a DEB/RPM installation.
### Domains
An agent has a list of DNS suffixes (`domains`, up to 16), picked in the same searchable multi-select as ACL profiles; type a new domain in the search box and press Enter to add it. Suggestions come from other agents and from wildcard certificates. Every published Docker vhost selects its **master domain** from this list (default: the first domain), so a newly published service is reachable immediately as `<container-name>.<master domain>`. **Aliases** may be short labels (expanded below the master domain, or below another agent domain chosen next to the alias input) or full names, which the panel only accepts inside one of the agent domains. Configurations from before 0.37.0 with a single `base_domain` are migrated to `domains: [base_domain]` on the next save; nothing else changes.
An agent has a list of DNS suffixes (`domains`, up to 16), picked in the same searchable multi-select as ACL profiles; type a new domain in the search box and press Enter to add it. Suggestions come from other agents and from wildcard certificates. Every published Docker vhost selects its **master domain** from this list (default: the first domain), so a newly published service is reachable immediately as `<container-name>.<master domain>`. The ★ button on a domain in the picker makes it the master domain. **Aliases** may be short labels (expanded below the master domain, or below another agent domain chosen next to the alias input, which lists the master domain only once) or full names, which the panel only accepts inside one of the agent domains. Configurations from before 0.37.0 with a single `base_domain` are migrated to `domains: [base_domain]` on the next save; nothing else changes.
### Certificates
@@ -57,7 +57,7 @@ A previously selected single `certificate_id` is migrated to `certificate_ids: [
### Default backend IP
The agent default backend IP is chosen from the **addresses the agent detected** (interface, scope and source are shown) or entered as **Custom address…**. *Automatic* keeps the per-service choice (bind address, primary IP, detected addresses). The list fills after the first successful poll.
The agent default backend IP is chosen from the **addresses the agent detected** or entered as **Custom address…**. The list is grouped into *Recommended* (primary route, public address or `RUSTPROXY_DOCKER_ADVERTISE_IP` override, the primary one marked ★), *Other host interfaces* and, from agent 0.37.1, *Container bridges* (`docker0`, `br-*`, `podman*`, `cni-*`, `virbr*`), which are reachable only when RustProxy runs on the same host. *Automatic* keeps the per-service choice (bind address, primary IP, detected addresses). The list fills after the first successful poll.
### Host diagnostics
@@ -86,19 +86,19 @@ services:
rustproxy.force_ssl: "true"
```
Also supported: `rustproxy.websockets`, `rustproxy.cache`, `rustproxy.compression` and `rustproxy.preserve_host` (`true`/`false`). Labels never leave the agent domains, never take a name already used by a vhost, redirect, 404 host or another Docker service and never override a manual setting for the same service. Invalid labels produce a **LABEL ERROR** badge and an alert instead of a vhost. Label publications use the agent defaults (listeners, certificates, ACL profiles, default backend IP). To customise one, open it and press **Apply changes** (it becomes a manual setting); switching **Publish** off stores a disabled manual override. Labels are read only from agents 0.37.0+. The option is off by default because anyone who can start containers on that host can then publish names inside the agent domains.
Also supported: `rustproxy.websockets`, `rustproxy.cache`, `rustproxy.compression` and `rustproxy.preserve_host` (`true`/`false`). Labels never leave the agent domains, never take a name already used by a vhost, redirect, 404 host or another Docker service and never override a manual setting for the same service. Invalid labels produce a **LABEL ERROR** badge and an alert instead of a vhost. Label publications use the agent defaults (listeners, certificates, ACL profiles, default backend IP). To customise one, open it and press **Apply changes** (it becomes a manual setting); switching **Publish** off stores a disabled manual override. Labels are read only from agents 0.37.0+. The **?** button next to the option opens the label reference with a `docker compose` example. The option is off by default because anyone who can start containers on that host can then publish names inside the agent domains.
### Container state and history
Agents 0.37.0+ report per published container its state and health check, CPU usage, memory (without page cache) with its limit and restart count; the service row shows them and Prometheus exports `rust_proxy_docker_container_*`. Containers whose image defines no `HEALTHCHECK` are shown as *no health check* (`health: "none"`) and are judged only by their state (running is fine; restarting, exited or dead raise an alert). The small CPU, memory, load and network charts in **Agent details** are sampled in the browser from the agent polls while the page is open, like the other panel charts; RustProxy does not store history.
Agents 0.37.0+ report per published container its state and health check, CPU usage, memory (without page cache) with its limit and restart count; the service row shows them as separate chips — state with uptime (green when running), health check, CPU and RAM with a fill bar against the memory limit (amber from 75 %, red from 90 %) and restarts (amber above zero) — and Prometheus exports `rust_proxy_docker_container_*`. Containers whose image defines no `HEALTHCHECK` are shown as *no health check* (`health: "none"`) and are judged only by their state (running is fine; restarting, exited or dead raise an alert). The small CPU, memory, load and network charts in **Agent details** are sampled in the browser from the agent polls while the page is open, like the other panel charts; RustProxy does not store history.
### Test connection and one-time codes
**Test connection** in each agent runs one inventory request with the values in the form, before saving. `sudo rustproxy-docker-agent provision-code` prints a **one-time code** by default: it holds the endpoint, the certificate pin and a single-use enrollment secret valid for 15 minutes (`--ttl 1h` to change), not the token. When you paste it, RustProxy connects to the agent over the pinned HTTPS connection, redeems the secret and fills in the permanent token; the code cannot be used again. The agent service must be running. `provision-code --static` prints the previous reusable code that contains the token (also needed for plain-HTTP agents).
**Test connection** (next to *Remove* in each agent) runs one inventory request with the values in the form, before saving, and shows the result in a bubble below the button. `sudo rustproxy-docker-agent provision-code` prints a **one-time code** by default: it holds the endpoint, the certificate pin and a single-use enrollment secret valid for 15 minutes (`--ttl 1h` to change), not the token. When you paste it, RustProxy connects to the agent over the pinned HTTPS connection, redeems the secret and fills in the permanent token; the code cannot be used again. The agent service must be running. `provision-code --static` prints the previous reusable code that contains the token (also needed for plain-HTTP agents).
### Overview cards
Six optional Overview cards (hidden by default; enable them in the Overview layout editor or **Settings → Appearance → Dashboard layout**): **Docker agents** (connected/enabled), **Docker apps** (published vhosts with a healthy backend, down, checking, missing and discovered services), **Docker app requests** (request rate across all Docker vhosts with a chart), **Docker hosts network** (combined host RX/TX rate with a chart), **Docker hosts load** (CPU/memory bars and load per host) and **Containers** (running/total, images, Docker/Podman host count). They read the compact `docker` object in `/api/status` and the live view. Every card exists four times (*Docker hosts load*, *Docker hosts load #2* … *#4*, likewise for the others), so you can place the same card once per agent next to each other. With two or more agents each card has an agent selector — **All agents** or a single agent — so you can monitor agents separately or together. The selector is shown in the card and next to the card in the hidden-cards list of the layout editors, so the agent can be chosen when the card is added. The choice is stored per administrator (`docker_widget_agents` in `/api/preferences`); a card whose agent was removed falls back to all agents.
Six optional Overview cards (hidden by default; enable them in the Overview layout editor or **Settings → Appearance → Dashboard layout**): **Docker agents** (connected/enabled), **Docker apps** (published vhosts with a healthy backend, down, checking, missing and discovered services), **Docker app requests** (request rate across all Docker vhosts with a chart), **Docker hosts network** (combined host RX/TX rate with a chart), **Docker hosts load** (CPU/memory bars and load per host) and **Containers** (running/total, images, Docker/Podman host count). They read the compact `docker` object in `/api/status` and the live view. Every card type can be added up to four times, so you can place the same card once per agent next to each other. The hidden-cards lists (layout editors and **Settings → Appearance**) show each type once: with two or more agents choose **All agents** or one agent next to it and add it; the next free copy is used. A visible card keeps its agent selector, and its title shows the selected agent instead of *#2–#4*. The choice is stored per administrator (`docker_widget_agents` in `/api/preferences`); a card whose agent was removed falls back to all agents.
The self-signed certificate is persistent. RustProxy pins its exact fingerprint; if replaced, update the pin. A trusted CA-issued certificate can use normal CA and hostname verification instead. Plain HTTP is available only by explicit opt-out and exposes the token in transit.
+2 -1
View File
@@ -66,6 +66,7 @@ RustProxy is a single service that combines a reverse proxy, a static/PHP web se
- Shared HTTP cache with a memory tier (HOT) and an optional disk tier (COLD).
- RFC 9111 freshness, validators and `Vary`; stale-while-revalidate, stale-if-error and request coalescing.
- Varnish-compatible policy option, forced caching rules and per-location cache switches.
- Graphical [cache rules](CACHE.md#cache-rules-vcl-style) in the spirit of VCL (bypass, cookies, query parameters, cache-key variants, TTL/grace, headers) per vhost and globally, with a request tester and VCL import.
- RFC 9211 `Cache-Status` and optional `X-Cache` diagnostics.
- Purge and ban from the panel, the API or HTTP PURGE/BAN from allowlisted addresses.
- Live compression with gzip, Brotli, Zstandard and deflate.
@@ -103,7 +104,7 @@ RustProxy is a single service that combines a reverse proxy, a static/PHP web se
- Panel served on a separate, loopback-only listener by default; optional HTTPS for remote administration.
- Single administrator with Argon2 password, session revocation and CSRF/Origin protection.
- Complete REST API described by a bundled OpenAPI schema with Swagger UI at `/docs`.
- Scoped `ro`/`rw` API tokens bound to IP allowlists.
- Scoped `ro`/`rw` API tokens bound to IP allowlists, and certificate-only API keys for ACME automation (for example the [OPNsense ACME client](../integrations/opnsense-acme/README.md)).
- Command-line tools for setup, configuration, certificates, backups and live logs.
See the [screenshots](SCREENSHOTS.md) for a visual tour and the [documentation index](README.md) for detailed guides.
+16 -3
View File
@@ -18,18 +18,31 @@ Vhost and Docker Vhost live request-rate charts use a **recent-traffic adaptive
Overview allows account-specific card layout and history controls; see [Dashboard](DASHBOARD.md). GeoIP/country analytics depend on the installed/update database and whether country capture is enabled.
**Settings → System information** shows the operating-system/hardware snapshot and **Statistics source**. The old dedicated process-information block is no longer displayed there; this is a panel presentation change only. Process CPU/RAM and related measurements continue to be available in the Overview and authenticated metrics APIs where supported. **Settings → Appearance → Data refresh** stores the per-account refresh intervals; switching off automatic refresh does not disable manual refresh.
### System information
**Settings → System information** is a read-only diagnostic page built from `GET /api/system-info`:
| Block | Contents |
|---|---|
| Host card | Operating system as the title, environment (for example Docker), architecture, kernel, logical CPUs, RAM, swap, host uptime and RustProxy uptime. **LIVE** / **MANUAL** shows whether automatic refresh is on; **Copy diagnostics** copies a plain-text report (host, process, budgets, network, certificate tools, paths) for bug reports, and **Refresh now** fetches a new sample. |
| Tiles | System CPU and RustProxy CPU with short history lines, load average (1/5/15 min against the number of CPUs), RAM used/total with the RustProxy share, and file descriptors/limit with the OS thread count. |
| RustProxy process | Resident memory (RSS) split into HOT cache, transient cache buffers, anonymous and file-backed memory; HOT/transient/transform budgets with usage bars; process start, virtual memory, swap, disk read/written and the cgroup limit. |
| Network | Active interfaces with RX/TX per second and totals, idle interfaces folded away, and an RX/TX history line. |
| Certificate toolchain | Python → pip → Certbot versions (green when available, red when missing), the managed/system mode and the managed environment path with **Copy**. |
| Data locations | Data directory and SQLite database path with **Copy**, and the metric sources used on this platform. |
Unavailable values are shown as N/A and never estimated. The short history lines are kept only in the open browser tab (they reuse Overview samples when available) and are not stored by RustProxy, so the page adds no server memory. **Settings → Appearance → Data refresh** stores the per-account refresh intervals; switching off automatic refresh does not disable manual refresh. Overview keeps the full process and network charts; see [Dashboard](DASHBOARD.md).
## Prometheus exporter
The exporter is **disabled by default** and uses a separate HTTP listener, normally `127.0.0.1:9191`, at `/metrics`. It is not protected by the admin browser cookie; it has its **own** client-network and bearer-token policy. In **Settings → Prometheus** enable the endpoint and configure:
The exporter is **disabled by default** and uses a separate HTTP listener, normally `127.0.0.1:9191`, at `/metrics`. It is not protected by the admin browser cookie; it has its **own** client-network and bearer-token policy. **Settings → Prometheus** is split into **Endpoint** (enable switch, bind address and path — both marked *RESTART* —, metrics path and **allowed scraper addresses** entered as IP/CIDR chips), **Prometheus bearer token** (status badge, generate/rotate, revoke, one-time token box with **Copy**, token-free trusted networks) and **Metric groups**; the generated `scrape_configs` example is collapsible. Fields without the RESTART badge apply immediately. Configure:
Use the separate **Prometheus token** controls in Settings to generate, rotate or revoke a 32+ character Bearer credential. Its clear value appears only once; copy it directly into your monitoring secrets store. The database keeps only its hash, and rotation/revocation takes effect without reprinting the previous secret. The older environment-variable credential remains supported as a fallback *only until* a generated credential or explicit revocation entry exists. Setting a new token does not reconfigure the exporter listener or its enable switch.
- `listen`, `path`, `allowed_cidrs` and an optional environment-variable **name** `bearer_token_env` (the secret value is supplied separately to the service).
- `allow_trusted_network_without_token` only for a deliberately restricted monitoring subnet. `/0` CIDRs are not accepted in this mode.
- Collector switches for process/system, Vhosts, traffic, backends, Docker, cache domains, Streams and logging.
- Collector switches for process/system, Vhosts, traffic, backends, Docker, cache domains, Streams and logging. The *Domains and effectiveness* group also exports `rust_proxy_cache_rule_matches_total{origin,vhost,rule}` — matches of [cache rules](CACHE.md#cache-rules-vcl-style) since process start.
A non-loopback exporter requires a valid generated or environment Bearer token at scrape time, or an explicit token-free trusted-network exception; otherwise requests return 401. The exporter uses plain HTTP; keep it on loopback, trusted network or a protected TLS tunnel. `Forwarded`/`X-Forwarded-For` headers cannot grant exporter access because network restrictions apply to the transport peer.
+2
View File
@@ -9,6 +9,8 @@ RustProxy distinguishes **frontend** client protocols from the **upstream** prot
- **HTTP/3 (QUIC):** optional UDP transport on an enabled TLS frontend, using the listener certificate and supported H3 settings. The host firewall/NAT must pass UDP on the actual HTTPS port, not only TCP/443. Browsers can fall back to H2/H1 when H3 is unavailable.
- **H2C:** explicit cleartext HTTP/2 capability only where the listener or upstream policy enables it; it is not ordinary browser HTTPS.
In **Settings → Listeners** the *Currently active* bindings are shown at the top, and every listener is a compact card with its name, ID, bind addresses and badges (Internal/Public, TLS, H1, H2 or h2c, H3, disabled). Click a card to expand its editor; new listeners open expanded, and a listener with an invalid field opens automatically when saving. Listener changes need a restart (the card shows *RESTART*).
Transport settings attach to **named listeners**, and a Vhost must select the appropriate listener IDs. Addresses locked by CLI/systemd startup cannot be rewritten from the panel. Changing a listener bind or startup-owned TLS option may require a restart.
### Saving HTTP/3 settings