v0.37.2
This commit is contained in:
1 parent
f48843e934
commit
e2c8099d9c
64 files changed
+5354
-673
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
# RustProxy source and documentation maintenance
|
# RustProxy source and documentation maintenance
|
||||||
|
|
||||||
Current source version: **0.37.1**. The Cargo package and binary are named `rust-proxy`.
|
Current source version: **0.37.2**. The Cargo package and binary are named `rust-proxy`.
|
||||||
|
|
||||||
Before editing, read [README.md](README.md), the relevant [documentation guide](docs/README.md) and the actual code and tests. Historical release experiments are not current specifications. Use the bundled `src/admin/openapi.json` for API routes and payloads; the source implementation is authoritative for runtime behavior.
|
Before editing, read [README.md](README.md), the relevant [documentation guide](docs/README.md) and the actual code and tests. Historical release experiments are not current specifications. Use the bundled `src/admin/openapi.json` for API routes and payloads; the source implementation is authoritative for runtime behavior.
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,25 @@
|
|||||||
|
|
||||||
Release history focused on **features, settings, default behavior, compatibility and fixes**. Changes to internal code structure and preliminary performance experiments are intentionally omitted. Historical descriptions reflect their respective releases; consult the current documentation for the settings available in the latest release.
|
Release history focused on **features, settings, default behavior, compatibility and fixes**. Changes to internal code structure and preliminary performance experiments are intentionally omitted. Historical descriptions reflect their respective releases; consult the current documentation for the settings available in the latest release.
|
||||||
|
|
||||||
|
## 0.37.2 — Docker vhost ACL and cache, compact pickers, manual dashboard layout
|
||||||
|
|
||||||
|
- **Docker vhosts, access control:** the agent default ACL profiles are now shown pre-selected in the service's *Access control* section (*Agent default in use: …*) and can be unchecked or changed for that service only. New **Public vhost (no agent default ACL)** publishes a service without the agent default profiles (`inherit_acl_profiles: false`); global block/allow rules still apply. The section summary shows the effective state. See [docs](docs/DOCKER_DISCOVERY.md#publish-a-discovered-application).
|
||||||
|
- **Docker vhosts, cache:** with *Cache* enabled, **Cache for this vhost** sets a default TTL and cache rules (templates, VCL import/preview, tester, *Ignore global cache rules*) per service (`cache_default_ttl_seconds`, `cache_rules`, `cache_ignore_global_rules`). Global cache rules can now be limited to Docker vhosts, and the tester can simulate them; new `GET /api/cache/rules/targets`. See [docs](docs/CACHE.md#cache-rules-vcl-style).
|
||||||
|
- **Docker agent interfaces (fix):** systemd installations listed only the routed, public and override addresses because the unit blocked netlink. Agent 0.37.2 allows `AF_NETLINK` and, if netlink is still unavailable, reads addresses from `/proc/net`; reinstall the unit after upgrading. See [docs](docs/DOCKER_DISCOVERY.md#default-backend-ip).
|
||||||
|
- **Docker domains and certificates:** one domain can be used by several agents (only the published names must be unique); the domain picker lists every agent using it. Certificate lists label each name as *main domain*, *www*, *wildcard* or *subdomain*. See [docs](docs/DOCKER_DISCOVERY.md#domains).
|
||||||
|
- **Docker panel fixes:** the agent default backend IP is no longer listed twice in *Backend host IP*; the redundant *CONNECTED* badge next to *Agent diagnostics* is gone (the agent header already shows the state).
|
||||||
|
- **Compact pickers:** in multi-selects (countries, ACL profiles, domains, certificates, rule vhosts) the checkbox has the standard interface size, sits on the same line as the name and the entries are closer together; the ISO code is no longer repeated next to country names.
|
||||||
|
- **Certificate API (fix):** while editing a key, the certificate list no longer jumps back to the top when the panel refreshes in the background.
|
||||||
|
- **Overview, Arrange manually:** a new switch in the unlocked layout gives blocks fixed grid positions: drag a block to any cell (a dashed frame shows where it snaps), resizing never pulls other blocks into the freed space, and the positions are saved with the layout. *Fit to screen* and *Fill gaps* are off in this mode. See [docs](docs/DASHBOARD.md).
|
||||||
|
- **Alerts:** *Application status* gets an **Alerts** entry with links: expired or soon-expiring certificates (14 days), failed ACME renewals, ACME environment not ready, file descriptors ≥ 80%, country rules without a GeoIP database, Prometheus exporter open without token or address limit, available update. New warnings show a notification. Computed from the current state (no history, recomputed at most every 30 s); `alerts` in `/api/status` and new `GET /api/alerts`. Configured in the new **Settings → Alerts** tab: main switch, notifications, each alert kind on its own and thresholds for certificate expiry (days) and file descriptors (%); stored as `alerts`. See [docs](docs/MONITORING.md#alerts).
|
||||||
|
- **TLS policy, cipher configurator:** cipher suites as a table (certificate type, encryption, bits, rating), presets *Modern*, *Recommended (maximum compatibility)* and *256-bit only*, an SSL Labs–style grade with checks and a client compatibility simulation. Clearly marks clients that rustls cannot serve (TLS 1.0/1.1, CBC). See [docs](docs/TRANSPORT.md#cipher-configurator).
|
||||||
|
- **HTTP methods picker:** global policy, Vhost → Security and custom locations pick methods from a described list (GET … PURGE, WebDAV) instead of a text field; custom methods can still be typed. See [docs](docs/ACCESS.md#http-methods-and-rate-limits).
|
||||||
|
- **Cache rules for the whole application:** deliver rules (response headers) now apply to every response of the vhost, also when caching is off or bypassed, so they can override `Cache-Control` or add headers application-wide. New action *Set header if missing* (`default_header`) and templates for browser caching of static files, no browser cache for HTML/admin and default security headers. See [docs](docs/CACHE.md#cache-rules-vcl-style).
|
||||||
|
- **Docker vhosts:** *Use additional per-app ACL* now starts its own row, directly above its settings.
|
||||||
|
- **Docker vhosts, grouping:** endpoints of one Compose project (all services and ports) or of one container with several ports are shown under a collapsible group header (name, endpoints, published count, hostnames); display only, each port is still configured separately. See [docs](docs/DOCKER_DISCOVERY.md#publish-a-discovered-application).
|
||||||
|
- **Firefox scroll (fix):** live refreshes no longer move the page up when scrolled to the bottom of long lists in browsers with native scroll anchoring.
|
||||||
|
- **Language packs:** the per-pack size limit is 512 KiB (was 256 KiB).
|
||||||
|
|
||||||
## 0.37.1 — Precise SNI certificate selection, OPNsense deploy script, Docker panel polish
|
## 0.37.1 — Precise SNI certificate selection, OPNsense deploy script, Docker panel polish
|
||||||
|
|
||||||
- **Cache rules (VCL-style):** new **Settings → Cache → Rules** tab and **Cache rules for this vhost** in the vhost editor. Rules are built graphically (*If … Then …*) for three stages: request (bypass, remove cookies, remove query parameters such as `utm_*`, add a header or cookie to the cache key), backend response (TTL, grace, do not store, ignore backend Cache-Control, remove Set-Cookie) and deliver (set or remove response headers), with conditions on host, URL, path, extension, method, query parameter, header, cookie, client IP, status, Content-Type and response header. Vhost rules run before global rules; the editors show when a vhost rule overrides a global one, and a vhost can ignore global rules. Includes templates (WordPress, static files, tracking parameters, API, language variants, 404, X-Powered-By), drag-and-drop ordering, a request tester (`POST /api/cache/rules/test`, also for unsaved edits), VCL import of a common subset with warnings for the rest (`POST /api/cache/rules/import-vcl`), a read-only VCL preview, in-memory match counters (`GET /api/cache/rules/stats`) and Prometheus `rust_proxy_cache_rule_matches_total`. Configuration: `cache.rules`, vhost `cache.rules` and `cache.ignore_global_rules`. Existing safeguards (Authorization, Basic Auth, login providers, sticky sessions, Set-Cookie) stay in force. See [docs](docs/CACHE.md#cache-rules-vcl-style).
|
- **Cache rules (VCL-style):** new **Settings → Cache → Rules** tab and **Cache rules for this vhost** in the vhost editor. Rules are built graphically (*If … Then …*) for three stages: request (bypass, remove cookies, remove query parameters such as `utm_*`, add a header or cookie to the cache key), backend response (TTL, grace, do not store, ignore backend Cache-Control, remove Set-Cookie) and deliver (set or remove response headers), with conditions on host, URL, path, extension, method, query parameter, header, cookie, client IP, status, Content-Type and response header. Vhost rules run before global rules; the editors show when a vhost rule overrides a global one, and a vhost can ignore global rules. Includes templates (WordPress, static files, tracking parameters, API, language variants, 404, X-Powered-By), drag-and-drop ordering, a request tester (`POST /api/cache/rules/test`, also for unsaved edits), VCL import of a common subset with warnings for the rest (`POST /api/cache/rules/import-vcl`), a read-only VCL preview, in-memory match counters (`GET /api/cache/rules/stats`) and Prometheus `rust_proxy_cache_rule_matches_total`. Configuration: `cache.rules`, vhost `cache.rules` and `cache.ignore_global_rules`. Existing safeguards (Authorization, Basic Auth, login providers, sticky sessions, Set-Cookie) stay in force. See [docs](docs/CACHE.md#cache-rules-vcl-style).
|
||||||
|
|||||||
Generated
+1
-1
@@ -1943,7 +1943,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rust-proxy"
|
name = "rust-proxy"
|
||||||
version = "0.37.1"
|
version = "0.37.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rust-proxy"
|
name = "rust-proxy"
|
||||||
version = "0.37.1"
|
version = "0.37.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.99.1"
|
rust-version = "1.99.1"
|
||||||
description = "RustProxy - independent reverse proxy with local administration"
|
description = "RustProxy - independent reverse proxy with local administration"
|
||||||
|
|||||||
+63
-58
@@ -1,19 +1,19 @@
|
|||||||
61bf40a0572889dc8b0dda9eae4e93e44b0de9364b3c798106c85700ffb37c23 .dockerignore
|
61bf40a0572889dc8b0dda9eae4e93e44b0de9364b3c798106c85700ffb37c23 .dockerignore
|
||||||
4140a2956264b44f259e6a37fc00ba02097bbe68b09296e04d3d243c1287129b .env.example
|
4140a2956264b44f259e6a37fc00ba02097bbe68b09296e04d3d243c1287129b .env.example
|
||||||
e76e688874828e3743d03693b1d2872b9633b4db09909673786caf30f7cfe489 .gitignore
|
e76e688874828e3743d03693b1d2872b9633b4db09909673786caf30f7cfe489 .gitignore
|
||||||
0399823bbfd64c0aeb1f95e918dccc0ec5b5b7c7e31bd6335cddefc8931f71f1 AGENTS.md
|
75a02969103a9a28563e10a9f2dd43bbbf9d9968b8d17f8ae4bb6ef11b1a9fe9 AGENTS.md
|
||||||
25dfd1751635f1d0fc3842485a093a8d91355c60f15a3173ec2cc4a3483bac2d CHANGELOG.md
|
ed7a7c9c6441063fbe77621606dfb3280eeb0a52f2753f502359ec71b716e1ac CHANGELOG.md
|
||||||
8c288a1b0bac53654e017f39fc05e044d536eab53be9d3aadfc1929d56f6021d Cargo.lock
|
1a21e0a1e20786445750186c221a21d5266aa16c6e8f220d4c5af1f39b572d51 Cargo.lock
|
||||||
59a8a0ce15f7f93d5933c2cfb6d7d7d2591a857705cec4da807b2e111f03b0ec Cargo.toml
|
21e77407c22125c0aaebb1cd5164fd5d38eef6555ef62ef363f42ae0966683cd Cargo.toml
|
||||||
788745d4f70a0382c6280020afbd48844bb2af65e835a826852143f8132cdeca Dockerfile
|
788745d4f70a0382c6280020afbd48844bb2af65e835a826852143f8132cdeca Dockerfile
|
||||||
0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0 LICENSE
|
0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0 LICENSE
|
||||||
82d1dee2fc68158f0ea73259151461e64c8b18d807cd1fecfb1ed99dc30cf5f4 README.md
|
82d1dee2fc68158f0ea73259151461e64c8b18d807cd1fecfb1ed99dc30cf5f4 README.md
|
||||||
da8311e3db945290666324a2f24bf4521b365272d7ac3f862ded1be993eea646 UPDATE_CHECK.toml
|
da8311e3db945290666324a2f24bf4521b365272d7ac3f862ded1be993eea646 UPDATE_CHECK.toml
|
||||||
c0df6b46bf795d49d00fcd9e2a9247aed0d3a99b6cae1dc5ab6614e8b3d30009 build.rs
|
60bb6386160863f7dba1d100d88f6d603b55b7373fd4ab94b7b5f442455ad380 build.rs
|
||||||
95ececaba550a4bcfd6754073877ba0633373b1e1451521b9ac905a51e8ca6eb deploy/README.md
|
95ececaba550a4bcfd6754073877ba0633373b1e1451521b9ac905a51e8ca6eb deploy/README.md
|
||||||
13d514de5042a230cacf8c10abe1ef183c94ac799a89b8e2c111152ac7c69b48 deploy/rustproxy.service
|
13d514de5042a230cacf8c10abe1ef183c94ac799a89b8e2c111152ac7c69b48 deploy/rustproxy.service
|
||||||
c111f5b20484707b80efb7dd9176acbaa27b63ac78db497261ac234821e1fade dev.sh
|
c111f5b20484707b80efb7dd9176acbaa27b63ac78db497261ac234821e1fade dev.sh
|
||||||
7c4b7a8c87babefa1ba6c6065f922fbf7bdc5821d3628753fdcc8d394aedf7b1 docker-agent/README.md
|
48397fb72daf469a8c9c1eba85937db5dac55166a47582aaed9843b6d3c37e22 docker-agent/README.md
|
||||||
e9f18b358a740f1fe16e369ed16ee37581b8ce4c94ddeb34a1a37b89a49b5a06 docker-agent/certificate.go
|
e9f18b358a740f1fe16e369ed16ee37581b8ce4c94ddeb34a1a37b89a49b5a06 docker-agent/certificate.go
|
||||||
600d5aebc8557d6987158969d494bade1ba46ccf9d1cd573d357d0106db26b2b docker-agent/cli_test.go
|
600d5aebc8557d6987158969d494bade1ba46ccf9d1cd573d357d0106db26b2b docker-agent/cli_test.go
|
||||||
7a8ca48aca82178a301b41dfb4f1997b27f09352394d844bb2b627fa1c8aab0f docker-agent/containers.go
|
7a8ca48aca82178a301b41dfb4f1997b27f09352394d844bb2b627fa1c8aab0f docker-agent/containers.go
|
||||||
@@ -28,28 +28,29 @@ e9f18b358a740f1fe16e369ed16ee37581b8ce4c94ddeb34a1a37b89a49b5a06 docker-agent/c
|
|||||||
b849d39e94878c5a754c3d109d8e4b5e37609cfd2a0e05601a35271f4d95271e docker-agent/install.sh
|
b849d39e94878c5a754c3d109d8e4b5e37609cfd2a0e05601a35271f4d95271e docker-agent/install.sh
|
||||||
56d6acd675c44c3a39538b321d2057cf251a6a27b0ad634d827eb7d6a20de8c0 docker-agent/main.go
|
56d6acd675c44c3a39538b321d2057cf251a6a27b0ad634d827eb7d6a20de8c0 docker-agent/main.go
|
||||||
d660f46f7ef8c539dd3f5486a31d5a1254b9737be8a278c7f9352c254558f8ac docker-agent/main_test.go
|
d660f46f7ef8c539dd3f5486a31d5a1254b9737be8a278c7f9352c254558f8ac docker-agent/main_test.go
|
||||||
8712ed6963ab640c855a24b5d93913b7bdf38738dffc5cbf28e2d6a325ec58c3 docker-agent/model.go
|
1e357eb7f91403a2887a643a1acc34a3a2abf343cde05a4d3f00bf1deb850c11 docker-agent/model.go
|
||||||
2161db6057d982057cb9417a3791a98598f36e337a8ca6083672816bc95a6b83 docker-agent/network.go
|
e7d2ef3cc83d8089d3b5eb2154c113d82bbab5e7bac0b9077785d5ab92f48df2 docker-agent/network.go
|
||||||
|
6e2e13136fd8198c2d64dfd0612dfc91c4a9c0a952e71b3b24c9614a72b083aa docker-agent/network_proc_test.go
|
||||||
021e0799a95a7c76bc245ff464d94b4495ce0d22555ca202579bd5f45e4be794 docker-agent/provision.go
|
021e0799a95a7c76bc245ff464d94b4495ce0d22555ca202579bd5f45e4be794 docker-agent/provision.go
|
||||||
4a737e5922c2255492c85d5afc053cd15d9e5b83cada648369cfdeeecdbfaa92 docker-agent/runtime.go
|
4a737e5922c2255492c85d5afc053cd15d9e5b83cada648369cfdeeecdbfaa92 docker-agent/runtime.go
|
||||||
24494010bb215c5ff7eda0a571272309eebb5c35fa4ed24430da87790e89e941 docker-agent/rustproxy-docker-agent.service
|
4e64abc321d4149a4982e2acb091c1b2c6fd3584693935b115c837d480ac87a9 docker-agent/rustproxy-docker-agent.service
|
||||||
b0b19b5fa15fe589f10305a19b75894f5d5cee816348e831702c4e06186e73b0 docker-agent/server.go
|
b0b19b5fa15fe589f10305a19b75894f5d5cee816348e831702c4e06186e73b0 docker-agent/server.go
|
||||||
afd5b425936acc4972e9054b31daffead5f39ea706b0c3e5ead54270e3d43979 docker-agent/system.go
|
afd5b425936acc4972e9054b31daffead5f39ea706b0c3e5ead54270e3d43979 docker-agent/system.go
|
||||||
188b74ec4f58da1b46d86925a67b6a590c92fb4fd7516e8d03d43871bc3b4542 docker-agent/system_test.go
|
188b74ec4f58da1b46d86925a67b6a590c92fb4fd7516e8d03d43871bc3b4542 docker-agent/system_test.go
|
||||||
a3bd06c6ae52c5f4669d4fa5b5db8b76048ee3a496b4fb2fb05c501619b0fead docs/ACCESS.md
|
c0940a4b323d71931cf2ad4ad24d58b6d6bfd49af90c6e3fc91fcbe2b4cf312f docs/ACCESS.md
|
||||||
b7a6c5e643e5afb46b4c0d8bbf75fea3aeb0350a164680900f42265b55740f2f docs/API.md
|
1e3a14170496e65e4052a9f7fc67543e5d7b13778dda98e34514a43ba8be5844 docs/API.md
|
||||||
728b15b9825f547f34c4121219784798dd046fbbdd72ece8906d0cd77e8efc64 docs/BACKUP.md
|
728b15b9825f547f34c4121219784798dd046fbbdd72ece8906d0cd77e8efc64 docs/BACKUP.md
|
||||||
d710bad171d62349cee3512d0bb775c0b7f725e9046c9bc1e326ff42e82f4f92 docs/CACHE.md
|
79c767197bec37787af7d949b7134cefe1e0d22c1d0b8a801eceafcf69e7599d docs/CACHE.md
|
||||||
375241ef87cff34c0bda5b771ee474a402f24ae8fb00e97f601b1a5060690508 docs/CERTIFICATES.md
|
375241ef87cff34c0bda5b771ee474a402f24ae8fb00e97f601b1a5060690508 docs/CERTIFICATES.md
|
||||||
9c9e6c56ae9d714a5a99bffd39cb2d506991af5e67f034d41fe45210c95ac5ca docs/CONFIGURATION.md
|
9c9e6c56ae9d714a5a99bffd39cb2d506991af5e67f034d41fe45210c95ac5ca docs/CONFIGURATION.md
|
||||||
fec29ce846d6705eb45819d85d382f28e28a146b265feab2e4c7cce2a35e5883 docs/CUSTOM_LOCATIONS.md
|
fec29ce846d6705eb45819d85d382f28e28a146b265feab2e4c7cce2a35e5883 docs/CUSTOM_LOCATIONS.md
|
||||||
2f1a01120d10ce5cdc9ad81d4e65c545965a7006031093edba1919dea90b0a39 docs/DASHBOARD.md
|
5776a6e59df079a8788df00f031cb366f12718f5336ddabd90a953aed2f8b1f7 docs/DASHBOARD.md
|
||||||
bc0d22786e420f2486eee855430bd29ebb7a6879552077859c7722f0d0904c26 docs/DOCKER_DISCOVERY.md
|
86c085b1d9acc7140bc7e3ecd85974b5e42614ebeaed675561b33bf82b98bca6 docs/DOCKER_DISCOVERY.md
|
||||||
bd0bb5583bf171dc2cf73b56492184f6d7a69bf33db5f25c5396ed6c3300b400 docs/FEATURES.md
|
bd0bb5583bf171dc2cf73b56492184f6d7a69bf33db5f25c5396ed6c3300b400 docs/FEATURES.md
|
||||||
2c5f97b12be53db32c7e2888d23c0ef1d82d1742df44f7e60ea818dc801a719a docs/INSTALL.md
|
2c5f97b12be53db32c7e2888d23c0ef1d82d1742df44f7e60ea818dc801a719a docs/INSTALL.md
|
||||||
6e37859bf0dced99d4a7db93790cb38fcd90191932827946d5223eaa4c784fce docs/LOGS.md
|
6e37859bf0dced99d4a7db93790cb38fcd90191932827946d5223eaa4c784fce docs/LOGS.md
|
||||||
0e9ae9509a78d00951d2c7c3f13eaf518d1f3448a29b048f5933e1f5f8440275 docs/MIGRATION.md
|
0e9ae9509a78d00951d2c7c3f13eaf518d1f3448a29b048f5933e1f5f8440275 docs/MIGRATION.md
|
||||||
fcf6cfe8daee898e6f6ce8588e8d3e769169da11f599531e44d997f7730526df docs/MONITORING.md
|
a7717c4ab03417914805527e573ea1dfd5d35295bf7b347d0c098bda6d469850 docs/MONITORING.md
|
||||||
364c1faf9e21849de0f7c4ae8c1e55c1fa4d3ae3a7167a33cb58651174b4bfda docs/PERFORMANCE.md
|
364c1faf9e21849de0f7c4ae8c1e55c1fa4d3ae3a7167a33cb58651174b4bfda docs/PERFORMANCE.md
|
||||||
d5894c07c68ec4230987767198434abee13b0e525842fea21bcbe752fa82742b docs/PHP_FPM.md
|
d5894c07c68ec4230987767198434abee13b0e525842fea21bcbe752fa82742b docs/PHP_FPM.md
|
||||||
954b1602c865e157c867f1c81dca615f2beaa33c34de0b0fa8a6069db2aae7d0 docs/README.md
|
954b1602c865e157c867f1c81dca615f2beaa33c34de0b0fa8a6069db2aae7d0 docs/README.md
|
||||||
@@ -57,7 +58,7 @@ d5894c07c68ec4230987767198434abee13b0e525842fea21bcbe752fa82742b docs/PHP_FPM.m
|
|||||||
95ab4786792d5920a2e109b7d196838057f24b512a69d713fb5884dc75c84339 docs/SCREENSHOTS.md
|
95ab4786792d5920a2e109b7d196838057f24b512a69d713fb5884dc75c84339 docs/SCREENSHOTS.md
|
||||||
3a48184b36d225757fc5e2d22c629f89bfe5d4007ff087f0be0ce02a5fb04c28 docs/SECURITY.md
|
3a48184b36d225757fc5e2d22c629f89bfe5d4007ff087f0be0ce02a5fb04c28 docs/SECURITY.md
|
||||||
bbef60ff1771da9f48af812987766e1e479408873ae2f079b13f1d5c62ecc6ff docs/STREAMS.md
|
bbef60ff1771da9f48af812987766e1e479408873ae2f079b13f1d5c62ecc6ff docs/STREAMS.md
|
||||||
415f6c7da2e06017ede2161a26558eaefef42d6b05e350827d6b532457c486e9 docs/TRANSPORT.md
|
978097cf53314ad573583d7176491d984b9dbb22295df2b00168a28b14184c4a docs/TRANSPORT.md
|
||||||
be6e8af62a7bf958b94ec15e9e3263263e511d1d33abae4e45d114833fa52b07 docs/TROUBLESHOOTING.md
|
be6e8af62a7bf958b94ec15e9e3263263e511d1d33abae4e45d114833fa52b07 docs/TROUBLESHOOTING.md
|
||||||
b4abb86942f665230904fad570c1487bc173aa84633801e2999f2bfa197de4a7 docs/VHOSTS.md
|
b4abb86942f665230904fad570c1487bc173aa84633801e2999f2bfa197de4a7 docs/VHOSTS.md
|
||||||
e67928a9d044e71b681c3e52f9dd8b151d6b72f965d16d5da8b0eadde98b70e9 docs/WEB_SERVER.md
|
e67928a9d044e71b681c3e52f9dd8b151d6b72f965d16d5da8b0eadde98b70e9 docs/WEB_SERVER.md
|
||||||
@@ -99,12 +100,12 @@ c720a4426d7b4dc52048077157dd05aefa427ae78ca811afc3b7b9cbbe875cae grafana/rustpr
|
|||||||
e9cbb0224c4a3d23a6019ba557e0cd568c1ad5e1582ff1e335fb7d99b7a1055d integrations/routeros-oci-build/.gitignore
|
e9cbb0224c4a3d23a6019ba557e0cd568c1ad5e1582ff1e335fb7d99b7a1055d integrations/routeros-oci-build/.gitignore
|
||||||
14025f0cad10e1b89f366977123e4cebb68ae59df892d4eed29b6171e63ae908 integrations/routeros-oci-build/Dockerfile.routeros
|
14025f0cad10e1b89f366977123e4cebb68ae59df892d4eed29b6171e63ae908 integrations/routeros-oci-build/Dockerfile.routeros
|
||||||
7c7a3e51f43b43e1c962a4b0bb591f99c1f06977bf77f23719f7f867dfe7eb8e integrations/routeros-oci-build/Dockerfile.routeros.dockerignore
|
7c7a3e51f43b43e1c962a4b0bb591f99c1f06977bf77f23719f7f867dfe7eb8e integrations/routeros-oci-build/Dockerfile.routeros.dockerignore
|
||||||
1c71a990ce725becc909092f36e3a266a46fae27c95f2c09b71da6dde5eec086 integrations/routeros-oci-build/README.md
|
1552e57d83d3a19140fadc7cd203e257028c9f08a0b06a0c667fcb5f816340ee integrations/routeros-oci-build/README.md
|
||||||
3f092a9ab80221eddd67be4d1a776acbc6e04c1eb6011b588280c28e83b2582f integrations/routeros-oci-build/build-routeros-oci.sh
|
3f092a9ab80221eddd67be4d1a776acbc6e04c1eb6011b588280c28e83b2582f integrations/routeros-oci-build/build-routeros-oci.sh
|
||||||
3f267cafa16006e5456ade78ee2d5fae02cc7ce747839523068ffd8d7c98798a integrations/routeros-oci-build/docker-entrypoint.sh
|
3f267cafa16006e5456ade78ee2d5fae02cc7ce747839523068ffd8d7c98798a integrations/routeros-oci-build/docker-entrypoint.sh
|
||||||
13189fa546c3488dddd8efc80c47f6da5241e5fc28b79cbfe795414ea05c7a4f langs/README.md
|
ae2ee2887fcba096d0de25edcc18faa1ffec35759274518db1bf6d6982f7176c langs/README.md
|
||||||
2db8755e026681806b3ce45f9428db11967d001155f820aaf8b3fc026d62eb32 langs/en_US.json
|
ac86cd8a11bc23e2327633e932833e5bfa411d752fb0d1865caed8810e0fb200 langs/en_US.json
|
||||||
84eaa5d7d8b51f7368c2dc74158bfb8f54907f2ee3c4acf9595a5c981ab7a785 langs/pl_pl.json
|
1b9647755059be5869160f4e347c1c1f3226332c46e051590773f711303d748a langs/pl_pl.json
|
||||||
8ed80f14633970899d56f4ea72684a8d4b1f2843c1c78bfacc4cbb5f7ce9ef4b make_zip.py
|
8ed80f14633970899d56f4ea72684a8d4b1f2843c1c78bfacc4cbb5f7ce9ef4b make_zip.py
|
||||||
e830d37dd1f81a4b0aa7d535f5bba69e34e433b0fd99cc8ee0b296786c32379a migrations/0002_admin.sql
|
e830d37dd1f81a4b0aa7d535f5bba69e34e433b0fd99cc8ee0b296786c32379a migrations/0002_admin.sql
|
||||||
20112cc82192098b8d602f1c4f7ca08712e9e1366c845fabb92753187c370d35 migrations/0003_certificate_renewals.sql
|
20112cc82192098b8d602f1c4f7ca08712e9e1366c845fabb92753187c370d35 migrations/0003_certificate_renewals.sql
|
||||||
@@ -159,14 +160,15 @@ c51fd51177a476be6462ca980e9bc13f0d0b41538f520118b80a685130f0dbf0 src/acme/runti
|
|||||||
2f02b08d88ad3c1fc9827e5bd3ef463effba633834d9c05e9c0d6d2a0e8869c5 src/acme/runtime_versions.rs
|
2f02b08d88ad3c1fc9827e5bd3ef463effba633834d9c05e9c0d6d2a0e8869c5 src/acme/runtime_versions.rs
|
||||||
cfc13a293c126bb511745859669719a14c72dd7ff6be197bc9e0d0e560deebbd src/acme/tests.rs
|
cfc13a293c126bb511745859669719a14c72dd7ff6be197bc9e0d0e560deebbd src/acme/tests.rs
|
||||||
b28a08ea996befe10949676f40fab5f1036a274c7d0ab1175cf5c43c59849dc3 src/admin/access.rs
|
b28a08ea996befe10949676f40fab5f1036a274c7d0ab1175cf5c43c59849dc3 src/admin/access.rs
|
||||||
3afefdc6640d35bd55f20981e842647573f1ba80248680f99ba79eec9a7c4ce5 src/admin/api_token_access.rs
|
f73678bfa4c4f92779cf4e8ae2feb37419de320fb1b53111c982539d5761dbcf src/admin/alerts.rs
|
||||||
|
7e23e70451c6498a43f65751c5bd7a110c63e24da05f6126b38dbacb33c962ca src/admin/api_token_access.rs
|
||||||
5f5b150bb8f51f57462e519650093354ae7b40fcb80c4380fd3391a33f4b30f2 src/admin/api_tokens.rs
|
5f5b150bb8f51f57462e519650093354ae7b40fcb80c4380fd3391a33f4b30f2 src/admin/api_tokens.rs
|
||||||
e127a784ada334f2ac46fdc4d8081188d75bbf6113dc75cb62ddfcf5dabf6273 src/admin/cache_rules.rs
|
462c4c24738edd4d9000a70ef9769991325b215da09a776e0cf669d77f2dd9f1 src/admin/cache_rules.rs
|
||||||
34e851f725e8605e3c5d9946e56ac035996f3bd9d608169cba3408060d229c9b src/admin/certificate_api.rs
|
34e851f725e8605e3c5d9946e56ac035996f3bd9d608169cba3408060d229c9b src/admin/certificate_api.rs
|
||||||
4a8b6406a44508b8ba102fef0d8309e871dbe0cbdbee1e6c8721baaca0c1aee1 src/admin/certificate_inspection_tests.rs
|
4a8b6406a44508b8ba102fef0d8309e871dbe0cbdbee1e6c8721baaca0c1aee1 src/admin/certificate_inspection_tests.rs
|
||||||
aefbef9839f9914ba05ea62bceff1463da3042b52ee851181ee39d4fbf7b91c3 src/admin/certificates.rs
|
aefbef9839f9914ba05ea62bceff1463da3042b52ee851181ee39d4fbf7b91c3 src/admin/certificates.rs
|
||||||
521ac794501570cfa2e8e50c3a5cec2ca08ee4dbce8ac9c0e0310c09612f1062 src/admin/config_reload.rs
|
521ac794501570cfa2e8e50c3a5cec2ca08ee4dbce8ac9c0e0310c09612f1062 src/admin/config_reload.rs
|
||||||
b7b0d3f0df7683b031136c05b314e206f7864e70514fe25165e41fd7a9382854 src/admin/config_sections.rs
|
7cac90d705a201b764d283e06774744e4b358eb157a8c492357bfc21aed37543 src/admin/config_sections.rs
|
||||||
c51f725075b5c4fc3fb7fb8b8b5f73987bff698a400e8950e968068b97a77631 src/admin/dashboard_presets.rs
|
c51f725075b5c4fc3fb7fb8b8b5f73987bff698a400e8950e968068b97a77631 src/admin/dashboard_presets.rs
|
||||||
aae1ca0e70d987830bd63948d431f54302083148177c1b551565be12df7fe771 src/admin/documentation.rs
|
aae1ca0e70d987830bd63948d431f54302083148177c1b551565be12df7fe771 src/admin/documentation.rs
|
||||||
6f58f821ea9a1686fc5130336ac82f06d5914b3642088641b5d036df6304c671 src/admin/documentation/documents.rs
|
6f58f821ea9a1686fc5130336ac82f06d5914b3642088641b5d036df6304c671 src/admin/documentation/documents.rs
|
||||||
@@ -176,72 +178,73 @@ b9c2952e3fcfca540d0ad64f2d3acc5c1f5240e707f4f23ef4d452f46fcb520f src/admin/docu
|
|||||||
d58a2ed83319176de4e66790ed292447c9497ae031464ec55cfe27174acb639a src/admin/file_logs_io.rs
|
d58a2ed83319176de4e66790ed292447c9497ae031464ec55cfe27174acb639a src/admin/file_logs_io.rs
|
||||||
77b8c05645969834cc8a58e249a7b60a57d6c47ad1c5cd92ffa5e4a9b5a8e73c src/admin/file_logs_query.rs
|
77b8c05645969834cc8a58e249a7b60a57d6c47ad1c5cd92ffa5e4a9b5a8e73c src/admin/file_logs_query.rs
|
||||||
743bb7436f77e04015328a0e7e7d425e43ef8aa8d61467bde157e462c1dcdc2e src/admin/logging_api.rs
|
743bb7436f77e04015328a0e7e7d425e43ef8aa8d61467bde157e462c1dcdc2e src/admin/logging_api.rs
|
||||||
e0bd3c83170006a23ea3e1b2148f588767466cba48309af429a6f76089ea181a src/admin/mod.rs
|
51228956c33358278ebed62941da273e1e87d0b5c5d1c40cc0d2c91aec9d7362 src/admin/mod.rs
|
||||||
45d473eece8b8399b1c03505b17287fb127dacc0f9b6db34d5c8a0e39e577ec1 src/admin/openapi.json
|
64f1a55c1bbba9e0f29e18838b5c8d6f098f92400261b76caa121ef219bd9edb src/admin/openapi.json
|
||||||
f7a356109786635dd58cba590c71c796dbf36b47f25845190c75ee5c6a9fcb86 src/admin/operations.rs
|
f7a356109786635dd58cba590c71c796dbf36b47f25845190c75ee5c6a9fcb86 src/admin/operations.rs
|
||||||
257d93a29d0bda96462bcf695aba8d0ec0f9412c379e066ec46ae8ee034e3a53 src/admin/panel_assets.rs
|
257d93a29d0bda96462bcf695aba8d0ec0f9412c379e066ec46ae8ee034e3a53 src/admin/panel_assets.rs
|
||||||
f5127855c2994d052678865df36d703b74f4a0afc633daf7718b10da18d26e37 src/admin/panel_content.rs
|
f5127855c2994d052678865df36d703b74f4a0afc633daf7718b10da18d26e37 src/admin/panel_content.rs
|
||||||
0ba8dfd4381f25356613218eb2be705509ec037fcc81f0bb341f5bc23772da8a src/admin/preferences.rs
|
09c019cd49ff3829d119d918513b87d87c643fd753cd3a0d3392ac5c845da7af src/admin/preferences.rs
|
||||||
f3635b624cf48598d68274a470d84d15ef9f6070d56e437a0031afa724471d5e src/admin/preferences_columns.rs
|
f3635b624cf48598d68274a470d84d15ef9f6070d56e437a0031afa724471d5e src/admin/preferences_columns.rs
|
||||||
8b7d6385465dafaaa1e110c798c57d556ece5562d2940af874d335fff6c2e56b src/admin/preferences_tests.rs
|
8b7d6385465dafaaa1e110c798c57d556ece5562d2940af874d335fff6c2e56b src/admin/preferences_tests.rs
|
||||||
62ecbae5dee00aeeca3eb806e2605372471dfab971cde8f66f11e711df8fcea1 src/admin/public/mod.rs
|
62ecbae5dee00aeeca3eb806e2605372471dfab971cde8f66f11e711df8fcea1 src/admin/public/mod.rs
|
||||||
7a00e4ab943f74d2b1bdcbfab7f9cd3f584e9f59536b4aca6c4c31f5f5508d12 src/admin/public/tests.rs
|
7a00e4ab943f74d2b1bdcbfab7f9cd3f584e9f59536b4aca6c4c31f5f5508d12 src/admin/public/tests.rs
|
||||||
6930b4f4b45257772b321b20a9becdf9bc4610274852948ba38c2d0cdf02dfaf src/admin/refresh_preferences.rs
|
6930b4f4b45257772b321b20a9becdf9bc4610274852948ba38c2d0cdf02dfaf src/admin/refresh_preferences.rs
|
||||||
71f329e9323fa04590cef9cbde6fbd3a9797cc21b87201660cebe9beba786eb6 src/admin/router.rs
|
b20ef332aef006d06f7da48e98f4eb6d1313cfca21274954496cac378515acf8 src/admin/router.rs
|
||||||
fba52102e77ca8871a42f97c91be8f10a9aa4f997868652d550fff3fbd41b66e src/admin/session.rs
|
fba52102e77ca8871a42f97c91be8f10a9aa4f997868652d550fff3fbd41b66e src/admin/session.rs
|
||||||
a3f834afb6fac6719fabb702eb574dc2634a3de0c2e54cb56e98fe5b87a91855 src/admin/status.rs
|
22f6f8c5e293fb6f8f1734660a0931605dbe35a974d9c819269492450aa39aa1 src/admin/status.rs
|
||||||
abb5cd89aac02745666b67da07de718ff70612aac370fbd49ca4d3340acad991 src/admin/status_live.rs
|
9b5bc1a439c5e5611c47732fe86097877b50b09b10a0838d9813314ea6232d0c src/admin/status_live.rs
|
||||||
8315c856cd50f1072593ecb30c274d42d82f078b5fb93e7c68a8857cd81b0841 src/admin/status_system.rs
|
8315c856cd50f1072593ecb30c274d42d82f078b5fb93e7c68a8857cd81b0841 src/admin/status_system.rs
|
||||||
cadd7dca29b9aad8c77c7bc23dd249ea37a15adfa4d636a8ef00273a91ce35dc src/admin/tail.rs
|
cadd7dca29b9aad8c77c7bc23dd249ea37a15adfa4d636a8ef00273a91ce35dc src/admin/tail.rs
|
||||||
176173da61950866c61ab46b272a1ad95de3407dc6ef68a41c23a033b7d82b04 src/admin/tests.rs
|
8b4910fbfc61755858d0c8b47c514b49446eae330fb6689ae5d33b611a7fb5b2 src/admin/tests.rs
|
||||||
8c4492b89980a57b63dd50eb88b56cf89160ebf14280c702465764c8433d771a src/admin/web/acl-picker.js
|
7c683e45de84384286598af7091b7700c9d97a620162a5422ee2ab0ff6c42ad7 src/admin/web/acl-picker.js
|
||||||
48fcd818c522fe80f2c7b2e218f87de6a7772ffd0a24e93502780b03ec78e335 src/admin/web/acme.js
|
48fcd818c522fe80f2c7b2e218f87de6a7772ffd0a24e93502780b03ec78e335 src/admin/web/acme.js
|
||||||
30a71c399e9a2cd9a4c1830568e4767f219ce09bca35f6d5fd22424f1a6617ac src/admin/web/admin_origin_rejected.html
|
30a71c399e9a2cd9a4c1830568e4767f219ce09bca35f6d5fd22424f1a6617ac src/admin/web/admin_origin_rejected.html
|
||||||
aa33315bf8e11d281778cdf258444ad8f02c22ac4fb8fba02fd4ee8677595d1f src/admin/web/api-tokens.js
|
aa33315bf8e11d281778cdf258444ad8f02c22ac4fb8fba02fd4ee8677595d1f src/admin/web/api-tokens.js
|
||||||
|
c7699bd6a78a1b76739999a363b78cea9cca7401dd993b2e278427ffb8b3f4f7 src/admin/web/app/alerts.js
|
||||||
faa9735c2a02746b2954bc4955eb609f94afebb685cd5521d2629640cea2777a src/admin/web/app/backend-dashboard.js
|
faa9735c2a02746b2954bc4955eb609f94afebb685cd5521d2629640cea2777a src/admin/web/app/backend-dashboard.js
|
||||||
aed3aea4eef0011c6b51d39736782e7d1ec52662e422f40e0c7b9ddfc19d0378 src/admin/web/app/certificate-inspection.js
|
aed3aea4eef0011c6b51d39736782e7d1ec52662e422f40e0c7b9ddfc19d0378 src/admin/web/app/certificate-inspection.js
|
||||||
f6b0533ffd6d0e6471519120c440619a7fb4b255854ba3dd23d81cb35cd21afb src/admin/web/app/chart-scales.js
|
f6b0533ffd6d0e6471519120c440619a7fb4b255854ba3dd23d81cb35cd21afb src/admin/web/app/chart-scales.js
|
||||||
dedda129e173a347ebca9445c8a313849d1d678c256deabeb18f9977559e021a src/admin/web/app/config-history.js
|
dedda129e173a347ebca9445c8a313849d1d678c256deabeb18f9977559e021a src/admin/web/app/config-history.js
|
||||||
616664802eb185b07ab7edbb41a3acbed15735c220444aef801f0370428da4b0 src/admin/web/app/core.js
|
5ce9d3e0849da1109b8eaa609dd693b2414814e132685cafcddfeb9436bfed41 src/admin/web/app/core.js
|
||||||
a2b9ac1e7873aa52167fbe6a30e36b51b87791928049b660eaa3f9a7804dc57a src/admin/web/app/dashboard-inline-layout.js
|
1fe90b27e241477e67b24283f3ae8a15a1770e3a3a8f5017a0732396294bff90 src/admin/web/app/dashboard-inline-layout.js
|
||||||
ce6518e953908b302c034346ec13ddaec308950ca2af1d54d063a87ff03efab3 src/admin/web/app/dashboard-layout-editor.js
|
ce6518e953908b302c034346ec13ddaec308950ca2af1d54d063a87ff03efab3 src/admin/web/app/dashboard-layout-editor.js
|
||||||
716d33249a52548f10153d8e2f5bea962a5f0427525272ddd3a1db636647672c src/admin/web/app/dashboard-presets.js
|
716d33249a52548f10153d8e2f5bea962a5f0427525272ddd3a1db636647672c src/admin/web/app/dashboard-presets.js
|
||||||
fce1fe268749b28ab68ac41519ced05252c1193f11bc9a3851de45dae4c419ad src/admin/web/app/docker-dashboard.js
|
fce1fe268749b28ab68ac41519ced05252c1193f11bc9a3851de45dae4c419ad src/admin/web/app/docker-dashboard.js
|
||||||
57dff3445ed156cc62b16c24fdf3f08932f79fa4ff5412afd2c0abc909a60349 src/admin/web/app/icons.js
|
f01c5fe8eb9c8249b1d07563f42bb63c397de0b602eb178c131b8a9e50d3b1c4 src/admin/web/app/icons.js
|
||||||
9fc3165febd83a6661b2827aacd612fbc0f834e99ef1585ec54e03e97fe54a72 src/admin/web/app/logo-animation.js
|
9fc3165febd83a6661b2827aacd612fbc0f834e99ef1585ec54e03e97fe54a72 src/admin/web/app/logo-animation.js
|
||||||
92ed982c3ac4bc4218a24a200d2a33f30fc6705b77b260db2be31b0ce91a7df9 src/admin/web/app/memory-breakdown.js
|
92ed982c3ac4bc4218a24a200d2a33f30fc6705b77b260db2be31b0ce91a7df9 src/admin/web/app/memory-breakdown.js
|
||||||
32aa11f041eafdf16e66adef6f5847a67413785224da2c19ecbf825996622aff src/admin/web/app/overview-extra-metrics.js
|
32aa11f041eafdf16e66adef6f5847a67413785224da2c19ecbf825996622aff src/admin/web/app/overview-extra-metrics.js
|
||||||
3049a308881f98ab19ffd95b4bb88976702c61f2fc82792b4402f0212fcd7403 src/admin/web/app/overview-masonry.js
|
3049a308881f98ab19ffd95b4bb88976702c61f2fc82792b4402f0212fcd7403 src/admin/web/app/overview-masonry.js
|
||||||
bbbbe153ff37aa4cac0a83319e5b56a6442cabd1ef819380ae76e95bf79c7628 src/admin/web/app/overview-rows.js
|
c2309ebda9bc5129f6caf4b28cf0d54e04a797a0f25003652cc054a9e3d752ef src/admin/web/app/overview-rows.js
|
||||||
6f10f3239aea505aa01796620981eed873930c129ed5a2fd7eb439e0e0d24558 src/admin/web/app/overview-samples.js
|
6f10f3239aea505aa01796620981eed873930c129ed5a2fd7eb439e0e0d24558 src/admin/web/app/overview-samples.js
|
||||||
db9012546cae8c58fc2bcbee71c9a95956a13a6db9e6d126c6a3770d45a4e4d2 src/admin/web/app/overview-wide-metrics.js
|
db9012546cae8c58fc2bcbee71c9a95956a13a6db9e6d126c6a3770d45a4e4d2 src/admin/web/app/overview-wide-metrics.js
|
||||||
e799e0406c7ff54cbf71faf704a20265bdf5180a8ed2f26388d0775231365410 src/admin/web/app/path-permissions.js
|
e799e0406c7ff54cbf71faf704a20265bdf5180a8ed2f26388d0775231365410 src/admin/web/app/path-permissions.js
|
||||||
cadc85eef6bc5226c99d1273d92aefe2ff5448143ce0722eab83ba90f978610d src/admin/web/app/preferences.js
|
8aa409b64235e121e5900ca58d5ac0e2521e82e6fa3dc4332ddb4a898ff88081 src/admin/web/app/preferences.js
|
||||||
30ec0a7027215eae63946689af2c042de0cf468a6b1054535694da4dd4214cdb src/admin/web/app/rate-sampling.js
|
30ec0a7027215eae63946689af2c042de0cf468a6b1054535694da4dd4214cdb src/admin/web/app/rate-sampling.js
|
||||||
3b8e566d81a5b94ef21c73e7805ae128454f085554de9358040de266bcbdb0e0 src/admin/web/app/refresh.js
|
3b8e566d81a5b94ef21c73e7805ae128454f085554de9358040de266bcbdb0e0 src/admin/web/app/refresh.js
|
||||||
62571928e3c2dfb5348c2526c491ffdbd0f7be5c4a807e1e9cae1e913cd33490 src/admin/web/app/runtime.js
|
62571928e3c2dfb5348c2526c491ffdbd0f7be5c4a807e1e9cae1e913cd33490 src/admin/web/app/runtime.js
|
||||||
31201586925e6f4792071d7d03fb05dcc4a69a03c02a4e85eb0746f45af68074 src/admin/web/app/session-resume.js
|
31201586925e6f4792071d7d03fb05dcc4a69a03c02a4e85eb0746f45af68074 src/admin/web/app/session-resume.js
|
||||||
dcc51a9bebc5c23c21fca134b6ece663ff2b7be8d7a3124ff27a1ec75750e737 src/admin/web/app/settings.js
|
0224cb339002c824f2f26d306af67df0eb7f60b37a337148209b9f800aa9acc8 src/admin/web/app/settings.js
|
||||||
2281f06990f86acd3ff12fa368e1b73e4c83601e20245f24abbce389dfccb77f src/admin/web/app/sidebar.js
|
2281f06990f86acd3ff12fa368e1b73e4c83601e20245f24abbce389dfccb77f src/admin/web/app/sidebar.js
|
||||||
b7ead49224a4ec67181d3f24f9d9634bd6d76756f826a4d5d993300637d1d8f3 src/admin/web/app/stream-dashboard.js
|
b7ead49224a4ec67181d3f24f9d9634bd6d76756f826a4d5d993300637d1d8f3 src/admin/web/app/stream-dashboard.js
|
||||||
7de070cc8cdde45d7e0932259299e341e25b32c9ffbd87e4fcce934d0f090de4 src/admin/web/app/web-overview.js
|
7de070cc8cdde45d7e0932259299e341e25b32c9ffbd87e4fcce934d0f090de4 src/admin/web/app/web-overview.js
|
||||||
3563508f45f740f0cc0e84c72eb79045c0cb54d6fa06a50326a3a219221e0010 src/admin/web/cache-panel.js
|
3563508f45f740f0cc0e84c72eb79045c0cb54d6fa06a50326a3a219221e0010 src/admin/web/cache-panel.js
|
||||||
60f512d7748ccf98cca7c0a04789d8a5da6415e5575a715380791cb13ea7c516 src/admin/web/cache-rules.js
|
d8e791a018efb547fa5da51f7c17899fa6a49b853fea254e00a4dd61c74b4a98 src/admin/web/cache-rules.js
|
||||||
03dd9e45d3f7a69ec8f37a5d5a16f3d24d2feecfde1704be79ff5d81aa5f7ae1 src/admin/web/certificate-api.js
|
6288b0a8228d828ac2e2535ace2d1aefd1c04011e789eb97f7279129874ac35c src/admin/web/certificate-api.js
|
||||||
f554ca7179fe4d97ae24aa004d4bc9ada5f84fc78257891933a7fed728006ef8 src/admin/web/css/00-tokens.css
|
f554ca7179fe4d97ae24aa004d4bc9ada5f84fc78257891933a7fed728006ef8 src/admin/web/css/00-tokens.css
|
||||||
741a0cc0c122215d738b7cb62a032e6f1892486e3193083e1cc7a8d4cc90a540 src/admin/web/css/10-base.css
|
741a0cc0c122215d738b7cb62a032e6f1892486e3193083e1cc7a8d4cc90a540 src/admin/web/css/10-base.css
|
||||||
e360478a3dc3a3b316cc94712480f8c5cb1f8e78e5240613deda240ac4c16abe src/admin/web/css/20-shell.css
|
e360478a3dc3a3b316cc94712480f8c5cb1f8e78e5240613deda240ac4c16abe src/admin/web/css/20-shell.css
|
||||||
7c29e87273b3c639602753cd61ee3b9e86a75c693b4b474eab21948d491174e7 src/admin/web/css/30-overview.css
|
5d676a34a081300b9844d996654e4880f803468c6d87d1674dfef25549a11511 src/admin/web/css/30-overview.css
|
||||||
0add07b86b25e0675ae0869561723663312067e10083fb6eb1609006429741d9 src/admin/web/css/40-editors.css
|
fef9a90926ae90b61f24a989488ca2c49addb3df70452953d316899b3bf18d84 src/admin/web/css/40-editors.css
|
||||||
5d304c39628f653a677fa390746f6747478338a11ebe448f3b55551fe18e2bb3 src/admin/web/css/50-settings.css
|
53f59ad39e41271fca2ea1a0ed694be1e80d28bbfc934558bd48b9227723f9d2 src/admin/web/css/50-settings.css
|
||||||
a2941410b885ac4487c2dc9003fb1d1073c163d707b5d085a15d9e8a8a628e03 src/admin/web/css/60-monitoring.css
|
a2941410b885ac4487c2dc9003fb1d1073c163d707b5d085a15d9e8a8a628e03 src/admin/web/css/60-monitoring.css
|
||||||
cc9b22431e5e141930eccf7cf8afa1ee8b7fb0ce8fd59410d2c1b000636084a2 src/admin/web/css/70-responsive.css
|
0b898103ac6e445734c8f54d505788642c0670530bb4833b1df979b786446b3e src/admin/web/css/70-responsive.css
|
||||||
8009afdb04d5170687816730cc930a22fead1fe0248835ca7e8de81d6907395d src/admin/web/css/README.md
|
8009afdb04d5170687816730cc930a22fead1fe0248835ca7e8de81d6907395d src/admin/web/css/README.md
|
||||||
8241bd9489dfed082863948829a44a49bf0a8e9cd63c55809655109e393e0918 src/admin/web/css/manifest.json
|
8241bd9489dfed082863948829a44a49bf0a8e9cd63c55809655109e393e0918 src/admin/web/css/manifest.json
|
||||||
78bf6179f769b68d518028464697e50dea5d75e33ecb1b89d88e2c2b01e86bf2 src/admin/web/dashboard-defaults.json
|
78bf6179f769b68d518028464697e50dea5d75e33ecb1b89d88e2c2b01e86bf2 src/admin/web/dashboard-defaults.json
|
||||||
355046ecb80ce6adb73ceabd29825b0cf79ca364771070cedd5eb44760fae890 src/admin/web/dashboard-widgets.json
|
355046ecb80ce6adb73ceabd29825b0cf79ca364771070cedd5eb44760fae890 src/admin/web/dashboard-widgets.json
|
||||||
50d1ebcbaf4d0b2968da23bb943fc3f67131c5d32df3f61d23ff37aad9da5b81 src/admin/web/demo.html
|
50d1ebcbaf4d0b2968da23bb943fc3f67131c5d32df3f61d23ff37aad9da5b81 src/admin/web/demo.html
|
||||||
f85d7c46a9dcd8138feef8ec6fca7778cf3f06b02b9b91fbc17f7e1b14f0c593 src/admin/web/docker.js
|
eb5aad8daaa3d2201bacafca6863e77bbef0932ac2027287e87018e0838dd8b5 src/admin/web/docker.js
|
||||||
8bf5d1f4f06d6e87536d808a680bf3d3a0c90c1637df0e58da667fd22ad4782d src/admin/web/docs.css
|
8bf5d1f4f06d6e87536d808a680bf3d3a0c90c1637df0e58da667fd22ad4782d src/admin/web/docs.css
|
||||||
aeffd403fa1823df7d9fa4c48280b4033b2d15e4cb9f66608caff89290de0a52 src/admin/web/docs.html
|
aeffd403fa1823df7d9fa4c48280b4033b2d15e4cb9f66608caff89290de0a52 src/admin/web/docs.html
|
||||||
306db8db9e4d651a85e09dbc15464e7f920d7fe5bd9ec9d1d8068321eb0106ab src/admin/web/docs.js
|
306db8db9e4d651a85e09dbc15464e7f920d7fe5bd9ec9d1d8068321eb0106ab src/admin/web/docs.js
|
||||||
@@ -262,7 +265,7 @@ e6c4d91d1542d0a5b47bb8736f9539d43a6713df5a473b635519d5b7eac2eb9c src/admin/web/
|
|||||||
0a5fff35555153f59d4346933030a67b6e1a8768cee7a47cfa2fcf1a2c564f63 src/admin/web/favicon.svg
|
0a5fff35555153f59d4346933030a67b6e1a8768cee7a47cfa2fcf1a2c564f63 src/admin/web/favicon.svg
|
||||||
dad1498b1dca57b4f0ad4e13e047332b66b59a8ce2f398b090bc952279b808cb src/admin/web/file-logs.js
|
dad1498b1dca57b4f0ad4e13e047332b66b59a8ce2f398b090bc952279b808cb src/admin/web/file-logs.js
|
||||||
882e99059bb2ff110c452eadc0b5779a16af1e34cb1b2536c80cf2056f8c3e8a src/admin/web/host404.js
|
882e99059bb2ff110c452eadc0b5779a16af1e34cb1b2536c80cf2056f8c3e8a src/admin/web/host404.js
|
||||||
a994313290a4620a6070d12ce5a434ac39274b7bca04a26536ea54656d45be2e src/admin/web/index.html
|
aea8f6f33a43e62701c4729758cd92d110380fb5b668f385cc4206aaec5e1bfa src/admin/web/index.html
|
||||||
0d6a24d4d25ff43a5bbbfcc2b8930db68476c940f09799e6c37c8144007cc7ab src/admin/web/integrations.js
|
0d6a24d4d25ff43a5bbbfcc2b8930db68476c940f09799e6c37c8144007cc7ab src/admin/web/integrations.js
|
||||||
7a12f020fc587205694978ab41b660e9a80487d413fbf6e34fc525eabc58308f src/admin/web/login-keys.json
|
7a12f020fc587205694978ab41b660e9a80487d413fbf6e34fc525eabc58308f src/admin/web/login-keys.json
|
||||||
ac9f667273918e18406df06cb2613c923f50a88897693a03a18f500e22dc6ec2 src/admin/web/login.html
|
ac9f667273918e18406df06cb2613c923f50a88897693a03a18f500e22dc6ec2 src/admin/web/login.html
|
||||||
@@ -272,20 +275,22 @@ c2e5f554810b8e34fb47361fb90a01073a2e332ee26d82e030956fad3ec1f83e src/admin/web/
|
|||||||
1fcbe9017bd6f32cdbdcf65fcc6f4342daf9632a5e1a97c7a3a56d76cbe87095 src/admin/web/partials/overview-metrics.html
|
1fcbe9017bd6f32cdbdcf65fcc6f4342daf9632a5e1a97c7a3a56d76cbe87095 src/admin/web/partials/overview-metrics.html
|
||||||
80d6eb03f204a90f7b140c5b053d0fd8facb350b1c96b74fa1402e2a35d4fb10 src/admin/web/prometheus-token.js
|
80d6eb03f204a90f7b140c5b053d0fd8facb350b1c96b74fa1402e2a35d4fb10 src/admin/web/prometheus-token.js
|
||||||
6f33915d33d3a8bbfaeec424651a63eda3d23b0f296ae028a59ea46463ba9fdf src/admin/web/redirects.js
|
6f33915d33d3a8bbfaeec424651a63eda3d23b0f296ae028a59ea46463ba9fdf src/admin/web/redirects.js
|
||||||
a6bf1772b4cc4d4dd8a25165c7e0ec3fa9b39d2eda893e24d3beef814d760e85 src/admin/web/settings.js
|
709ed3db37e73f9491c22c48bd31b55ddf41acee4ce96282f21957bba564484f src/admin/web/settings.js
|
||||||
8eadbada619b15087783dcfa0e889a81f88e78034d084c5ab616f7912b835940 src/admin/web/status_200.html
|
8eadbada619b15087783dcfa0e889a81f88e78034d084c5ab616f7912b835940 src/admin/web/status_200.html
|
||||||
a5191e1272939014a21b8d16588704952e9a705b02bd87fd8f8baca0a64ca919 src/admin/web/streams.js
|
a5191e1272939014a21b8d16588704952e9a705b02bd87fd8f8baca0a64ca919 src/admin/web/streams.js
|
||||||
9d9eb0c2395334836bb1c40f0a9cc946780d5ac7290770d6448628b7c4686140 src/admin/web/system-info.js
|
9d9eb0c2395334836bb1c40f0a9cc946780d5ac7290770d6448628b7c4686140 src/admin/web/system-info.js
|
||||||
|
69c8e90aee4759ca7c509fcf27534982c9c72b2e661649c06fb873bdb04ca504 src/admin/web/tls-configurator.js
|
||||||
dd697c7c46e40da006b61220a90ed9579c3c08c1484a96dc746314d5b4c4f3ea src/admin/web/traffic-panel.js
|
dd697c7c46e40da006b61220a90ed9579c3c08c1484a96dc746314d5b4c4f3ea src/admin/web/traffic-panel.js
|
||||||
675ea169d4cc55fda5e291af536338b882bede1eaa6c9d5cc7dfde0779c7c4d1 src/admin/web/transform-panel.js
|
675ea169d4cc55fda5e291af536338b882bede1eaa6c9d5cc7dfde0779c7c4d1 src/admin/web/transform-panel.js
|
||||||
952c82e5d656db19d68fef19c310941f4102b1900620486d26932a24195abd08 src/admin/web/vhosts/core.js
|
c9afb921a436429068738de42344d5d85c1fd706d6b2e26cea9699b83072290d src/admin/web/vhosts/core.js
|
||||||
c8e33e9401b49648098b59bc2c3f5542be35cf44c00c7d04050a6d7fe4525e51 src/admin/web/vhosts/editor.js
|
fca28ef97ffee213bd854ded4acdd90f8a55d269ee730b4e15ba1aebcf50fbd0 src/admin/web/vhosts/editor.js
|
||||||
3776f72d7051af86ac5fbdd4581040dd88a424c0c6cde789301b032b159094d8 src/admin/web/vhosts/health.js
|
3776f72d7051af86ac5fbdd4581040dd88a424c0c6cde789301b032b159094d8 src/admin/web/vhosts/health.js
|
||||||
b3239e67901f1796d7a974ade0796f2e3590ff8064628a5629b78c7f6ce2f32e src/admin/web/vhosts/protocol.js
|
b3239e67901f1796d7a974ade0796f2e3590ff8064628a5629b78c7f6ce2f32e src/admin/web/vhosts/protocol.js
|
||||||
8c3da49973c62333559b0e3588c02beb0b425c025eac5cfa82a1bb968f70d9dd src/admin/web/vhosts/rates.js
|
8c3da49973c62333559b0e3588c02beb0b425c025eac5cfa82a1bb968f70d9dd src/admin/web/vhosts/rates.js
|
||||||
9ae02166d190fd3ea0f2946912df6edd036f3c2727950277ae1a31768e2133f2 src/admin/web/vhosts/render.js
|
9ae02166d190fd3ea0f2946912df6edd036f3c2727950277ae1a31768e2133f2 src/admin/web/vhosts/render.js
|
||||||
4dfdeb7c73c2775eacaca65fd8ef1dc80b275421b15522d319d338f5b96288cc src/admin/web/web-server-profiles.js
|
4dfdeb7c73c2775eacaca65fd8ef1dc80b275421b15522d319d338f5b96288cc src/admin/web/web-server-profiles.js
|
||||||
f9854526ff1567de47ecb02af872bca6e13c0adb984ad5ef0c256e5fdbb3902e src/admin/web/web-server.js
|
f9854526ff1567de47ecb02af872bca6e13c0adb984ad5ef0c256e5fdbb3902e src/admin/web/web-server.js
|
||||||
|
36f11beed56711640bb56bb6f452bf76dec2ce4be6a57e8abc19560af477c870 src/alerts.rs
|
||||||
2d40c2cb32d7365df0c9cd6c8cb6f0483c7a799786c648f4836a0d9740c6c5ef src/auth/files/mod.rs
|
2d40c2cb32d7365df0c9cd6c8cb6f0483c7a799786c648f4836a0d9740c6c5ef src/auth/files/mod.rs
|
||||||
b2f948bcc3dbd24952c7b1b02d41d06757f49f0c38a78caf51f8f8a687d8480d src/auth/files/tests.rs
|
b2f948bcc3dbd24952c7b1b02d41d06757f49f0c38a78caf51f8f8a687d8480d src/auth/files/tests.rs
|
||||||
50ef648351271d78310e00caa6d246e0009171ed036a3e4e1144737df8c064c2 src/auth/mod.rs
|
50ef648351271d78310e00caa6d246e0009171ed036a3e4e1144737df8c064c2 src/auth/mod.rs
|
||||||
@@ -350,8 +355,8 @@ e26dce02df9c043329ca164fed215d271781bce8fb03240f528331bf3df6b9d7 src/cache/poli
|
|||||||
b3b05b291922834dfe170c5961f6c395d9209c3904111834a70d8aca2468f803 src/cache/policy/response.rs
|
b3b05b291922834dfe170c5961f6c395d9209c3904111834a70d8aca2468f803 src/cache/policy/response.rs
|
||||||
12a6d5d9d6711e956391b4b952e8149658b8bf64cfcc0a4c59c281f2630a6aac src/cache/policy/scope_tests.rs
|
12a6d5d9d6711e956391b4b952e8149658b8bf64cfcc0a4c59c281f2630a6aac src/cache/policy/scope_tests.rs
|
||||||
c3a4300f7cdb6b2b7c16fbc489d49ba2451331bb4a55a2d9f618c684fd61eecb src/cache/range.rs
|
c3a4300f7cdb6b2b7c16fbc489d49ba2451331bb4a55a2d9f618c684fd61eecb src/cache/range.rs
|
||||||
b02744a7d310cebd2608db07e6ffaf43c20df564266cbefbff8181ec75b3eccc src/cache/rules.rs
|
996c95b7e677ac630bc4d6613bfbad464a2d689cf30b138b5553ba6a077b4a48 src/cache/rules.rs
|
||||||
88f3f5acc88ae92a4a0695de791dade6186365c5a1b9a931f3f30cc039754691 src/cache/rules_tests.rs
|
76af193fa84aba7ebfdde4db3eb58c0abe44f94525497c0677237460e1a79248 src/cache/rules_tests.rs
|
||||||
ddbbf6565ef930dfb4cfa1dbfca7a58e36224382aae789f89b69a910a3b74866 src/cache/stats.rs
|
ddbbf6565ef930dfb4cfa1dbfca7a58e36224382aae789f89b69a910a3b74866 src/cache/stats.rs
|
||||||
2981e35a7fbbc2b36214b5518f4ba97d57c1d2e01f4f375175c4b2c6be955927 src/cache/tests.rs
|
2981e35a7fbbc2b36214b5518f4ba97d57c1d2e01f4f375175c4b2c6be955927 src/cache/tests.rs
|
||||||
b969394b04859b269dcecd8958b1aab40b532709512714e9900f0ecad6b6d0c5 src/cache/tickets.rs
|
b969394b04859b269dcecd8958b1aab40b532709512714e9900f0ecad6b6d0c5 src/cache/tickets.rs
|
||||||
@@ -362,9 +367,9 @@ a1132b980833b1b4ce2bba9aa681ff255a0e2d61faaa65a316860da503ea1e27 src/cache/v022
|
|||||||
8de82d9188c9c337690c6ec4afdad9fff20651c358e34602a93d8bb8c3d2489a src/compression/tests.rs
|
8de82d9188c9c337690c6ec4afdad9fff20651c358e34602a93d8bb8c3d2489a src/compression/tests.rs
|
||||||
e695079333ebdc2a6e7b3337cfabef171b3a0a01da0597b77feff70d417f833e src/config.rs
|
e695079333ebdc2a6e7b3337cfabef171b3a0a01da0597b77feff70d417f833e src/config.rs
|
||||||
9f138f86a8d73dfc2d28a2c66d131751c8c85af9c9ccdf22938736973c963678 src/config/backend.rs
|
9f138f86a8d73dfc2d28a2c66d131751c8c85af9c9ccdf22938736973c963678 src/config/backend.rs
|
||||||
38581b289d4d6b134bca9d8b907d3e430488f783face5c19406935ab9e14b891 src/config/compile.rs
|
14a492d853f78681cdfb3ec6a8eb4ccb0155e0acd8b240ce2d7c13a4d049ddf2 src/config/compile.rs
|
||||||
fbea01fea1213d98aea812c1b78d5db289e09200b98ae514d742235cd3fa70e1 src/config/internal_routing.rs
|
fbea01fea1213d98aea812c1b78d5db289e09200b98ae514d742235cd3fa70e1 src/config/internal_routing.rs
|
||||||
cc75698be2828000e88f2c482bd26f2fa4050e3432bec1b5a581dca17fef4a37 src/config/model.rs
|
c0446a45e3bc8547dcce51579ea137e5c0e1e89f17d4dada950382909ee85745 src/config/model.rs
|
||||||
75839458ddbc7480ec4492a95eeb67b617ba7d62f7b67e7a767a3453b74dbcbc src/config/route_policy_tests.rs
|
75839458ddbc7480ec4492a95eeb67b617ba7d62f7b67e7a767a3453b74dbcbc src/config/route_policy_tests.rs
|
||||||
b07abc119aac079f4bc4715a1e0dea735f84eb50f760b97ce429fbd8cee33106 src/config/routing.rs
|
b07abc119aac079f4bc4715a1e0dea735f84eb50f760b97ce429fbd8cee33106 src/config/routing.rs
|
||||||
b33c45184e6451e15ce238cc922d2116269a1bf1d72093c2cdc068c4386a35bd src/config/snapshot.rs
|
b33c45184e6451e15ce238cc922d2116269a1bf1d72093c2cdc068c4386a35bd src/config/snapshot.rs
|
||||||
@@ -380,9 +385,9 @@ dada314e1709e960eb2e225b4d10c3cd12606c62c4bc2c0220aec1ba133e4ade src/demo.rs
|
|||||||
d2ef07d1565569f520a6a8eb01f4ea9bb673499d038018d52e65fe95e800bb27 src/diagnostics.rs
|
d2ef07d1565569f520a6a8eb01f4ea9bb673499d038018d52e65fe95e800bb27 src/diagnostics.rs
|
||||||
045593a42a6e4f632e5052c655788f0843faa313fc929265b89509f6dfff91ed src/docker.rs
|
045593a42a6e4f632e5052c655788f0843faa313fc929265b89509f6dfff91ed src/docker.rs
|
||||||
3e3383b344e33a4a0b818f39309076c973db0a670eb4c4dc5acab63ad801c59e src/docker/client.rs
|
3e3383b344e33a4a0b818f39309076c973db0a670eb4c4dc5acab63ad801c59e src/docker/client.rs
|
||||||
05cce4d9b8be354b86b10bde411edbf8b3421fca0ab8d53fe62a4fa4ad2ab6bd src/docker/model.rs
|
37ba0b6efea693f3cb2b8b3b1e682b5909ca6f15af71d219fe422c5a04c0e791 src/docker/model.rs
|
||||||
97a5ecb3bb90f3641b9691e8f86ba694f62ca7db1a817a8463d90fc5fc5978d3 src/docker/reconcile.rs
|
b60d9836f0fbde95f6d31b6ec7cf08b253774de0be0d4ea9a1f58b3670680386 src/docker/reconcile.rs
|
||||||
7e91ee27cd729b0484dbb380ead33d54d2922c08c9df623b1fffbb82a26f520d src/docker/tests.rs
|
279058e42aa043dca0e4c96108125468a44ceb1a9ab49d3b7566681790b53784 src/docker/tests.rs
|
||||||
34eb55a240928e98bd34e790ac63096b9ca8bf7a3008676dbbd11e1a392b8541 src/forward_auth/mod.rs
|
34eb55a240928e98bd34e790ac63096b9ca8bf7a3008676dbbd11e1a392b8541 src/forward_auth/mod.rs
|
||||||
6c25951cf69e972c47cdf815f22a5062916b2b768e39d55a26a5fc9e625a2344 src/forward_auth/tests.rs
|
6c25951cf69e972c47cdf815f22a5062916b2b768e39d55a26a5fc9e625a2344 src/forward_auth/tests.rs
|
||||||
5d32cf9177a33d6fb50452541805b10ae1b0833e709d833f5bd1fc6907193ffb src/forwarding.rs
|
5d32cf9177a33d6fb50452541805b10ae1b0833e709d833f5bd1fc6907193ffb src/forwarding.rs
|
||||||
@@ -403,7 +408,7 @@ cfc75486e69c310fa6e7bf0448ed39a20cdad9dd8afe75e01592fc7c76a380db src/geoip/test
|
|||||||
49ce4452ef7973cafa2e4071e2e14be0e16000e931a6501e4dc613652e49e230 src/http3/identity.rs
|
49ce4452ef7973cafa2e4071e2e14be0e16000e931a6501e4dc613652e49e230 src/http3/identity.rs
|
||||||
0b41072f6bcf28725c80f471584cd55d4900424ce5d55ac7f6909813788c63fd src/http3/settings.rs
|
0b41072f6bcf28725c80f471584cd55d4900424ce5d55ac7f6909813788c63fd src/http3/settings.rs
|
||||||
5c550075c7b0fe687ad02095c1cad57b46b579fe21dc5371525b6c77db459886 src/http3/tests.rs
|
5c550075c7b0fe687ad02095c1cad57b46b579fe21dc5371525b6c77db459886 src/http3/tests.rs
|
||||||
ad0fc77b4065e4e59e97db60d77970c7336386e43b779198abcc727245f8c791 src/lib.rs
|
5283ed67afe19f67d9021a90df6c979e5a27804116b733765b0a44d39d45ef7d src/lib.rs
|
||||||
e8399753a6ff49b7de19edb0a268bf871c9979a518354160cf07b4669051fcbb src/logging.rs
|
e8399753a6ff49b7de19edb0a268bf871c9979a518354160cf07b4669051fcbb src/logging.rs
|
||||||
e4be3ad758c3d93ce52dd3b1ab1a87810e5226339400ed997607a5b746354751 src/logging/error_runtime.rs
|
e4be3ad758c3d93ce52dd3b1ab1a87810e5226339400ed997607a5b746354751 src/logging/error_runtime.rs
|
||||||
e9795eaa3e743c09f5ab0e18e6d359bc97a3aee55510c74923532d64df90c873 src/logging/format.rs
|
e9795eaa3e743c09f5ab0e18e6d359bc97a3aee55510c74923532d64df90c873 src/logging/format.rs
|
||||||
@@ -450,7 +455,7 @@ d0d64fd4dd89efd4a9fe089ff4551815cbeaf5b883ddcff803f1b13b5e918dc2 src/proxy/forw
|
|||||||
016bb2719511df1fc5c70256fd7d917b95e9b4ee6044c205537472737b1f6089 src/proxy/forward/cache_lookup.rs
|
016bb2719511df1fc5c70256fd7d917b95e9b4ee6044c205537472737b1f6089 src/proxy/forward/cache_lookup.rs
|
||||||
287012c81144d8f15af4a148ce3ca911d431bc59adff44e697567561aa372bb3 src/proxy/forward/h3_navigation_tests.rs
|
287012c81144d8f15af4a148ce3ca911d431bc59adff44e697567561aa372bb3 src/proxy/forward/h3_navigation_tests.rs
|
||||||
a2a097852d126851fc7191c2fda65764dc842745ad657b970399c1f906caf114 src/proxy/forward/response.rs
|
a2a097852d126851fc7191c2fda65764dc842745ad657b970399c1f906caf114 src/proxy/forward/response.rs
|
||||||
f8f07bfd98d52e2908b4dbfa85b3a37cf8ac699dd834e2aac2f95cf431966145 src/proxy/forward/route_cache.rs
|
7ade7fe7642c38ccab876cf260e7363ed30f4e9987bd3b98ee97384e5592a6ec src/proxy/forward/route_cache.rs
|
||||||
bb3c264772dd246521145a7d0fa538b1a34e1abe906cb69c7348e5d97c98ccae src/proxy/forward/success_finish.rs
|
bb3c264772dd246521145a7d0fa538b1a34e1abe906cb69c7348e5d97c98ccae src/proxy/forward/success_finish.rs
|
||||||
3c10a4a582d22bbc3ee9bbcfddc2d670cf20d97ad9394608afd4d4fc968af0e4 src/proxy/forward/success_prepare.rs
|
3c10a4a582d22bbc3ee9bbcfddc2d670cf20d97ad9394608afd4d4fc968af0e4 src/proxy/forward/success_prepare.rs
|
||||||
c965dba1d2639b338f3f3cfc17f760786a30abab708dfb7920ea3bc94d4d734b src/proxy/forward/upstream.rs
|
c965dba1d2639b338f3f3cfc17f760786a30abab708dfb7920ea3bc94d4d734b src/proxy/forward/upstream.rs
|
||||||
@@ -583,7 +588,7 @@ f00743af2cf4a5952caef7a1dcf68e7817b5599a252a9973e1c22045517c0b0e tests/fixtures
|
|||||||
102b83171a6429b6375d8001d6c5294702385cd58ee55727cb657b1f3566e877 tests/panel_icons_browser.py
|
102b83171a6429b6375d8001d6c5294702385cd58ee55727cb657b1f3566e877 tests/panel_icons_browser.py
|
||||||
c4030b7d224553312012b1f25153dd3545e83de7bccff2894c0e8f7e0e84b721 tests/panel_icons_contract.js
|
c4030b7d224553312012b1f25153dd3545e83de7bccff2894c0e8f7e0e84b721 tests/panel_icons_contract.js
|
||||||
886c89e8517f34af5e2aef9672a8de559f94c536b028f1b9cadf2a2a7220d826 tests/panel_interface_contract.py
|
886c89e8517f34af5e2aef9672a8de559f94c536b028f1b9cadf2a2a7220d826 tests/panel_interface_contract.py
|
||||||
6176c7a70ca692ba9879f74040a25e2e7520fd53bb501e991452aa0f1c02a7d3 tests/panel_refresh_contract.js
|
5aa5e5b11d8fb65e889a720962256d4ea32b226570b1e5de76ac63c448560d4a tests/panel_refresh_contract.js
|
||||||
e24a0f84f1bfc46964df865ac387d651f7b384d781cbc8f3a9a5b0b60f3d69ca tests/vhost_auth_selection.js
|
e24a0f84f1bfc46964df865ac387d651f7b384d781cbc8f3a9a5b0b60f3d69ca tests/vhost_auth_selection.js
|
||||||
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 third_party/swagger-ui-5.33.1/LICENSE
|
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 third_party/swagger-ui-5.33.1/LICENSE
|
||||||
0d20d1adef18aee3f40dd258172155521ce702ac445cb5f7b7d60ed32dad2fb2 third_party/swagger-ui-5.33.1/NOTICE
|
0d20d1adef18aee3f40dd258172155521ce702ac445cb5f7b7d60ed32dad2fb2 third_party/swagger-ui-5.33.1/NOTICE
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
path.display()
|
path.display()
|
||||||
);
|
);
|
||||||
let content = fs::read(&path).expect("read language JSON");
|
let content = fs::read(&path).expect("read language JSON");
|
||||||
assert!(content.len() <= 262_144, "language pack exceeds 256 KiB");
|
assert!(content.len() <= 524_288, "language pack exceeds 512 KiB");
|
||||||
let pack: Value =
|
let pack: Value =
|
||||||
serde_json::from_slice(&content).unwrap_or_else(|e| panic!("{}: {e}", path.display()));
|
serde_json::from_slice(&content).unwrap_or_else(|e| panic!("{}: {e}", path.display()));
|
||||||
let meta = pack["meta"]
|
let meta = pack["meta"]
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Both installation types use the **same** config and certificate paths, but diffe
|
|||||||
|
|
||||||
### Removing or upgrading the package
|
### Removing or upgrading the package
|
||||||
|
|
||||||
Upgrades do not reset credentials or private state. The environment file is installed with `config|noreplace`; local edits remain in place according to package-manager conffile behavior. Removal does not delete `/etc/rustproxy/docker-agent.env` or `/var/lib/rustproxy-docker-agent` (back these up separately).
|
Upgrades do not reset credentials or private state. Since 0.37.2 the systemd unit allows `AF_NETLINK` in `RestrictAddressFamilies` so the agent can list all host interfaces (before, only the routed, public and override addresses appeared). A unit copied by hand to `/etc/systemd/system/` is not replaced by an upgrade: copy the new `rustproxy-docker-agent.service`, run `systemctl daemon-reload` and restart the agent. Without netlink the agent reads the addresses from `/proc/net` instead. The environment file is installed with `config|noreplace`; local edits remain in place according to package-manager conffile behavior. Removal does not delete `/etc/rustproxy/docker-agent.env` or `/var/lib/rustproxy-docker-agent` (back these up separately).
|
||||||
|
|
||||||
## Container labels and state
|
## Container labels and state
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
var version = "0.37.1" // overridden by the package builder using -ldflags -X main.version
|
var version = "0.37.2" // overridden by the package builder using -ldflags -X main.version
|
||||||
|
|
||||||
type config struct {
|
type config struct {
|
||||||
Listen string
|
Listen string
|
||||||
|
|||||||
+134
-2
@@ -1,10 +1,14 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/binary"
|
||||||
|
"encoding/hex"
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -87,15 +91,122 @@ func bridgeHostAddresses() []hostAddress {
|
|||||||
return interfaceAddresses(true)
|
return interfaceAddresses(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func interfaceAddresses(bridges bool) []hostAddress {
|
type procAddress struct {
|
||||||
interfaces, err := net.Interfaces()
|
iface string
|
||||||
|
ip string
|
||||||
|
}
|
||||||
|
|
||||||
|
func procIPv6Addresses(path string) []procAddress {
|
||||||
|
file, err := os.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
defer file.Close()
|
||||||
|
out := make([]procAddress, 0)
|
||||||
|
scanner := bufio.NewScanner(file)
|
||||||
|
for scanner.Scan() {
|
||||||
|
fields := strings.Fields(scanner.Text())
|
||||||
|
if len(fields) < 6 || len(fields[0]) != 32 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
raw, err := hex.DecodeString(fields[0])
|
||||||
|
if err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
out = append(out, procAddress{iface: fields[5], ip: net.IP(raw).String()})
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
type procRoute struct {
|
||||||
|
iface string
|
||||||
|
network *net.IPNet
|
||||||
|
}
|
||||||
|
|
||||||
|
func procIPv4Routes(path string) []procRoute {
|
||||||
|
file, err := os.Open(path)
|
||||||
|
if err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
out := make([]procRoute, 0)
|
||||||
|
scanner := bufio.NewScanner(file)
|
||||||
|
for scanner.Scan() {
|
||||||
|
fields := strings.Fields(scanner.Text())
|
||||||
|
if len(fields) < 8 || fields[0] == "Iface" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
destination, errDestination := hex.DecodeString(fields[1])
|
||||||
|
mask, errMask := hex.DecodeString(fields[7])
|
||||||
|
if errDestination != nil || errMask != nil || len(destination) != 4 || len(mask) != 4 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
ip := make(net.IP, 4)
|
||||||
|
binary.BigEndian.PutUint32(ip, binary.LittleEndian.Uint32(destination))
|
||||||
|
ipMask := make(net.IPMask, 4)
|
||||||
|
binary.BigEndian.PutUint32(ipMask, binary.LittleEndian.Uint32(mask))
|
||||||
|
if ones, _ := ipMask.Size(); ones == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
out = append(out, procRoute{iface: fields[0], network: &net.IPNet{IP: ip, Mask: ipMask}})
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
func procIPv4Local(path string) []string {
|
||||||
|
file, err := os.Open(path)
|
||||||
|
if err != nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
defer file.Close()
|
||||||
|
out := make([]string, 0)
|
||||||
|
seen := make(map[string]bool)
|
||||||
|
last := ""
|
||||||
|
scanner := bufio.NewScanner(file)
|
||||||
|
for scanner.Scan() {
|
||||||
|
line := strings.TrimSpace(scanner.Text())
|
||||||
|
if strings.HasPrefix(line, "|--") {
|
||||||
|
last = strings.TrimSpace(strings.TrimPrefix(line, "|--"))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if strings.Contains(line, "host LOCAL") && last != "" && !seen[last] {
|
||||||
|
seen[last] = true
|
||||||
|
out = append(out, last)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
func procAddresses(root string) []procAddress {
|
||||||
|
out := procIPv6Addresses(root + "/if_inet6")
|
||||||
|
routes := procIPv4Routes(root + "/route")
|
||||||
|
for _, raw := range procIPv4Local(root + "/fib_trie") {
|
||||||
|
ip := net.ParseIP(raw).To4()
|
||||||
|
if ip == nil || ip.IsLoopback() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
best, bestOnes := "", -1
|
||||||
|
for _, route := range routes {
|
||||||
|
if ones, _ := route.network.Mask.Size(); route.network.Contains(ip) && ones > bestOnes {
|
||||||
|
best, bestOnes = route.iface, ones
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if best != "" {
|
||||||
|
out = append(out, procAddress{iface: best, ip: ip.String()})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
func interfaceAddresses(bridges bool) []hostAddress {
|
||||||
source := "interface"
|
source := "interface"
|
||||||
if bridges {
|
if bridges {
|
||||||
source = "bridge"
|
source = "bridge"
|
||||||
}
|
}
|
||||||
|
interfaces, err := net.Interfaces()
|
||||||
|
if err != nil {
|
||||||
|
return procInterfaceAddresses(procAddresses("/proc/net"), bridges, source)
|
||||||
|
}
|
||||||
out := make([]hostAddress, 0)
|
out := make([]hostAddress, 0)
|
||||||
for _, iface := range interfaces {
|
for _, iface := range interfaces {
|
||||||
if iface.Flags&net.FlagUp == 0 || iface.Flags&net.FlagLoopback != 0 {
|
if iface.Flags&net.FlagUp == 0 || iface.Flags&net.FlagLoopback != 0 {
|
||||||
@@ -132,6 +243,27 @@ func interfaceAddresses(bridges bool) []hostAddress {
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func procInterfaceAddresses(items []procAddress, bridges bool, source string) []hostAddress {
|
||||||
|
out := make([]hostAddress, 0)
|
||||||
|
for _, item := range items {
|
||||||
|
if item.iface == "lo" || bridges != bridgeInterface(item.iface) || (!bridges && skipInterface(item.iface)) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
clean := validIP(item.ip)
|
||||||
|
if clean == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
out = append(out, hostAddress{IP: clean, Source: source, Interface: item.iface, Scope: ipScope(net.ParseIP(clean))})
|
||||||
|
}
|
||||||
|
sort.Slice(out, func(i, j int) bool {
|
||||||
|
if out[i].Interface != out[j].Interface {
|
||||||
|
return out[i].Interface < out[j].Interface
|
||||||
|
}
|
||||||
|
return out[i].IP < out[j].IP
|
||||||
|
})
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
type ipDetector struct {
|
type ipDetector struct {
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
publicIP string
|
publicIP string
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestProcAddressesWithoutNetlink(t *testing.T) {
|
||||||
|
dir := t.TempDir()
|
||||||
|
write := func(name, body string) {
|
||||||
|
if err := os.WriteFile(filepath.Join(dir, name), []byte(body), 0o600); err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
write("route", "Iface\tDestination\tGateway \tFlags\tRefCnt\tUse\tMetric\tMask\t\tMTU\tWindow\tIRTT\n"+
|
||||||
|
"eth0\t00000000\t0102570A\t0003\t0\t0\t0\t00000000\t0\t0\t0\n"+
|
||||||
|
"eth0\t0002570A\t00000000\t0001\t0\t0\t0\t00FFFFFF\t0\t0\t0\n"+
|
||||||
|
"eth1\t0010A8C0\t00000000\t0001\t0\t0\t0\t00FFFFFF\t0\t0\t0\n"+
|
||||||
|
"docker0\t000011AC\t00000000\t0001\t0\t0\t0\t0000FFFF\t0\t0\t0\n")
|
||||||
|
write("fib_trie", "Main:\n +-- 0.0.0.0/0 3 0 5\n |-- 10.87.2.6\n /32 host LOCAL\n |-- 192.168.16.4\n /32 host LOCAL\n |-- 172.17.0.1\n /32 host LOCAL\n |-- 127.0.0.1\n /32 host LOCAL\nLocal:\n |-- 10.87.2.6\n /32 host LOCAL\n")
|
||||||
|
write("if_inet6", "20010db8000000000000000000000001 02 40 00 80 eth1\nfe800000000000000000000000000001 02 40 20 80 eth0\n00000000000000000000000000000001 01 80 10 80 lo\n")
|
||||||
|
items := procAddresses(dir)
|
||||||
|
host := procInterfaceAddresses(items, false, "interface")
|
||||||
|
got := map[string]string{}
|
||||||
|
for _, item := range host {
|
||||||
|
got[item.IP] = item.Interface
|
||||||
|
}
|
||||||
|
if got["10.87.2.6"] != "eth0" || got["192.168.16.4"] != "eth1" || got["2001:db8::1"] != "eth1" {
|
||||||
|
t.Fatalf("unexpected host addresses: %#v", host)
|
||||||
|
}
|
||||||
|
if _, ok := got["172.17.0.1"]; ok {
|
||||||
|
t.Fatalf("bridge address listed as host interface: %#v", host)
|
||||||
|
}
|
||||||
|
bridges := procInterfaceAddresses(items, true, "bridge")
|
||||||
|
if len(bridges) != 1 || bridges[0].IP != "172.17.0.1" || bridges[0].Interface != "docker0" {
|
||||||
|
t.Fatalf("unexpected bridge addresses: %#v", bridges)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@ RestrictSUIDSGID=true
|
|||||||
RestrictNamespaces=true
|
RestrictNamespaces=true
|
||||||
LockPersonality=true
|
LockPersonality=true
|
||||||
MemoryDenyWriteExecute=true
|
MemoryDenyWriteExecute=true
|
||||||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
||||||
SystemCallArchitectures=native
|
SystemCallArchitectures=native
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ Ordinary Vhosts can reject selected MIME types under **Vhosts → Security → R
|
|||||||
|
|
||||||
## HTTP methods and rate limits
|
## HTTP methods and rate limits
|
||||||
|
|
||||||
|
HTTP methods (global policy, Vhost → Security and custom locations) are chosen from a list of known methods with a short description each — GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, CONNECT, TRACE, TRACK, PURGE, BAN and the WebDAV/CalDAV methods; type another method name and press Enter to add a custom one. The stored format is unchanged (`method_policy.methods`).
|
||||||
|
|
||||||
Method policies allow, block or leave methods unrestricted. A denied method returns `405`, while typical ACL/country denials return `403`. Per-client rate limits can configure request count, window and burst with optional country overrides; exceeding the limit returns `429` with `Retry-After`. Limits are application controls, not a replacement for upstream DDoS protection.
|
Method policies allow, block or leave methods unrestricted. A denied method returns `405`, while typical ACL/country denials return `403`. Per-client rate limits can configure request count, window and burst with optional country overrides; exceeding the limit returns `429` with `Retry-After`. Limits are application controls, not a replacement for upstream DDoS protection.
|
||||||
|
|
||||||
## Identity providers and authentication integration methods
|
## Identity providers and authentication integration methods
|
||||||
|
|||||||
+1
-1
@@ -21,7 +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/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/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` · `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/cache/rules/stats` · `GET /api/cache/rules/targets` · `POST /api/cache/rules/test` · `POST /api/cache/rules/import-vcl` | Cache rule match counters, the vhosts a rule can target (ordinary and generated Docker vhosts), simulation of saved or draft rules for a test request/response (also for Docker vhosts), 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/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/logs` · `GET /api/live-logs` | Recent and streaming request logs. |
|
||||||
| `GET /api/file-logs` · `GET /api/file-logs/query` | Stored-log exploration. |
|
| `GET /api/file-logs` · `GET /api/file-logs/query` | Stored-log exploration. |
|
||||||
|
|||||||
+3
-1
@@ -61,7 +61,7 @@ In **Vhosts → Cache**, overrides for static extensions, bypass path prefixes a
|
|||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
| 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 |
|
| 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` |
|
| 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 |
|
| Deliver | `vcl_deliver` | the request and response conditions | set a response header, set it only if the response lacks it, or remove it |
|
||||||
|
|
||||||
- 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.
|
- 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.
|
- 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.
|
||||||
@@ -70,6 +70,8 @@ In **Vhosts → Cache**, overrides for static extensions, bypass path prefixes a
|
|||||||
- **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).
|
- **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.
|
- 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.
|
- 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.
|
||||||
|
- **Deliver rules apply to the whole application.** Since 0.37.2 they run for every response of the vhost — also when caching is switched off for it, for bypassed requests and for misses — so they can override headers such as `Cache-Control` for browsers, or add security headers, for an entire application. *Set header if missing* (`default_header`) keeps a header the backend already sent. Templates: *Browser cache for static files (30 days)*, *No browser cache for HTML and /admin*, *Default security headers*. Request and backend-response rules still run only while the cache is active for the route.
|
||||||
|
- Docker vhosts have their own rules too: in **Docker vhosts**, enable *Cache* for the service and open **Cache for this vhost** (default TTL and rules). The global rule vhost picker and the tester list Docker vhosts (marked *Docker*) next to ordinary vhosts; `GET /api/cache/rules/targets` returns the same list.
|
||||||
|
|
||||||
## Stored object rules
|
## Stored object rules
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ After **Unlock layout**, every block shows a compact toolbar: the **⠿** handle
|
|||||||
|
|
||||||
- **Drag:** grab the ⠿ handle (mouse, pen or touch). The block lifts and follows the pointer, and a dashed frame of the same width shows exactly where it will land; neighbouring blocks glide aside instead of jumping. Release to drop, or press **Esc** to return the block to its previous place. Dragging near the top or bottom edge of the window scrolls the page.
|
- **Drag:** grab the ⠿ handle (mouse, pen or touch). The block lifts and follows the pointer, and a dashed frame of the same width shows exactly where it will land; neighbouring blocks glide aside instead of jumping. Release to drop, or press **Esc** to return the block to its previous place. Dragging near the top or bottom edge of the window scrolls the page.
|
||||||
- **Keyboard:** focus the ⠿ handle and use the arrow keys to move the block one position.
|
- **Keyboard:** focus the ⠿ handle and use the arrow keys to move the block one position.
|
||||||
|
- **Arrange manually:** blocks get fixed grid positions. Drag a block anywhere — a dashed frame shows the cell it will snap to — and the other blocks stay where they are (a block already in that place moves down). Making a block narrower or shorter leaves the space empty instead of pulling the next block in; making it bigger pushes overlapping blocks down. *Fit to screen* and *Fill gaps* are off in this mode. The positions are saved with **Save and lock** (`dashboard_widget_positions` in the administrator preferences) and the mode is switched on again automatically the next time you unlock a manually arranged layout; untick it to return to the ordered layout.
|
||||||
- **Fill gaps:** a saved custom layout keeps blocks in exactly the order you arranged them, so a wide block that does not fit at the end of a row leaves a visible gap instead of other blocks silently moving into it. Use **Fill gaps** to pack blocks into empty space once; nothing is stored until **Save and lock**.
|
- **Fill gaps:** a saved custom layout keeps blocks in exactly the order you arranged them, so a wide block that does not fit at the end of a row leaves a visible gap instead of other blocks silently moving into it. Use **Fill gaps** to pack blocks into empty space once; nothing is stored until **Save and lock**.
|
||||||
|
|
||||||
**Dashboard Presets** supports up to **16 named layouts per administrator**. Save, load, rename, overwrite and delete presets; a factory layout can be restored. Presets preserve the dashboard arrangement, not the live traffic values. Interface theme, scale and other display settings are also account-scoped and do not alter proxy routing or rewrite shared configuration.
|
**Dashboard Presets** supports up to **16 named layouts per administrator**. Save, load, rename, overwrite and delete presets; a factory layout can be restored. Presets preserve the dashboard arrangement, not the live traffic values. Interface theme, scale and other display settings are also account-scoped and do not alter proxy routing or rewrite shared configuration.
|
||||||
|
|||||||
@@ -48,17 +48,23 @@ Go 1.22+ is required only for the manual build, not for a DEB/RPM installation.
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
The same domain may be assigned to **several agents** (for example two Docker hosts serving `apps.example.com`); the picker then lists every agent that uses it. Only the final names must stay unique: two services on different agents cannot publish the same hostname or alias.
|
||||||
|
|
||||||
### Certificates
|
### Certificates
|
||||||
|
|
||||||
- **Automatic** (no certificate selected, the default): generated vhosts behave like a Vhost left on *Global SNI / default certificate* — every requested name gets the stored certificate whose SNI/SAN names cover it.
|
- **Automatic** (no certificate selected, the default): generated vhosts behave like a Vhost left on *Global SNI / default certificate* — every requested name gets the stored certificate whose SNI/SAN names cover it.
|
||||||
- **Selected certificates**: each generated vhost uses the selected certificate covering **all** its names (exact names beat wildcards, then the narrowest certificate). If none covers them, it falls back to the generic SNI/default certificate, so each name can still be served by the matching stored certificate. The per-service editor shows which certificate will be used. *Accept certificate/domain mismatch* forces the first selected certificate when none covers the names.
|
- **Selected certificates**: each generated vhost uses the selected certificate covering **all** its names (exact names beat wildcards, then the narrowest certificate). If none covers them, it falls back to the generic SNI/default certificate, so each name can still be served by the matching stored certificate. The per-service editor shows which certificate will be used. *Accept certificate/domain mismatch* forces the first selected certificate when none covers the names.
|
||||||
|
|
||||||
|
In the certificate list every name is labelled with what it covers — *main domain*, *www*, *wildcard* or *subdomain* — for example `example.com (main domain), *.example.com (wildcard)`. Wildcard certificates suggested as agent domains show the certificate ID and *(wildcard)*.
|
||||||
|
|
||||||
A previously selected single `certificate_id` is migrated to `certificate_ids: [certificate_id]`.
|
A previously selected single `certificate_id` is migrated to `certificate_ids: [certificate_id]`.
|
||||||
|
|
||||||
### Default backend IP
|
### Default backend IP
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
Agent 0.37.2 lists every active host interface again on systemd installations: the unit now allows `AF_NETLINK`, which the interface enumeration needs, and when netlink is still blocked (older unit, hardened container) the agent falls back to `/proc/net/if_inet6`, `/proc/net/fib_trie` and `/proc/net/route`. After upgrading, reinstall the unit (`install -m 0644 rustproxy-docker-agent.service /etc/systemd/system/`, `systemctl daemon-reload`, restart) so all addresses — not only the routed and public ones — appear. The agent default IP option is no longer listed a second time under the detected addresses, because *Auto / agent default* already shows it.
|
||||||
|
|
||||||
### Host diagnostics
|
### Host diagnostics
|
||||||
|
|
||||||
Agents 0.37.0+ report host data when RustProxy 0.37.0+ asks for it: OS and kernel, architecture, Docker/Podman runtime and version, uptime, load average, CPU usage, memory, swap, disk usage of the container data directory, host network totals and current rates (container/virtual interfaces excluded) and running/total container and image counts. They are shown in **Docker vhosts → Agent details → Host system** and in a compact strip in **Settings → Docker agents**. Values an agent does not send are not shown; older agents show none. Disable reporting on the agent with `RUSTPROXY_DOCKER_SYSTEM_INFO=false`.
|
Agents 0.37.0+ report host data when RustProxy 0.37.0+ asks for it: OS and kernel, architecture, Docker/Podman runtime and version, uptime, load average, CPU usage, memory, swap, disk usage of the container data directory, host network totals and current rates (container/virtual interfaces excluded) and running/total container and image counts. They are shown in **Docker vhosts → Agent details → Host system** and in a compact strip in **Settings → Docker agents**. Values an agent does not send are not shown; older agents show none. Disable reporting on the agent with `RUSTPROXY_DOCKER_SYSTEM_INFO=false`.
|
||||||
@@ -124,6 +130,8 @@ Agent inventory polling is separate from the panel's live status refresh. A new
|
|||||||
|
|
||||||
## Publish a discovered application
|
## Publish a discovered application
|
||||||
|
|
||||||
|
Endpoints that belong together are **grouped**: every published port of one Docker Compose / Podman Compose project (all its services and replicas), or of one plain container with several ports, appears under a collapsible group header showing the project or container name, the number of endpoints, how many are published and their hostnames. Single endpoints stay ungrouped. Sorting and search work inside groups; the collapsed state is remembered in the browser. Grouping is display only — each port is still published and configured on its own.
|
||||||
|
|
||||||
In **Docker vhosts**, select the service and set:
|
In **Docker vhosts**, select the service and set:
|
||||||
|
|
||||||
| Option | Guidance |
|
| Option | Guidance |
|
||||||
@@ -134,8 +142,8 @@ In **Docker vhosts**, select the service and set:
|
|||||||
| **Frontend listeners / certificate** | Selected through the agent defaults: automatic SNI or the agent's certificate list (see [Certificates](#certificates)); the editor shows the certificate that will be used. |
|
| **Frontend listeners / certificate** | Selected through the agent defaults: automatic SNI or the agent's certificate list (see [Certificates](#certificates)); the editor shows the certificate that will be used. |
|
||||||
| **Frontend protocols** | HTTP/1.1 is always available. Enable/disable HTTP/2 and HTTP/3 independently per Docker vhost (both enabled by default). H2/H3 require corresponding frontend listener support; switching them does not change the selected HTTP/HTTPS backend scheme. H3 disabled also removes its advertisement. |
|
| **Frontend protocols** | HTTP/1.1 is always available. Enable/disable HTTP/2 and HTTP/3 independently per Docker vhost (both enabled by default). H2/H3 require corresponding frontend listener support; switching them does not change the selected HTTP/HTTPS backend scheme. H3 disabled also removes its advertisement. |
|
||||||
| **Force HTTPS / WebSockets** | Enable only when needed and when the right frontend listeners exist. |
|
| **Force HTTPS / WebSockets** | Enable only when needed and when the right frontend listeners exist. |
|
||||||
| **Cache / compression / transforms** | Optional; obey the global limits and privacy policy of the application. |
|
| **Cache / compression / transforms** | Optional; obey the global limits and privacy policy of the application. With **Cache** enabled, **Cache for this vhost** sets a default TTL (empty = global default) and the same cache rules editor as an ordinary vhost (templates, VCL import/preview, tester, *Ignore global cache rules*); see [Cache rules](CACHE.md#cache-rules-vcl-style). Stored as `cache_default_ttl_seconds`, `cache_rules` and `cache_ignore_global_rules` on the assignment. |
|
||||||
| **Health / ACL / timeouts** | Select up to eight reusable ACL profiles per app or inherit the agent's defaults. A searchable multi-select previews the profile ID, default action, IP rules and country filters; selected profiles appear as removable badges. Optional inline ACL remains independently enforced. Explicit denies and country blocks beat merged allows. Test allowed and blocked clients. |
|
| **Health / ACL / timeouts** | **Access control** shows the agent default ACL profiles pre-selected (*Agent default in use: …*). Unchecking or changing them overrides the default for this service only; leaving them as they are keeps following the agent default. **Public vhost (no agent default ACL)** publishes the service without the agent default profiles (`inherit_acl_profiles: false`) and disables the per-app ACL; global block/allow rules still apply. Up to eight reusable ACL profiles per app; selected profiles appear as removable badges and the summary line shows the effective state. Optional inline ACL remains independently enforced. Explicit denies and country blocks beat merged allows. Test allowed and blocked clients. |
|
||||||
|
|
||||||
To deliberately assign a domain not covered by any of the agent's **selected certificates**, enable **Accept certificate/domain mismatch** immediately below **Backend host IP** in the per-service editor and confirm the risk. This records `allow_certificate_mismatch: true` on that publication only. Without consent, the server rejects the incompatible mapping. The client browser may still reject the TLS handshake; a matching SAN certificate is strongly preferred. The agent's own outbound TLS fingerprint validation is unaffected.
|
To deliberately assign a domain not covered by any of the agent's **selected certificates**, enable **Accept certificate/domain mismatch** immediately below **Backend host IP** in the per-service editor and confirm the risk. This records `allow_certificate_mismatch: true` on that publication only. Without consent, the server rejects the incompatible mapping. The client browser may still reject the TLS handshake; a matching SAN certificate is strongly preferred. The agent's own outbound TLS fingerprint validation is unaffected.
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ 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.
|
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.
|
||||||
|
|
||||||
|
### Alerts
|
||||||
|
|
||||||
|
The application status (the health indicator in the sidebar, *Application status*) has an **Alerts** entry next to API, listeners, backends, Docker and logging. It lists, with a link to the right page: certificates that have expired or expire within 14 days (error below 3 days), failed ACME renewals, an ACME environment that is not ready while ACME certificates exist, file descriptors at 80% of the limit or more, country rules without a loaded GeoIP database, a Prometheus exporter listening beyond localhost without a token or address restriction, and an available update (information only). New warnings and errors also appear as a notification. Alerts are computed from the current state at most every 30 seconds — no history is kept — and are available as `alerts` in `/api/status` and from `GET /api/alerts` (which also repeats the Docker alerts).
|
||||||
|
|
||||||
|
**Settings → Alerts** configures them: a main switch, notifications for new alerts, and each kind on its own — certificate expiry with the warning and error thresholds in days (default 14 and 3), failed ACME renewals, ACME environment, file descriptors with warning and error percentages (default 80 and 95), GeoIP, Prometheus and updates. Stored as `alerts` in the configuration (omitted while everything is at the defaults); saving applies immediately. Docker alerts keep their own settings under **Settings → Docker agents**. API tokens with read access can read `GET /api/alerts`.
|
||||||
|
|
||||||
### System information
|
### System information
|
||||||
|
|
||||||
**Settings → System information** is a read-only diagnostic page built from `GET /api/system-info`:
|
**Settings → System information** is a read-only diagnostic page built from `GET /api/system-info`:
|
||||||
|
|||||||
@@ -57,6 +57,14 @@ WebSockets normally use HTTP/1.1 Upgrade. HTTP/2/HTTP/3 client requests can stil
|
|||||||
|
|
||||||
Public HTTPS requires a correct certificate with hostname coverage. Administration TLS is separate. Backend `https://` encrypts traffic, but **upstream certificate verification is opt-in by default** in the current backend model; enable it and specify CA/name where needed. Private/loopback addresses and routing to a local RustProxy listener require explicit risk overrides.
|
Public HTTPS requires a correct certificate with hostname coverage. Administration TLS is separate. Backend `https://` encrypts traffic, but **upstream certificate verification is opt-in by default** in the current backend model; enable it and specify CA/name where needed. Private/loopback addresses and routing to a local RustProxy listener require explicit risk overrides.
|
||||||
|
|
||||||
|
### Cipher configurator
|
||||||
|
|
||||||
|
**Settings → TLS policy** shows the cipher suites as a table grouped by TLS 1.3 and TLS 1.2, with the certificate type each suite needs (RSA, ECDSA or either), the encryption, key size and a rating. Presets set versions and suites in one click: **Modern** (TLS 1.3 only), **Recommended** (TLS 1.2 and 1.3 with every suite rustls offers — the widest compatibility RustProxy can give) and **256-bit only**; any other combination shows *Custom*. Ticking every suite stores an empty list (rustls defaults).
|
||||||
|
|
||||||
|
Next to the table an **SSL Labs–style estimate** grades protocols, key exchange and cipher strength (A, or A+ when HSTS is on in the global security headers) and lists the checks — forward secrecy, AEAD-only ciphers, TLS 1.3, post-quantum key exchange and HSTS. **Client compatibility** simulates common clients for the selection: current browsers, Safari 9–12, Android 4.4–9, Java 8/11, OpenSSL 1.0.2/1.1.1 and IE 11 (Windows 7/8.1 only with an ECDSA certificate). It is a simplified simulation, not a handshake test.
|
||||||
|
|
||||||
|
For "older systems" there is a hard limit: rustls implements only AEAD suites with forward secrecy, so TLS 1.0/1.1, CBC, RC4, 3DES and static RSA key exchange cannot be enabled. Windows XP, IE 6–10, Android 4.3 and older and Java 6/7 cannot connect to RustProxy whatever the selection; the list marks them accordingly. The server applies its own suite order. Stored as before: `tls.policy.tls12`, `tls13`, `cipher_suites`.
|
||||||
|
|
||||||
## Post-quantum TLS key exchange (optional)
|
## Post-quantum TLS key exchange (optional)
|
||||||
|
|
||||||
**Settings → TLS policy → Post-quantum key exchange** enables the hybrid TLS 1.3 group **X25519MLKEM768** (X25519 combined with ML-KEM-768) for incoming TLS. It is a key-exchange group, not a cipher suite: certificates and AES-GCM/ChaCha20-Poly1305 ciphers stay unchanged, and classic groups remain available as a fallback. The setting is off by default and requires TLS 1.3.
|
**Settings → TLS policy → Post-quantum key exchange** enables the hybrid TLS 1.3 group **X25519MLKEM768** (X25519 combined with ML-KEM-768) for incoming TLS. It is a key-exchange group, not a cipher suite: certificates and AES-GCM/ChaCha20-Poly1305 ciphers stay unchanged, and classic groups remain available as a fallback. The setting is off by default and requires TLS 1.3.
|
||||||
|
|||||||
@@ -77,10 +77,10 @@ ENV_FILE=integrations/routeros-oci-build/.env \
|
|||||||
bash integrations/routeros-oci-build/build-routeros-oci.sh push
|
bash integrations/routeros-oci-build/build-routeros-oci.sh push
|
||||||
```
|
```
|
||||||
|
|
||||||
For example, with RustProxy version `0.37.1` and the defaults this publishes:
|
For example, with RustProxy version `0.37.2` and the defaults this publishes:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
oci.example.net/network/rustproxy:0.37.1
|
oci.example.net/network/rustproxy:0.37.2
|
||||||
oci.example.net/network/rustproxy:latest
|
oci.example.net/network/rustproxy:latest
|
||||||
oci.example.net/network/rustproxy:routeros
|
oci.example.net/network/rustproxy:routeros
|
||||||
```
|
```
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ The saved selection is matched by ID or locale. Browser language preferences are
|
|||||||
used when no saved language matches. Short legacy selections such as `pl` are
|
used when no saved language matches. Short legacy selections such as `pl` are
|
||||||
matched through metadata, not language-specific code. Adding or removing a file
|
matched through metadata, not language-specific code. Adding or removing a file
|
||||||
triggers a Cargo rebuild. Duplicate locales, invalid metadata, non-string values
|
triggers a Cargo rebuild. Duplicate locales, invalid metadata, non-string values
|
||||||
and oversized packs cause a build error. Limits: 128 packs, 256 KiB per pack,
|
and oversized packs cause a build error. Limits: 128 packs, 512 KiB per pack,
|
||||||
4096 keys per pack, 8 MiB total bundle.
|
4096 keys per pack, 8 MiB total bundle.
|
||||||
|
|
||||||
Validate pack JSON locally (`python3 -m json.tool langs/en_US.json > /dev/null`,
|
Validate pack JSON locally (`python3 -m json.tool langs/en_US.json > /dev/null`,
|
||||||
|
|||||||
+134
-6
@@ -36,7 +36,7 @@
|
|||||||
"globalMethodTitle": "HTTP methods",
|
"globalMethodTitle": "HTTP methods",
|
||||||
"globalMethodHelp": "Block selected methods or allow only those listed. Applies before redirects and cache invalidation; denied requests receive 405.",
|
"globalMethodHelp": "Block selected methods or allow only those listed. Applies before redirects and cache invalidation; denied requests receive 405.",
|
||||||
"globalMethodMode": "Method policy",
|
"globalMethodMode": "Method policy",
|
||||||
"globalMethodList": "Methods (comma, space or newline separated)",
|
"globalMethodList": "HTTP methods",
|
||||||
"globalContentTypeTitle": "Request Content-Type",
|
"globalContentTypeTitle": "Request Content-Type",
|
||||||
"globalContentTypeHelp": "Reject declared MIME types (exact or type/*) with 403. This is a header rule, not body inspection.",
|
"globalContentTypeHelp": "Reject declared MIME types (exact or type/*) with 403. This is a header rule, not body inspection.",
|
||||||
"globalContentTypeEnabled": "Enable Content-Type denylist",
|
"globalContentTypeEnabled": "Enable Content-Type denylist",
|
||||||
@@ -1611,7 +1611,6 @@
|
|||||||
"dockerBackendIpAuto": "Auto / agent default",
|
"dockerBackendIpAuto": "Auto / agent default",
|
||||||
"dockerBackendScheme": "Backend protocol",
|
"dockerBackendScheme": "Backend protocol",
|
||||||
"dockerBindingIp": "Docker binding",
|
"dockerBindingIp": "Docker binding",
|
||||||
"dockerAgentDefaultIp": "agent default",
|
|
||||||
"dockerAgentEndpointHelp": "Use https:// for the default agent setup. Plain HTTP is supported only for compatibility and is visibly marked insecure.",
|
"dockerAgentEndpointHelp": "Use https:// for the default agent setup. Plain HTTP is supported only for compatibility and is visibly marked insecure.",
|
||||||
"dockerTlsFingerprint": "TLS certificate SHA-256",
|
"dockerTlsFingerprint": "TLS certificate SHA-256",
|
||||||
"dockerTlsFingerprintHelp": "For the default self-signed agent certificate, paste the fingerprint printed by install.sh or rustproxy-docker-agent --print-fingerprint. Leave empty only for a certificate trusted by a public CA.",
|
"dockerTlsFingerprintHelp": "For the default self-signed agent certificate, paste the fingerprint printed by install.sh or rustproxy-docker-agent --print-fingerprint. Leave empty only for a certificate trusted by a public CA.",
|
||||||
@@ -1690,10 +1689,8 @@
|
|||||||
"dockerDefaultAclHelp": "Select up to eight ACL profiles inherited by Docker vhosts without an explicit per-app selection. An empty app selection inherits these defaults.",
|
"dockerDefaultAclHelp": "Select up to eight ACL profiles inherited by Docker vhosts without an explicit per-app selection. An empty app selection inherits these defaults.",
|
||||||
"dockerApplyService": "Apply changes",
|
"dockerApplyService": "Apply changes",
|
||||||
"dockerAccessControl": "Access control",
|
"dockerAccessControl": "Access control",
|
||||||
"dockerAclSummary": "Optional ACL profile and per-app IP rules",
|
|
||||||
"dockerAclProfile": "ACL profiles",
|
"dockerAclProfile": "ACL profiles",
|
||||||
"dockerAclProfileNone": "No ACL profile",
|
"dockerAclProfileNone": "No ACL profile",
|
||||||
"dockerAclProfileInherit": "Agent default",
|
|
||||||
"dockerAclInline": "Use additional per-app ACL",
|
"dockerAclInline": "Use additional per-app ACL",
|
||||||
"dockerAclDefault": "Default ACL action",
|
"dockerAclDefault": "Default ACL action",
|
||||||
"dockerAclRules": "IP/CIDR rules",
|
"dockerAclRules": "IP/CIDR rules",
|
||||||
@@ -3362,7 +3359,7 @@
|
|||||||
"cacheRuleStageDeliver": "deliver",
|
"cacheRuleStageDeliver": "deliver",
|
||||||
"cacheRuleStageHelpRequest": "Before the cache lookup (vcl_recv / vcl_hash): bypass, cookies, query, cache key.",
|
"cacheRuleStageHelpRequest": "Before the cache lookup (vcl_recv / vcl_hash): bypass, cookies, query, cache key.",
|
||||||
"cacheRuleStageHelpResponse": "When the backend answers (vcl_backend_response): TTL, grace, store or not.",
|
"cacheRuleStageHelpResponse": "When the backend answers (vcl_backend_response): TTL, grace, store or not.",
|
||||||
"cacheRuleStageHelpDeliver": "Before sending any response to the client (vcl_deliver): headers.",
|
"cacheRuleStageHelpDeliver": "Before every response of the application is sent to the client (vcl_deliver): headers. Works for all responses of the vhost — also when caching is off or bypassed — so it can override headers such as Cache-Control for the whole application.",
|
||||||
"cacheRuleMatch": "Conditions",
|
"cacheRuleMatch": "Conditions",
|
||||||
"cacheRuleMatchAll": "All must match",
|
"cacheRuleMatchAll": "All must match",
|
||||||
"cacheRuleMatchAny": "Any can match",
|
"cacheRuleMatchAny": "Any can match",
|
||||||
@@ -3500,6 +3497,137 @@
|
|||||||
"systemInfoSource": "Source",
|
"systemInfoSource": "Source",
|
||||||
"systemInfoFooter": "Read-only · unavailable metrics are not estimated",
|
"systemInfoFooter": "Read-only · unavailable metrics are not estimated",
|
||||||
"systemInfoDocs": "Documentation",
|
"systemInfoDocs": "Documentation",
|
||||||
"systemInfoFdsNote": "limit {limit} · {count} OS threads"
|
"systemInfoFdsNote": "limit {limit} · {count} OS threads",
|
||||||
|
"dockerAclPublic": "Public vhost (no agent default ACL)",
|
||||||
|
"dockerAclPublicHelp": "The service is reachable without the agent default ACL profiles. Global block/allow rules still apply.",
|
||||||
|
"dockerAclInheritedActive": "Agent default in use: {profiles}. Uncheck to override it for this service.",
|
||||||
|
"dockerAclInheritedOverridden": "Overrides the agent default ({profiles}) for this service.",
|
||||||
|
"dockerAclStatePublic": "Public — no agent default ACL",
|
||||||
|
"dockerAclStateProfiles": "ACL",
|
||||||
|
"dockerAclStateInline": "inline rules",
|
||||||
|
"dockerAclStateNone": "No ACL profile",
|
||||||
|
"overviewLayoutManual": "Arrange manually",
|
||||||
|
"overviewLayoutManualHint": "Blocks stay where they are while you drag; a bar marks where the block will land. Fit to screen is switched off so the saved layout matches what you see.",
|
||||||
|
"dockerCacheSettings": "Cache for this vhost",
|
||||||
|
"dockerCacheSettingsHelp": "Default TTL and cache rules (VCL-style)",
|
||||||
|
"dockerCacheTtl": "Default TTL (seconds)",
|
||||||
|
"dockerCacheTtlHelp": "Empty uses the global cache default.",
|
||||||
|
"dockerCertNameWildcard": "wildcard",
|
||||||
|
"dockerCertNameWww": "www",
|
||||||
|
"dockerCertNameApex": "main domain",
|
||||||
|
"dockerCertNameSubdomain": "subdomain",
|
||||||
|
"dockerAgentsShared": "Docker agents",
|
||||||
|
"methodGet": "Read a resource",
|
||||||
|
"methodHead": "Headers only",
|
||||||
|
"methodPost": "Submit data",
|
||||||
|
"methodPut": "Replace a resource",
|
||||||
|
"methodPatch": "Partial update",
|
||||||
|
"methodDelete": "Delete a resource",
|
||||||
|
"methodOptions": "CORS preflight / capabilities",
|
||||||
|
"methodConnect": "Tunnel (proxies)",
|
||||||
|
"methodTrace": "Echo the request — usually blocked",
|
||||||
|
"methodTrack": "IIS variant of TRACE — usually blocked",
|
||||||
|
"methodPurge": "Cache invalidation",
|
||||||
|
"methodBan": "Varnish ban",
|
||||||
|
"methodWebdav": "WebDAV / CalDAV",
|
||||||
|
"methodCustom": "Custom method",
|
||||||
|
"methodPickerChoose": "Choose HTTP methods",
|
||||||
|
"methodPickerSelected": "Selected methods: {count}",
|
||||||
|
"methodPickerNone": "No methods selected",
|
||||||
|
"methodPickerSearch": "Search or type another method",
|
||||||
|
"methodPickerAddHint": "Press Enter to add {value}",
|
||||||
|
"methodPickerEmpty": "No methods",
|
||||||
|
"methodPickerInvalid": "Invalid HTTP method: {value}",
|
||||||
|
"cacheRuleActionDefaultHeader": "Set header if missing",
|
||||||
|
"cacheRuleTplBrowser": "Browser cache for static files (30 days)",
|
||||||
|
"cacheRuleTplNoBrowser": "No browser cache for HTML and /admin",
|
||||||
|
"cacheRuleTplSecurity": "Default security headers",
|
||||||
|
"tlsPresets": "Presets",
|
||||||
|
"tlsPresetModern": "Modern (TLS 1.3 only)",
|
||||||
|
"tlsPresetModernHelp": "Only TLS 1.3: the strongest setup, for current browsers and systems.",
|
||||||
|
"tlsPresetRecommended": "Recommended (maximum compatibility)",
|
||||||
|
"tlsPresetRecommendedHelp": "TLS 1.2 and 1.3 with all suites rustls offers — the widest compatibility possible in RustProxy, including older Android, Java 8, OpenSSL 1.0.2 and IE 11.",
|
||||||
|
"tlsPresetStrong": "256-bit only",
|
||||||
|
"tlsPresetStrongHelp": "TLS 1.2 and 1.3 without AES-128 suites.",
|
||||||
|
"tlsPresetCustom": "Custom",
|
||||||
|
"tlsConfiguratorHelp": "Tick the suites to offer. All ticked = rustls defaults (nothing is stored). rustls supports only AEAD suites with forward secrecy, so TLS 1.0/1.1, CBC, RC4, 3DES and static RSA cannot be enabled — very old clients (Windows XP, IE 6–10, Android 4.3 and older, Java 6/7) cannot connect regardless of this setting. The server uses its own suite order.",
|
||||||
|
"tlsSuite": "Cipher suite",
|
||||||
|
"tlsSuiteAuth": "Certificate",
|
||||||
|
"tlsSuiteCipher": "Encryption",
|
||||||
|
"tlsSuiteBits": "Bits",
|
||||||
|
"tlsSuiteRating": "Rating",
|
||||||
|
"tlsSuiteAnyCert": "RSA or ECDSA",
|
||||||
|
"tlsVersionOn": "ON",
|
||||||
|
"tlsVersionOff": "OFF — enable the version above",
|
||||||
|
"tlsRatingStrong": "strong",
|
||||||
|
"tlsRatingRecommended": "good",
|
||||||
|
"tlsScoreProtocol": "Protocols",
|
||||||
|
"tlsScoreKeyExchange": "Key exchange",
|
||||||
|
"tlsScoreCipher": "Cipher strength",
|
||||||
|
"tlsCheckForwardSecrecy": "Forward secrecy for every connection (ECDHE)",
|
||||||
|
"tlsCheckAead": "Only AEAD ciphers (GCM, ChaCha20-Poly1305)",
|
||||||
|
"tlsCheckNoLegacy": "SSL 3, TLS 1.0/1.1, CBC and RC4 not supported",
|
||||||
|
"tlsCheckTls13": "TLS 1.3 enabled",
|
||||||
|
"tlsCheckNoTls13": "TLS 1.3 disabled — HTTP/3 needs it",
|
||||||
|
"tlsCheckPqc": "Post-quantum key exchange (X25519MLKEM768)",
|
||||||
|
"tlsCheckNoPqc": "No post-quantum key exchange (optional)",
|
||||||
|
"tlsCheckHsts": "HSTS enabled globally",
|
||||||
|
"tlsCheckNoHsts": "HSTS off — needed for A+ (Global security headers)",
|
||||||
|
"tlsCompatibility": "Client compatibility (simulation)",
|
||||||
|
"tlsClient_modern": "Chrome, Edge, Firefox (current)",
|
||||||
|
"tlsClient_safari_new": "Safari 12.1+ / iOS 12.2+",
|
||||||
|
"tlsClient_safari_old": "Safari 9–12 / iOS 9–12.1",
|
||||||
|
"tlsClient_android_7": "Android 7–9",
|
||||||
|
"tlsClient_android_44": "Android 4.4–6",
|
||||||
|
"tlsClient_java_11": "Java 11+",
|
||||||
|
"tlsClient_java_8": "Java 8",
|
||||||
|
"tlsClient_openssl_111": "OpenSSL 1.1.1+ (curl, Python)",
|
||||||
|
"tlsClient_openssl_102": "OpenSSL 1.0.2 (CentOS 7, old curl)",
|
||||||
|
"tlsClient_ie11_win10": "IE 11 / Edge Legacy on Windows 10",
|
||||||
|
"tlsClient_ie11_win7": "IE 11 on Windows 7 / 8.1",
|
||||||
|
"tlsClient_legacy": "Windows XP, IE 6–10, Android ≤ 4.3, Java 6/7",
|
||||||
|
"tlsClientState_fail": "No common protocol or cipher with this selection.",
|
||||||
|
"tlsClientState_ecdsa": "Only with an ECDSA certificate (no ECDHE-RSA-GCM on this system).",
|
||||||
|
"tlsClientState_impossible": "Needs TLS 1.0/1.1 or CBC, which rustls does not support.",
|
||||||
|
"tlsGradeNote": "Estimate in the style of SSL Labs for protocols, key exchange and ciphers; the certificate chain and its key are not part of it. The compatibility list is a simplified simulation.",
|
||||||
|
"appHealthAlerts": "Alerts",
|
||||||
|
"appHealthAlertsNone": "No active alerts.",
|
||||||
|
"alertsTitle": "Active alerts: {count}",
|
||||||
|
"alertOpen": "Open",
|
||||||
|
"alertCertificateExpired": "Certificate {subject} has expired.",
|
||||||
|
"alertCertificateExpiring": "Certificate {subject} expires in {value} days.",
|
||||||
|
"alertCertificateRenewalFailed": "Renewal of certificate {subject} failed ({value}×): {message}",
|
||||||
|
"alertAcmeRuntime": "ACME environment is not ready ({value}); automatic renewal may fail.",
|
||||||
|
"alertFileDescriptorsHigh": "RustProxy uses {value} file descriptors (≥ {threshold} of the limit).",
|
||||||
|
"alertGeoipMissing": "Country rules are active but no GeoIP database is loaded.",
|
||||||
|
"alertPrometheusExposed": "Prometheus exporter on {subject} has no token and no address restriction.",
|
||||||
|
"alertUpdateAvailable": "RustProxy {value} is available (running {threshold}).",
|
||||||
|
"dockerGroupContainer": "Container",
|
||||||
|
"dockerGroupCount": "{count} endpoints · {published} published",
|
||||||
|
"alertSettingsTitle": "Alerts",
|
||||||
|
"alertSettingsHelp": "General alerts are computed from the current state (no history) at most every 30 seconds and shown in Application status, as notifications and in GET /api/alerts.",
|
||||||
|
"alertSettingsDocs": "Alerts documentation",
|
||||||
|
"alertSettingsGeneral": "General",
|
||||||
|
"alertSettingsEnabled": "Alerts enabled",
|
||||||
|
"alertSettingsNotifications": "Show notifications for new alerts",
|
||||||
|
"alertSettingsCertificates": "Certificates",
|
||||||
|
"alertSettingsCertificateExpiry": "Expired or expiring certificates",
|
||||||
|
"alertSettingsWarningDays": "Warning (days before expiry)",
|
||||||
|
"alertSettingsErrorDays": "Error (days before expiry)",
|
||||||
|
"alertSettingsRenewal": "Failed ACME renewals",
|
||||||
|
"alertSettingsAcmeRuntime": "ACME environment not ready",
|
||||||
|
"alertSettingsResources": "Resources",
|
||||||
|
"alertSettingsFileDescriptors": "File descriptors of RustProxy",
|
||||||
|
"alertSettingsWarningPercent": "Warning (% of limit)",
|
||||||
|
"alertSettingsErrorPercent": "Error (% of limit)",
|
||||||
|
"alertSettingsConfiguration": "Configuration and updates",
|
||||||
|
"alertSettingsGeoip": "Country rules without a GeoIP database",
|
||||||
|
"alertSettingsPrometheus": "Prometheus exporter open without token",
|
||||||
|
"alertSettingsUpdate": "New RustProxy version (information)",
|
||||||
|
"alertSettingsDockerHint": "Docker alerts are configured in",
|
||||||
|
"alertSettingsDockerLink": "Settings → Docker agents",
|
||||||
|
"alertSettingsNumberInvalid": "Enter a whole number.",
|
||||||
|
"alertSettingsCertificateOrder": "The error threshold must be fewer days than the warning threshold.",
|
||||||
|
"alertSettingsPercentOrder": "The error threshold must be higher than the warning threshold."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+134
-6
@@ -36,7 +36,7 @@
|
|||||||
"globalMethodTitle": "Metody HTTP",
|
"globalMethodTitle": "Metody HTTP",
|
||||||
"globalMethodHelp": "Blokuj wybrane metody albo zezwalaj tylko na wskazane. Działa również dla przekierowań i unieważniania cache; odmowa zwraca 405.",
|
"globalMethodHelp": "Blokuj wybrane metody albo zezwalaj tylko na wskazane. Działa również dla przekierowań i unieważniania cache; odmowa zwraca 405.",
|
||||||
"globalMethodMode": "Polityka metod",
|
"globalMethodMode": "Polityka metod",
|
||||||
"globalMethodList": "Metody HTTP (oddzielone przecinkami, spacjami lub nową linią)",
|
"globalMethodList": "Metody HTTP",
|
||||||
"globalContentTypeTitle": "Content-Type żądania",
|
"globalContentTypeTitle": "Content-Type żądania",
|
||||||
"globalContentTypeHelp": "Blokuj zadeklarowane typy MIME (dokładnie lub typ/*) kodem 403. Sprawdzany jest nagłówek, nie zawartość żądania.",
|
"globalContentTypeHelp": "Blokuj zadeklarowane typy MIME (dokładnie lub typ/*) kodem 403. Sprawdzany jest nagłówek, nie zawartość żądania.",
|
||||||
"globalContentTypeEnabled": "Włącz blokadę Content-Type",
|
"globalContentTypeEnabled": "Włącz blokadę Content-Type",
|
||||||
@@ -1611,7 +1611,6 @@
|
|||||||
"dockerBackendIpAuto": "Auto / domyslne agenta",
|
"dockerBackendIpAuto": "Auto / domyslne agenta",
|
||||||
"dockerBackendScheme": "Protokol backendu",
|
"dockerBackendScheme": "Protokol backendu",
|
||||||
"dockerBindingIp": "binding Dockera",
|
"dockerBindingIp": "binding Dockera",
|
||||||
"dockerAgentDefaultIp": "domyslne agenta",
|
|
||||||
"dockerAgentEndpointHelp": "Dla domyślnej konfiguracji agenta użyj https://. Zwykły HTTP pozostaje tylko dla zgodności i jest wyraźnie oznaczony jako niezabezpieczony.",
|
"dockerAgentEndpointHelp": "Dla domyślnej konfiguracji agenta użyj https://. Zwykły HTTP pozostaje tylko dla zgodności i jest wyraźnie oznaczony jako niezabezpieczony.",
|
||||||
"dockerTlsFingerprint": "SHA-256 certyfikatu TLS",
|
"dockerTlsFingerprint": "SHA-256 certyfikatu TLS",
|
||||||
"dockerTlsFingerprintHelp": "Dla domyślnego certyfikatu self-signed wklej fingerprint wypisany przez install.sh albo rustproxy-docker-agent --print-fingerprint. Zostaw puste wyłącznie dla certyfikatu zaufanego przez publiczne CA.",
|
"dockerTlsFingerprintHelp": "Dla domyślnego certyfikatu self-signed wklej fingerprint wypisany przez install.sh albo rustproxy-docker-agent --print-fingerprint. Zostaw puste wyłącznie dla certyfikatu zaufanego przez publiczne CA.",
|
||||||
@@ -1690,10 +1689,8 @@
|
|||||||
"dockerDefaultAclHelp": "Wybierz maksymalnie 8 profili dziedziczonych przez Docker Vhosty bez własnego wyboru. Brak zaznaczenia przy aplikacji oznacza dziedziczenie.",
|
"dockerDefaultAclHelp": "Wybierz maksymalnie 8 profili dziedziczonych przez Docker Vhosty bez własnego wyboru. Brak zaznaczenia przy aplikacji oznacza dziedziczenie.",
|
||||||
"dockerApplyService": "Zastosuj zmiany",
|
"dockerApplyService": "Zastosuj zmiany",
|
||||||
"dockerAccessControl": "Kontrola dostępu",
|
"dockerAccessControl": "Kontrola dostępu",
|
||||||
"dockerAclSummary": "Opcjonalny profil ACL i reguły IP per aplikacja",
|
|
||||||
"dockerAclProfile": "Profile ACL",
|
"dockerAclProfile": "Profile ACL",
|
||||||
"dockerAclProfileNone": "Bez profilu ACL",
|
"dockerAclProfileNone": "Bez profilu ACL",
|
||||||
"dockerAclProfileInherit": "Domyślny agenta",
|
|
||||||
"dockerAclInline": "Użyj dodatkowego ACL per aplikacja",
|
"dockerAclInline": "Użyj dodatkowego ACL per aplikacja",
|
||||||
"dockerAclDefault": "Domyślna akcja ACL",
|
"dockerAclDefault": "Domyślna akcja ACL",
|
||||||
"dockerAclRules": "Reguły IP/CIDR",
|
"dockerAclRules": "Reguły IP/CIDR",
|
||||||
@@ -3362,7 +3359,7 @@
|
|||||||
"cacheRuleStageDeliver": "wysyłka",
|
"cacheRuleStageDeliver": "wysyłka",
|
||||||
"cacheRuleStageHelpRequest": "Przed wyszukaniem w cache (vcl_recv / vcl_hash): pominięcie, ciasteczka, parametry, klucz cache.",
|
"cacheRuleStageHelpRequest": "Przed wyszukaniem w cache (vcl_recv / vcl_hash): pominięcie, ciasteczka, parametry, klucz cache.",
|
||||||
"cacheRuleStageHelpResponse": "Gdy odpowie backend (vcl_backend_response): TTL, grace, zapisywać czy nie.",
|
"cacheRuleStageHelpResponse": "Gdy odpowie backend (vcl_backend_response): TTL, grace, zapisywać czy nie.",
|
||||||
"cacheRuleStageHelpDeliver": "Przed wysłaniem każdej odpowiedzi do klienta (vcl_deliver): nagłówki.",
|
"cacheRuleStageHelpDeliver": "Przed wysłaniem każdej odpowiedzi aplikacji do klienta (vcl_deliver): nagłówki. Działa dla wszystkich odpowiedzi vhosta — także przy wyłączonym lub pominiętym cache — więc nadpisuje np. Cache-Control dla całej aplikacji.",
|
||||||
"cacheRuleMatch": "Warunki",
|
"cacheRuleMatch": "Warunki",
|
||||||
"cacheRuleMatchAll": "Wszystkie muszą pasować",
|
"cacheRuleMatchAll": "Wszystkie muszą pasować",
|
||||||
"cacheRuleMatchAny": "Wystarczy dowolny",
|
"cacheRuleMatchAny": "Wystarczy dowolny",
|
||||||
@@ -3500,6 +3497,137 @@
|
|||||||
"systemInfoSource": "Źródło",
|
"systemInfoSource": "Źródło",
|
||||||
"systemInfoFooter": "Tylko odczyt · brakujących wartości nie szacujemy",
|
"systemInfoFooter": "Tylko odczyt · brakujących wartości nie szacujemy",
|
||||||
"systemInfoDocs": "Dokumentacja",
|
"systemInfoDocs": "Dokumentacja",
|
||||||
"systemInfoFdsNote": "limit {limit} · wątki: {count}"
|
"systemInfoFdsNote": "limit {limit} · wątki: {count}",
|
||||||
|
"dockerAclPublic": "Publiczny vhost (bez domyślnego ACL agenta)",
|
||||||
|
"dockerAclPublicHelp": "Usługa jest dostępna bez domyślnych profili ACL agenta. Globalne reguły blokowania/dopuszczania nadal działają.",
|
||||||
|
"dockerAclInheritedActive": "Używany domyślny ACL agenta: {profiles}. Odznacz, aby nadpisać go dla tej usługi.",
|
||||||
|
"dockerAclInheritedOverridden": "Nadpisuje domyślny ACL agenta ({profiles}) dla tej usługi.",
|
||||||
|
"dockerAclStatePublic": "Publiczny — bez domyślnego ACL agenta",
|
||||||
|
"dockerAclStateProfiles": "ACL",
|
||||||
|
"dockerAclStateInline": "reguły per aplikacja",
|
||||||
|
"dockerAclStateNone": "Bez profilu ACL",
|
||||||
|
"overviewLayoutManual": "Układaj ręcznie",
|
||||||
|
"overviewLayoutManualHint": "Bloki nie przeskakują podczas przeciągania; pasek pokazuje, gdzie trafi blok. Dopasowanie do ekranu jest wyłączone, więc zapisany układ jest taki, jak widzisz.",
|
||||||
|
"dockerCacheSettings": "Cache dla tego vhosta",
|
||||||
|
"dockerCacheSettingsHelp": "Domyślny TTL i reguły cache (jak VCL)",
|
||||||
|
"dockerCacheTtl": "Domyślny TTL (sekundy)",
|
||||||
|
"dockerCacheTtlHelp": "Puste = globalna wartość domyślna cache.",
|
||||||
|
"dockerCertNameWildcard": "wildcard",
|
||||||
|
"dockerCertNameWww": "www",
|
||||||
|
"dockerCertNameApex": "domena główna",
|
||||||
|
"dockerCertNameSubdomain": "subdomena",
|
||||||
|
"dockerAgentsShared": "Agenci Docker",
|
||||||
|
"methodGet": "Pobranie zasobu",
|
||||||
|
"methodHead": "Tylko nagłówki",
|
||||||
|
"methodPost": "Wysłanie danych",
|
||||||
|
"methodPut": "Zastąpienie zasobu",
|
||||||
|
"methodPatch": "Częściowa zmiana",
|
||||||
|
"methodDelete": "Usunięcie zasobu",
|
||||||
|
"methodOptions": "CORS preflight / możliwości serwera",
|
||||||
|
"methodConnect": "Tunel (proxy)",
|
||||||
|
"methodTrace": "Echo żądania — zwykle blokowane",
|
||||||
|
"methodTrack": "Wariant TRACE z IIS — zwykle blokowane",
|
||||||
|
"methodPurge": "Unieważnianie cache",
|
||||||
|
"methodBan": "Ban w Varnish",
|
||||||
|
"methodWebdav": "WebDAV / CalDAV",
|
||||||
|
"methodCustom": "Własna metoda",
|
||||||
|
"methodPickerChoose": "Wybierz metody HTTP",
|
||||||
|
"methodPickerSelected": "Wybrane metody: {count}",
|
||||||
|
"methodPickerNone": "Nie wybrano metod",
|
||||||
|
"methodPickerSearch": "Szukaj lub wpisz inną metodę",
|
||||||
|
"methodPickerAddHint": "Naciśnij Enter, aby dodać {value}",
|
||||||
|
"methodPickerEmpty": "Brak metod",
|
||||||
|
"methodPickerInvalid": "Nieprawidłowa metoda HTTP: {value}",
|
||||||
|
"cacheRuleActionDefaultHeader": "Ustaw nagłówek, jeśli go brak",
|
||||||
|
"cacheRuleTplBrowser": "Cache przeglądarki dla plików statycznych (30 dni)",
|
||||||
|
"cacheRuleTplNoBrowser": "Bez cache przeglądarki dla HTML i /admin",
|
||||||
|
"cacheRuleTplSecurity": "Domyślne nagłówki bezpieczeństwa",
|
||||||
|
"tlsPresets": "Profile",
|
||||||
|
"tlsPresetModern": "Nowoczesny (tylko TLS 1.3)",
|
||||||
|
"tlsPresetModernHelp": "Tylko TLS 1.3: najsilniejsze ustawienie, dla aktualnych przeglądarek i systemów.",
|
||||||
|
"tlsPresetRecommended": "Zalecany (maksymalna zgodność)",
|
||||||
|
"tlsPresetRecommendedHelp": "TLS 1.2 i 1.3 ze wszystkimi szyframi rustls — największa zgodność możliwa w RustProxy, także dla starszych Androidów, Javy 8, OpenSSL 1.0.2 i IE 11.",
|
||||||
|
"tlsPresetStrong": "Tylko 256-bit",
|
||||||
|
"tlsPresetStrongHelp": "TLS 1.2 i 1.3 bez szyfrów AES-128.",
|
||||||
|
"tlsPresetCustom": "Własny",
|
||||||
|
"tlsConfiguratorHelp": "Zaznacz szyfry, które serwer ma oferować. Wszystkie zaznaczone = domyślne rustls (nic nie jest zapisywane). rustls obsługuje tylko szyfry AEAD z forward secrecy, więc TLS 1.0/1.1, CBC, RC4, 3DES i statycznego RSA nie da się włączyć — bardzo stare klienty (Windows XP, IE 6–10, Android 4.3 i starsze, Java 6/7) nie połączą się niezależnie od ustawień. Kolejność szyfrów ustala serwer.",
|
||||||
|
"tlsSuite": "Szyfr",
|
||||||
|
"tlsSuiteAuth": "Certyfikat",
|
||||||
|
"tlsSuiteCipher": "Szyfrowanie",
|
||||||
|
"tlsSuiteBits": "Bity",
|
||||||
|
"tlsSuiteRating": "Ocena",
|
||||||
|
"tlsSuiteAnyCert": "RSA lub ECDSA",
|
||||||
|
"tlsVersionOn": "WŁĄCZONY",
|
||||||
|
"tlsVersionOff": "WYŁĄCZONY — włącz wersję powyżej",
|
||||||
|
"tlsRatingStrong": "silny",
|
||||||
|
"tlsRatingRecommended": "dobry",
|
||||||
|
"tlsScoreProtocol": "Protokoły",
|
||||||
|
"tlsScoreKeyExchange": "Wymiana kluczy",
|
||||||
|
"tlsScoreCipher": "Siła szyfrów",
|
||||||
|
"tlsCheckForwardSecrecy": "Forward secrecy dla każdego połączenia (ECDHE)",
|
||||||
|
"tlsCheckAead": "Tylko szyfry AEAD (GCM, ChaCha20-Poly1305)",
|
||||||
|
"tlsCheckNoLegacy": "SSL 3, TLS 1.0/1.1, CBC i RC4 nieobsługiwane",
|
||||||
|
"tlsCheckTls13": "TLS 1.3 włączony",
|
||||||
|
"tlsCheckNoTls13": "TLS 1.3 wyłączony — wymaga go HTTP/3",
|
||||||
|
"tlsCheckPqc": "Wymiana kluczy post-quantum (X25519MLKEM768)",
|
||||||
|
"tlsCheckNoPqc": "Brak wymiany kluczy post-quantum (opcjonalne)",
|
||||||
|
"tlsCheckHsts": "HSTS włączony globalnie",
|
||||||
|
"tlsCheckNoHsts": "HSTS wyłączony — potrzebny do A+ (globalne nagłówki bezpieczeństwa)",
|
||||||
|
"tlsCompatibility": "Zgodność klientów (symulacja)",
|
||||||
|
"tlsClient_modern": "Chrome, Edge, Firefox (aktualne)",
|
||||||
|
"tlsClient_safari_new": "Safari 12.1+ / iOS 12.2+",
|
||||||
|
"tlsClient_safari_old": "Safari 9–12 / iOS 9–12.1",
|
||||||
|
"tlsClient_android_7": "Android 7–9",
|
||||||
|
"tlsClient_android_44": "Android 4.4–6",
|
||||||
|
"tlsClient_java_11": "Java 11+",
|
||||||
|
"tlsClient_java_8": "Java 8",
|
||||||
|
"tlsClient_openssl_111": "OpenSSL 1.1.1+ (curl, Python)",
|
||||||
|
"tlsClient_openssl_102": "OpenSSL 1.0.2 (CentOS 7, stary curl)",
|
||||||
|
"tlsClient_ie11_win10": "IE 11 / Edge Legacy na Windows 10",
|
||||||
|
"tlsClient_ie11_win7": "IE 11 na Windows 7 / 8.1",
|
||||||
|
"tlsClient_legacy": "Windows XP, IE 6–10, Android ≤ 4.3, Java 6/7",
|
||||||
|
"tlsClientState_fail": "Brak wspólnego protokołu lub szyfru przy tym wyborze.",
|
||||||
|
"tlsClientState_ecdsa": "Tylko z certyfikatem ECDSA (ten system nie ma ECDHE-RSA-GCM).",
|
||||||
|
"tlsClientState_impossible": "Wymaga TLS 1.0/1.1 lub CBC, których rustls nie obsługuje.",
|
||||||
|
"tlsGradeNote": "Szacunek w stylu SSL Labs dla protokołów, wymiany kluczy i szyfrów; łańcuch certyfikatu i jego klucz nie są tu oceniane. Lista zgodności to uproszczona symulacja.",
|
||||||
|
"appHealthAlerts": "Alerty",
|
||||||
|
"appHealthAlertsNone": "Brak aktywnych alertów.",
|
||||||
|
"alertsTitle": "Aktywne alerty: {count}",
|
||||||
|
"alertOpen": "Otwórz",
|
||||||
|
"alertCertificateExpired": "Certyfikat {subject} wygasł.",
|
||||||
|
"alertCertificateExpiring": "Certyfikat {subject} wygasa za {value} dni.",
|
||||||
|
"alertCertificateRenewalFailed": "Odnowienie certyfikatu {subject} nie powiodło się ({value}×): {message}",
|
||||||
|
"alertAcmeRuntime": "Środowisko ACME nie jest gotowe ({value}); automatyczne odnawianie może się nie udać.",
|
||||||
|
"alertFileDescriptorsHigh": "RustProxy używa {value} deskryptorów plików (≥ {threshold} limitu).",
|
||||||
|
"alertGeoipMissing": "Reguły krajów są włączone, ale baza GeoIP nie jest załadowana.",
|
||||||
|
"alertPrometheusExposed": "Eksporter Prometheus na {subject} nie ma tokena ani ograniczenia adresów.",
|
||||||
|
"alertUpdateAvailable": "Dostępny RustProxy {value} (działa {threshold}).",
|
||||||
|
"dockerGroupContainer": "Kontener",
|
||||||
|
"dockerGroupCount": "Endpointy: {count} · opublikowane: {published}",
|
||||||
|
"alertSettingsTitle": "Alerty",
|
||||||
|
"alertSettingsHelp": "Alerty ogólne są liczone z bieżącego stanu (bez historii) najwyżej co 30 sekund i pokazywane w Stanie aplikacji, jako powiadomienia oraz w GET /api/alerts.",
|
||||||
|
"alertSettingsDocs": "Dokumentacja alertów",
|
||||||
|
"alertSettingsGeneral": "Ogólne",
|
||||||
|
"alertSettingsEnabled": "Alerty włączone",
|
||||||
|
"alertSettingsNotifications": "Pokazuj powiadomienia o nowych alertach",
|
||||||
|
"alertSettingsCertificates": "Certyfikaty",
|
||||||
|
"alertSettingsCertificateExpiry": "Wygasłe lub wygasające certyfikaty",
|
||||||
|
"alertSettingsWarningDays": "Ostrzeżenie (dni przed wygaśnięciem)",
|
||||||
|
"alertSettingsErrorDays": "Błąd (dni przed wygaśnięciem)",
|
||||||
|
"alertSettingsRenewal": "Nieudane odnowienia ACME",
|
||||||
|
"alertSettingsAcmeRuntime": "Środowisko ACME niegotowe",
|
||||||
|
"alertSettingsResources": "Zasoby",
|
||||||
|
"alertSettingsFileDescriptors": "Deskryptory plików RustProxy",
|
||||||
|
"alertSettingsWarningPercent": "Ostrzeżenie (% limitu)",
|
||||||
|
"alertSettingsErrorPercent": "Błąd (% limitu)",
|
||||||
|
"alertSettingsConfiguration": "Konfiguracja i aktualizacje",
|
||||||
|
"alertSettingsGeoip": "Reguły krajów bez bazy GeoIP",
|
||||||
|
"alertSettingsPrometheus": "Eksporter Prometheus otwarty bez tokena",
|
||||||
|
"alertSettingsUpdate": "Nowa wersja RustProxy (informacja)",
|
||||||
|
"alertSettingsDockerHint": "Alerty Docker konfigurujesz w",
|
||||||
|
"alertSettingsDockerLink": "Ustawienia → Agenci Docker",
|
||||||
|
"alertSettingsNumberInvalid": "Wpisz liczbę całkowitą.",
|
||||||
|
"alertSettingsCertificateOrder": "Próg błędu musi mieć mniej dni niż próg ostrzeżenia.",
|
||||||
|
"alertSettingsPercentOrder": "Próg błędu musi być wyższy niż próg ostrzeżenia."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,223 @@
|
|||||||
|
const GENERAL_ALERTS_TTL: Duration = Duration::from_secs(30);
|
||||||
|
type GeneralAlertsCache = std::sync::Mutex<Option<(std::time::Instant, u64, Vec<Value>)>>;
|
||||||
|
|
||||||
|
fn general_alert(
|
||||||
|
kind: &'static str,
|
||||||
|
severity: &'static str,
|
||||||
|
subject: impl Into<String>,
|
||||||
|
value: Option<String>,
|
||||||
|
threshold: Option<String>,
|
||||||
|
message: Option<String>,
|
||||||
|
) -> Value {
|
||||||
|
let subject = subject.into();
|
||||||
|
json!({
|
||||||
|
"key": format!("{kind}|{subject}"),
|
||||||
|
"kind": kind,
|
||||||
|
"severity": severity,
|
||||||
|
"subject": subject,
|
||||||
|
"value": value,
|
||||||
|
"threshold": threshold,
|
||||||
|
"message": message,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fn certificate_alerts(state: &App, config: &crate::config::Config, out: &mut Vec<Value>) {
|
||||||
|
let settings = &config.alerts;
|
||||||
|
let warning_days = i64::from(settings.certificate_warning_days);
|
||||||
|
let error_days = i64::from(settings.certificate_error_days);
|
||||||
|
let now = std::time::SystemTime::now()
|
||||||
|
.duration_since(std::time::UNIX_EPOCH)
|
||||||
|
.map(|value| value.as_secs() as i64)
|
||||||
|
.unwrap_or_default();
|
||||||
|
let renewals = state.acme.renewal_view();
|
||||||
|
for certificate in &config.tls.certificates {
|
||||||
|
let not_after = state
|
||||||
|
.policy
|
||||||
|
.cert_dir
|
||||||
|
.as_deref()
|
||||||
|
.and_then(|directory| {
|
||||||
|
crate::tls::certificate_metadata(directory, &certificate.cert_file).ok()
|
||||||
|
})
|
||||||
|
.and_then(|metadata| metadata.not_after_unix)
|
||||||
|
.or_else(|| {
|
||||||
|
renewals
|
||||||
|
.get(&certificate.id)
|
||||||
|
.and_then(|item| item.not_after)
|
||||||
|
});
|
||||||
|
if let Some(not_after) = not_after.filter(|_| settings.certificate_expiry) {
|
||||||
|
let days = (not_after - now).div_euclid(86_400);
|
||||||
|
if not_after <= now {
|
||||||
|
out.push(general_alert(
|
||||||
|
"certificate_expired",
|
||||||
|
"error",
|
||||||
|
&certificate.id,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
));
|
||||||
|
} else if days < warning_days {
|
||||||
|
out.push(general_alert(
|
||||||
|
"certificate_expiring",
|
||||||
|
if days < error_days {
|
||||||
|
"error"
|
||||||
|
} else {
|
||||||
|
"warning"
|
||||||
|
},
|
||||||
|
&certificate.id,
|
||||||
|
Some(days.to_string()),
|
||||||
|
Some(warning_days.to_string()),
|
||||||
|
None,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if let Some(renewal) = renewals
|
||||||
|
.get(&certificate.id)
|
||||||
|
.filter(|_| settings.certificate_renewal)
|
||||||
|
{
|
||||||
|
if renewal.failures > 0 {
|
||||||
|
out.push(general_alert(
|
||||||
|
"certificate_renewal_failed",
|
||||||
|
"error",
|
||||||
|
&certificate.id,
|
||||||
|
Some(renewal.failures.to_string()),
|
||||||
|
None,
|
||||||
|
(!renewal.message.is_empty()).then(|| renewal.message.clone()),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if settings.acme_runtime
|
||||||
|
&& config
|
||||||
|
.tls
|
||||||
|
.certificates
|
||||||
|
.iter()
|
||||||
|
.any(|item| item.issuer.is_some())
|
||||||
|
{
|
||||||
|
let runtime = state.acme.runtime_view();
|
||||||
|
if runtime.status != "ready" {
|
||||||
|
out.push(general_alert(
|
||||||
|
"acme_runtime",
|
||||||
|
"warning",
|
||||||
|
"acme",
|
||||||
|
Some(runtime.status.to_owned()),
|
||||||
|
None,
|
||||||
|
Some(runtime.message.to_owned()),
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn resource_alerts(state: &App, settings: &crate::alerts::Settings, out: &mut Vec<Value>) {
|
||||||
|
if !settings.file_descriptors {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let system = state.diagnostics.view();
|
||||||
|
if let (Some(open), Some(max)) = (system.open_fds, system.max_fds) {
|
||||||
|
if max > 0 {
|
||||||
|
let percent = (open as f64 / max as f64 * 100.0).round() as u64;
|
||||||
|
if percent >= u64::from(settings.file_descriptors_warning_percent) {
|
||||||
|
out.push(general_alert(
|
||||||
|
"file_descriptors_high",
|
||||||
|
if percent >= u64::from(settings.file_descriptors_error_percent) {
|
||||||
|
"error"
|
||||||
|
} else {
|
||||||
|
"warning"
|
||||||
|
},
|
||||||
|
"process",
|
||||||
|
Some(format!("{open}/{max}")),
|
||||||
|
Some(format!("{}%", settings.file_descriptors_warning_percent)),
|
||||||
|
None,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn policy_alerts(state: &App, config: &crate::config::Config, out: &mut Vec<Value>) {
|
||||||
|
let settings = &config.alerts;
|
||||||
|
let country_rules = config.global_security.country_access.mode
|
||||||
|
!= crate::rate_limit::CountryMode::Off
|
||||||
|
|| config.vhosts.iter().any(|vhost| {
|
||||||
|
vhost.rate_limit.country_access.mode != crate::rate_limit::CountryMode::Off
|
||||||
|
});
|
||||||
|
if settings.geoip && country_rules && !state.geoip.load().view().loaded {
|
||||||
|
out.push(general_alert(
|
||||||
|
"geoip_missing",
|
||||||
|
"warning",
|
||||||
|
"geoip",
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
let prometheus = &state.active_prometheus;
|
||||||
|
if settings.prometheus
|
||||||
|
&& prometheus.enabled
|
||||||
|
&& !prometheus.listen.ip().is_loopback()
|
||||||
|
&& state.prometheus_token_hash.load().is_none()
|
||||||
|
&& prometheus.allowed_cidrs.is_empty()
|
||||||
|
{
|
||||||
|
out.push(general_alert(
|
||||||
|
"prometheus_exposed",
|
||||||
|
"warning",
|
||||||
|
prometheus.listen.to_string(),
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
None,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
let update = state.software_update.snapshot();
|
||||||
|
if settings.update && update.update_available {
|
||||||
|
out.push(general_alert(
|
||||||
|
"update_available",
|
||||||
|
"info",
|
||||||
|
"rustproxy",
|
||||||
|
update.latest_version.clone(),
|
||||||
|
Some(update.current_version.clone()),
|
||||||
|
None,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn compute_general_alerts(state: &App) -> Vec<Value> {
|
||||||
|
let snapshot = state.config.load_full();
|
||||||
|
let config = &snapshot.envelope.config;
|
||||||
|
let mut out = Vec::new();
|
||||||
|
if !config.alerts.enabled {
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
certificate_alerts(state, config, &mut out);
|
||||||
|
resource_alerts(state, &config.alerts, &mut out);
|
||||||
|
policy_alerts(state, config, &mut out);
|
||||||
|
out.truncate(64);
|
||||||
|
out
|
||||||
|
}
|
||||||
|
|
||||||
|
fn general_alerts(state: &App) -> Vec<Value> {
|
||||||
|
static CACHE: std::sync::OnceLock<GeneralAlertsCache> = std::sync::OnceLock::new();
|
||||||
|
let cache = CACHE.get_or_init(|| std::sync::Mutex::new(None));
|
||||||
|
let mut guard = cache.lock().unwrap_or_else(|error| error.into_inner());
|
||||||
|
let revision = state.config.load().envelope.revision;
|
||||||
|
if let Some((at, cached_revision, alerts)) = guard.as_ref() {
|
||||||
|
if at.elapsed() < GENERAL_ALERTS_TTL && *cached_revision == revision {
|
||||||
|
return alerts.clone();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let alerts = compute_general_alerts(state);
|
||||||
|
*guard = Some((std::time::Instant::now(), revision, alerts.clone()));
|
||||||
|
alerts
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn alerts_status(State(state): State<Arc<App>>) -> Json<Value> {
|
||||||
|
let alerts = tokio::task::spawn_blocking({
|
||||||
|
let state = state.clone();
|
||||||
|
move || general_alerts(&state)
|
||||||
|
})
|
||||||
|
.await
|
||||||
|
.unwrap_or_default();
|
||||||
|
let docker = {
|
||||||
|
let snapshot = state.config.load_full();
|
||||||
|
crate::docker::alerts(&snapshot.envelope.config, &state.docker.latest())
|
||||||
|
};
|
||||||
|
Json(json!({ "alerts": alerts, "docker": docker }))
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ fn general_api_token_allowed(method: &Method, path: &str, permission: &str) -> b
|
|||||||
path,
|
path,
|
||||||
"/api/status"
|
"/api/status"
|
||||||
| "/api/system-info"
|
| "/api/system-info"
|
||||||
|
| "/api/alerts"
|
||||||
| "/api/backends"
|
| "/api/backends"
|
||||||
| "/api/docker"
|
| "/api/docker"
|
||||||
| "/api/certificates"
|
| "/api/certificates"
|
||||||
|
|||||||
@@ -72,10 +72,10 @@ async fn cache_rules_test(
|
|||||||
|error: anyhow::Error| ApiError(StatusCode::UNPROCESSABLE_ENTITY, error.to_string());
|
|error: anyhow::Error| ApiError(StatusCode::UNPROCESSABLE_ENTITY, error.to_string());
|
||||||
let snapshot = state.config.load_full();
|
let snapshot = state.config.load_full();
|
||||||
let config = &snapshot.envelope.config;
|
let config = &snapshot.envelope.config;
|
||||||
|
let vhosts = cache_rule_vhosts(&state);
|
||||||
let vhost = match input.vhost_id.as_deref().filter(|id| !id.is_empty()) {
|
let vhost = match input.vhost_id.as_deref().filter(|id| !id.is_empty()) {
|
||||||
Some(id) => Some(
|
Some(id) => Some(
|
||||||
config
|
vhosts
|
||||||
.vhosts
|
|
||||||
.iter()
|
.iter()
|
||||||
.find(|vhost| vhost.id == id)
|
.find(|vhost| vhost.id == id)
|
||||||
.ok_or_else(|| ApiError(StatusCode::NOT_FOUND, "unknown vhost".into()))?,
|
.ok_or_else(|| ApiError(StatusCode::NOT_FOUND, "unknown vhost".into()))?,
|
||||||
@@ -212,8 +212,7 @@ async fn cache_rules_test(
|
|||||||
"reason": store_reason,
|
"reason": store_reason,
|
||||||
});
|
});
|
||||||
let deliver = rules.evaluate_deliver(&request, status, &response_headers, false);
|
let deliver = rules.evaluate_deliver(&request, status, &response_headers, false);
|
||||||
deliver_value =
|
deliver_value = json!({"matched": deliver.matched, "set": deliver.set, "remove": deliver.remove, "defaults": deliver.defaults});
|
||||||
json!({"matched": deliver.matched, "set": deliver.set, "remove": deliver.remove});
|
|
||||||
}
|
}
|
||||||
Ok(Json(json!({
|
Ok(Json(json!({
|
||||||
"host": host,
|
"host": host,
|
||||||
@@ -246,6 +245,31 @@ async fn cache_rules_import_vcl(
|
|||||||
Ok(Json(json!(result)))
|
Ok(Json(json!(result)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn cache_rule_vhosts(state: &Arc<App>) -> Vec<crate::vhost::Vhost> {
|
||||||
|
let snapshot = state.config.load_full();
|
||||||
|
let config = &snapshot.envelope.config;
|
||||||
|
if config.docker_agents.agents.is_empty() {
|
||||||
|
return config.vhosts.clone();
|
||||||
|
}
|
||||||
|
crate::docker::effective_config(config.clone(), &state.docker.latest())
|
||||||
|
.map(|effective| effective.vhosts)
|
||||||
|
.unwrap_or_else(|_| config.vhosts.clone())
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn cache_rules_targets(State(state): State<Arc<App>>) -> Json<Value> {
|
||||||
|
let targets: Vec<Value> = cache_rule_vhosts(&state)
|
||||||
|
.iter()
|
||||||
|
.map(|vhost| {
|
||||||
|
json!({
|
||||||
|
"id": &vhost.id,
|
||||||
|
"hosts": vhost.frontend.hosts.iter().take(4).collect::<Vec<_>>(),
|
||||||
|
"docker": vhost.id.starts_with("docker-"),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
Json(json!({ "targets": targets }))
|
||||||
|
}
|
||||||
|
|
||||||
async fn cache_rules_stats() -> Json<Value> {
|
async fn cache_rules_stats() -> Json<Value> {
|
||||||
Json(json!({"hits": crate::cache::rule_hit_counts()}))
|
Json(json!({"hits": crate::cache::rule_hit_counts()}))
|
||||||
}
|
}
|
||||||
@@ -23,6 +23,7 @@ enum ConfigSection {
|
|||||||
Response,
|
Response,
|
||||||
Logging,
|
Logging,
|
||||||
GlobalSecurity,
|
GlobalSecurity,
|
||||||
|
Alerts,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ConfigSection {
|
impl ConfigSection {
|
||||||
@@ -51,6 +52,7 @@ impl ConfigSection {
|
|||||||
"response" => Some(Self::Response),
|
"response" => Some(Self::Response),
|
||||||
"logging" => Some(Self::Logging),
|
"logging" => Some(Self::Logging),
|
||||||
"global-security" => Some(Self::GlobalSecurity),
|
"global-security" => Some(Self::GlobalSecurity),
|
||||||
|
"alerts" => Some(Self::Alerts),
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -87,6 +89,7 @@ impl ConfigSection {
|
|||||||
"error_log": &config.error_log,
|
"error_log": &config.error_log,
|
||||||
}),
|
}),
|
||||||
Self::GlobalSecurity => json!(&config.global_security),
|
Self::GlobalSecurity => json!(&config.global_security),
|
||||||
|
Self::Alerts => json!(&config.alerts),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,6 +204,10 @@ impl ConfigSection {
|
|||||||
}
|
}
|
||||||
config.global_security = part;
|
config.global_security = part;
|
||||||
}
|
}
|
||||||
|
Self::Alerts => {
|
||||||
|
config.alerts =
|
||||||
|
serde_json::from_value(value).map_err(|error| invalid_section(name, error))?
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ include!("file_logs.rs");
|
|||||||
include!("file_log_search.rs");
|
include!("file_log_search.rs");
|
||||||
include!("operations.rs");
|
include!("operations.rs");
|
||||||
include!("cache_rules.rs");
|
include!("cache_rules.rs");
|
||||||
|
include!("alerts.rs");
|
||||||
include!("certificate_api.rs");
|
include!("certificate_api.rs");
|
||||||
include!("certificates.rs");
|
include!("certificates.rs");
|
||||||
include!("tail.rs");
|
include!("tail.rs");
|
||||||
|
|||||||
+341
-4
@@ -2,7 +2,7 @@
|
|||||||
"openapi": "3.0.3",
|
"openapi": "3.0.3",
|
||||||
"info": {
|
"info": {
|
||||||
"title": "RustProxy Administration API",
|
"title": "RustProxy Administration API",
|
||||||
"version": "0.37.1",
|
"version": "0.37.2",
|
||||||
"description": "Administration API for the active panel origin. Sign in through the panel; the same-origin HttpOnly cookie authenticates all private operations. Mutations also require the exact Origin, X-RustProxy-Request: 1 and a session-bound X-CSRF-Token. Loopback HTTP is the default; Settings can enable HTTPS before using a non-loopback administration bind. This document contains no live configuration or credentials. Object schemas marked extensible are summaries: full configuration validation is authoritative in Rust. The API also permits explicitly scoped GeneralApiBearer tokens on a narrow route allowlist, with RO/RW and source CIDR checks; API-token management and Prometheus-token management are browser-session-only."
|
"description": "Administration API for the active panel origin. Sign in through the panel; the same-origin HttpOnly cookie authenticates all private operations. Mutations also require the exact Origin, X-RustProxy-Request: 1 and a session-bound X-CSRF-Token. Loopback HTTP is the default; Settings can enable HTTPS before using a non-loopback administration bind. This document contains no live configuration or credentials. Object schemas marked extensible are summaries: full configuration validation is authoritative in Rust. The API also permits explicitly scoped GeneralApiBearer tokens on a narrow route allowlist, with RO/RW and source CIDR checks; API-token management and Prometheus-token management are browser-session-only."
|
||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
@@ -1244,6 +1244,63 @@
|
|||||||
"$ref": "#/components/schemas/UserAgentBlocking"
|
"$ref": "#/components/schemas/UserAgentBlocking"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"alerts": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Since 0.37.2. General alert settings (Settings → Alerts): enabled, notifications, certificate_expiry, certificate_warning_days (1..90, default 14), certificate_error_days (below warning, default 3), certificate_renewal, acme_runtime, file_descriptors, file_descriptors_warning_percent (default 80), file_descriptors_error_percent (default 95), geoip, prometheus, update. Omitted when all values are defaults.",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"enabled": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"notifications": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"certificate_expiry": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"certificate_renewal": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"acme_runtime": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"file_descriptors": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"geoip": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"prometheus": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"update": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"certificate_warning_days": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 90,
|
||||||
|
"default": 14
|
||||||
|
},
|
||||||
|
"certificate_error_days": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"default": 3
|
||||||
|
},
|
||||||
|
"file_descriptors_warning_percent": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 50,
|
||||||
|
"maximum": 99,
|
||||||
|
"default": 80
|
||||||
|
},
|
||||||
|
"file_descriptors_error_percent": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 50,
|
||||||
|
"maximum": 100,
|
||||||
|
"default": 95
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
@@ -3281,6 +3338,25 @@
|
|||||||
"default": false,
|
"default": false,
|
||||||
"description": "Enable the normal RustProxy cache policy for this generated Docker vhost."
|
"description": "Enable the normal RustProxy cache policy for this generated Docker vhost."
|
||||||
},
|
},
|
||||||
|
"cache_default_ttl_seconds": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Since 0.37.2. Default cache TTL for this Docker vhost; null uses the global cache default."
|
||||||
|
},
|
||||||
|
"cache_rules": {
|
||||||
|
"type": "array",
|
||||||
|
"maxItems": 128,
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/CacheRule"
|
||||||
|
},
|
||||||
|
"description": "Since 0.37.2. Cache rules for this Docker vhost (same format as vhost cache.rules); they run before global rules."
|
||||||
|
},
|
||||||
|
"cache_ignore_global_rules": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Since 0.37.2. Do not apply global cache rules to this Docker vhost."
|
||||||
|
},
|
||||||
"health_check": {
|
"health_check": {
|
||||||
"$ref": "#/components/schemas/DockerHealthCheck"
|
"$ref": "#/components/schemas/DockerHealthCheck"
|
||||||
},
|
},
|
||||||
@@ -3352,6 +3428,11 @@
|
|||||||
},
|
},
|
||||||
"description": "Up to 8 additional reusable ACL profiles. Explicit IP denies and country blocks beat all allows; otherwise explicit allows combine as OR; unmatched defaults require unanimous allow. Legacy acl_profile_id is still honored. Inline and global policies remain cumulative."
|
"description": "Up to 8 additional reusable ACL profiles. Explicit IP denies and country blocks beat all allows; otherwise explicit allows combine as OR; unmatched defaults require unanimous allow. Legacy acl_profile_id is still honored. Inline and global policies remain cumulative."
|
||||||
},
|
},
|
||||||
|
"inherit_acl_profiles": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "Since 0.37.2. When no ACL profiles are selected for the service, the agent default ACL profiles apply. false publishes the service without the agent default profiles (public Docker vhost); inline and global policies still apply."
|
||||||
|
},
|
||||||
"allow_certificate_mismatch": {
|
"allow_certificate_mismatch": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
@@ -4345,6 +4426,36 @@
|
|||||||
},
|
},
|
||||||
"description": "Optional per-card heights in Overview row units (1-32; a compact stat card spans 2 rows). Cards without an entry size to their content; a height smaller than the content needs is raised automatically. Keys must be registered Overview widget IDs."
|
"description": "Optional per-card heights in Overview row units (1-32; a compact stat card spans 2 rows). Cards without an entry size to their content; a height smaller than the content needs is raised automatically. Keys must be registered Overview widget IDs."
|
||||||
},
|
},
|
||||||
|
"dashboard_widget_positions": {
|
||||||
|
"type": "object",
|
||||||
|
"nullable": true,
|
||||||
|
"description": "Since 0.37.2. Fixed Overview card positions saved with *Arrange manually*: grid column count and, per card ID, [column, row] (0-based; rows in Overview row units). Applied only when Fit to screen is off and the grid has the same column count; omitted for the flowing layout.",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"columns": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1,
|
||||||
|
"maximum": 24
|
||||||
|
},
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 2,
|
||||||
|
"maxItems": 2,
|
||||||
|
"items": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 2048
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"columns",
|
||||||
|
"items"
|
||||||
|
]
|
||||||
|
},
|
||||||
"dashboard_auto_fit": {
|
"dashboard_auto_fit": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true,
|
"default": true,
|
||||||
@@ -8663,7 +8774,7 @@
|
|||||||
"maxItems": 16,
|
"maxItems": 16,
|
||||||
"items": {
|
"items": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"description": "type: pass, strip_cookies{keep}, strip_query{params,keep_only}, hash_header{name}, hash_cookie{name} (request); ttl{seconds}, grace{seconds}, no_store, ignore_cache_control, strip_set_cookie (response); set_header{name,value}, remove_header{name} (deliver).",
|
"description": "type: pass, strip_cookies{keep}, strip_query{params,keep_only}, hash_header{name}, hash_cookie{name} (request); ttl{seconds}, grace{seconds}, no_store, ignore_cache_control, strip_set_cookie (response); set_header{name,value}, default_header{name,value} (only when the response lacks the header, since 0.37.2), remove_header{name} (deliver; deliver rules apply to every response of the vhost, also when caching is off).",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -11834,7 +11945,8 @@
|
|||||||
"host-policies",
|
"host-policies",
|
||||||
"global-security",
|
"global-security",
|
||||||
"web-services",
|
"web-services",
|
||||||
"php-fpm-profiles"
|
"php-fpm-profiles",
|
||||||
|
"alerts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": "Configuration section to replace."
|
"description": "Configuration section to replace."
|
||||||
@@ -11951,6 +12063,9 @@
|
|||||||
],
|
],
|
||||||
"global-security": [
|
"global-security": [
|
||||||
"global_security"
|
"global_security"
|
||||||
|
],
|
||||||
|
"alerts": [
|
||||||
|
"alerts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -11991,7 +12106,8 @@
|
|||||||
"host-policies",
|
"host-policies",
|
||||||
"global-security",
|
"global-security",
|
||||||
"web-services",
|
"web-services",
|
||||||
"php-fpm-profiles"
|
"php-fpm-profiles",
|
||||||
|
"alerts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"description": "Exactly one supported configuration section."
|
"description": "Exactly one supported configuration section."
|
||||||
@@ -12119,10 +12235,139 @@
|
|||||||
],
|
],
|
||||||
"global-security": [
|
"global-security": [
|
||||||
"global_security"
|
"global_security"
|
||||||
|
],
|
||||||
|
"alerts": [
|
||||||
|
"alerts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/alerts": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Active general and Docker alerts",
|
||||||
|
"tags": [
|
||||||
|
"Cache"
|
||||||
|
],
|
||||||
|
"operationId": "get_api_alerts",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Active alerts",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"alerts": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"key": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"kind": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"certificate_expired",
|
||||||
|
"certificate_expiring",
|
||||||
|
"certificate_renewal_failed",
|
||||||
|
"acme_runtime",
|
||||||
|
"file_descriptors_high",
|
||||||
|
"geoip_missing",
|
||||||
|
"prometheus_exposed",
|
||||||
|
"update_available"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"severity": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"error",
|
||||||
|
"warning",
|
||||||
|
"info"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"threshold": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string",
|
||||||
|
"nullable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"docker": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Authentication required or revoked",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Host, origin or CSRF validation failed",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"429": {
|
||||||
|
"description": "Bounded worker/session/rate limit",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"503": {
|
||||||
|
"description": "Control-plane storage/worker unavailable",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"AdminSession": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GeneralApiBearer": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Since 0.37.2. Alerts computed from the current state only (no history): certificate expired/expiring within 14 days/renewal failed, ACME environment not ready while ACME certificates exist, file descriptors at 80% of the limit or more, country rules without a GeoIP database, Prometheus exporter reachable without token or address restriction, and an available update (severity info). General alerts are recomputed at most every 30 seconds and are also included as `alerts` in /api/status. `docker` repeats the Docker agent alerts."
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/docker": {
|
"/api/docker": {
|
||||||
"get": {
|
"get": {
|
||||||
"summary": "Read cached Docker agent observations",
|
"summary": "Read cached Docker agent observations",
|
||||||
@@ -15652,6 +15897,98 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/cache/rules/targets": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Vhosts that cache rules can target",
|
||||||
|
"tags": [
|
||||||
|
"Cache"
|
||||||
|
],
|
||||||
|
"operationId": "get_api_cache_rules_targets",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Rule targets",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"targets": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"hosts": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"docker": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Authentication required or revoked",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Host, origin or CSRF validation failed",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"429": {
|
||||||
|
"description": "Bounded worker/session/rate limit",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"503": {
|
||||||
|
"description": "Control-plane storage/worker unavailable",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"AdminSession": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GeneralApiBearer": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Since 0.37.2. Lists configured vhosts and the Docker vhosts generated from agent assignments and container labels (id, up to four hosts, docker flag), for the global rule vhost picker and the rule tester."
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/cache/rules/test": {
|
"/api/cache/rules/test": {
|
||||||
"post": {
|
"post": {
|
||||||
"summary": "Simulate cache rules for a request",
|
"summary": "Simulate cache rules for a request",
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ fn reconcile_dashboard_widgets(prefs: &mut AdminPreferences) {
|
|||||||
.any(|widget| widget.id == *id && valid_dashboard_span(&widget.display_type, *span))
|
.any(|widget| widget.id == *id && valid_dashboard_span(&widget.display_type, *span))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if let Some(positions) = prefs.dashboard_widget_positions.as_mut() {
|
||||||
|
positions
|
||||||
|
.items
|
||||||
|
.retain(|id, _| DASHBOARD_WIDGETS.iter().any(|widget| widget.id == *id));
|
||||||
|
}
|
||||||
if let Some(heights) = prefs.dashboard_widget_heights.as_mut() {
|
if let Some(heights) = prefs.dashboard_widget_heights.as_mut() {
|
||||||
heights.retain(|id, rows| {
|
heights.retain(|id, rows| {
|
||||||
valid_dashboard_rows(*rows) && DASHBOARD_WIDGETS.iter().any(|widget| widget.id == *id)
|
valid_dashboard_rows(*rows) && DASHBOARD_WIDGETS.iter().any(|widget| widget.id == *id)
|
||||||
@@ -61,6 +66,25 @@ fn reconcile_dashboard_widgets(prefs: &mut AdminPreferences) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
struct DashboardWidgetPositions {
|
||||||
|
columns: u8,
|
||||||
|
items: std::collections::BTreeMap<String, [u16; 2]>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl DashboardWidgetPositions {
|
||||||
|
fn valid(&self) -> bool {
|
||||||
|
(1..=24).contains(&self.columns)
|
||||||
|
&& self.items.len() <= DASHBOARD_WIDGETS.len()
|
||||||
|
&& self.items.iter().all(|(id, [column, row])| {
|
||||||
|
*column < u16::from(self.columns)
|
||||||
|
&& *row <= 2048
|
||||||
|
&& DASHBOARD_WIDGETS.iter().any(|widget| widget.id == *id)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn default_admin_dashboard_auto_fit() -> bool {
|
fn default_admin_dashboard_auto_fit() -> bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
@@ -156,6 +180,8 @@ struct AdminPreferences {
|
|||||||
sidebar_collapsed: bool,
|
sidebar_collapsed: bool,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
dashboard_widget_heights: Option<std::collections::BTreeMap<String, u8>>,
|
dashboard_widget_heights: Option<std::collections::BTreeMap<String, u8>>,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
dashboard_widget_positions: Option<DashboardWidgetPositions>,
|
||||||
#[serde(default = "default_file_log_columns")]
|
#[serde(default = "default_file_log_columns")]
|
||||||
file_log_columns: Vec<String>,
|
file_log_columns: Vec<String>,
|
||||||
#[serde(default = "default_file_log_sort")]
|
#[serde(default = "default_file_log_sort")]
|
||||||
@@ -217,6 +243,7 @@ impl Default for AdminPreferences {
|
|||||||
dashboard_hidden_widgets: default_hidden_dashboard_widgets(),
|
dashboard_hidden_widgets: default_hidden_dashboard_widgets(),
|
||||||
dashboard_widget_sizes: None,
|
dashboard_widget_sizes: None,
|
||||||
dashboard_widget_heights: None,
|
dashboard_widget_heights: None,
|
||||||
|
dashboard_widget_positions: None,
|
||||||
dashboard_auto_fit: true,
|
dashboard_auto_fit: true,
|
||||||
sidebar_collapsed: false,
|
sidebar_collapsed: false,
|
||||||
file_log_columns: default_file_log_columns(),
|
file_log_columns: default_file_log_columns(),
|
||||||
@@ -434,6 +461,16 @@ fn validate_admin_preferences(preferences: &AdminPreferences) -> Result<(), ApiE
|
|||||||
"invalid Docker dashboard card agent preference".into(),
|
"invalid Docker dashboard card agent preference".into(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
if preferences
|
||||||
|
.dashboard_widget_positions
|
||||||
|
.as_ref()
|
||||||
|
.is_some_and(|positions| !positions.valid())
|
||||||
|
{
|
||||||
|
return Err(ApiError(
|
||||||
|
StatusCode::UNPROCESSABLE_ENTITY,
|
||||||
|
"invalid dashboard card position preference".into(),
|
||||||
|
));
|
||||||
|
}
|
||||||
if !valid_dashboard_heights(&preferences.dashboard_widget_heights) {
|
if !valid_dashboard_heights(&preferences.dashboard_widget_heights) {
|
||||||
return Err(ApiError(
|
return Err(ApiError(
|
||||||
StatusCode::UNPROCESSABLE_ENTITY,
|
StatusCode::UNPROCESSABLE_ENTITY,
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ fn admin_app_javascript() -> &'static str {
|
|||||||
include_str!("web/app/dashboard-inline-layout.js"),
|
include_str!("web/app/dashboard-inline-layout.js"),
|
||||||
include_str!("web/app/stream-dashboard.js"),
|
include_str!("web/app/stream-dashboard.js"),
|
||||||
include_str!("web/app/docker-dashboard.js"),
|
include_str!("web/app/docker-dashboard.js"),
|
||||||
|
include_str!("web/app/alerts.js"),
|
||||||
include_str!("web/app/backend-dashboard.js"),
|
include_str!("web/app/backend-dashboard.js"),
|
||||||
include_str!("web/app/overview-extra-metrics.js"),
|
include_str!("web/app/overview-extra-metrics.js"),
|
||||||
include_str!("web/app/overview-wide-metrics.js"),
|
include_str!("web/app/overview-wide-metrics.js"),
|
||||||
@@ -102,6 +103,7 @@ fn admin_app_javascript() -> &'static str {
|
|||||||
include_str!("web/acme.js"),
|
include_str!("web/acme.js"),
|
||||||
include_str!("web/settings.js"),
|
include_str!("web/settings.js"),
|
||||||
include_str!("web/system-info.js"),
|
include_str!("web/system-info.js"),
|
||||||
|
include_str!("web/tls-configurator.js"),
|
||||||
include_str!("web/certificate-api.js"),
|
include_str!("web/certificate-api.js"),
|
||||||
include_str!("web/api-tokens.js"),
|
include_str!("web/api-tokens.js"),
|
||||||
include_str!("web/prometheus-token.js"),
|
include_str!("web/prometheus-token.js"),
|
||||||
@@ -175,6 +177,7 @@ pub fn router(state: Arc<App>) -> Router {
|
|||||||
.route("/api/status", get(status))
|
.route("/api/status", get(status))
|
||||||
.route("/api/system-info", get(system_info))
|
.route("/api/system-info", get(system_info))
|
||||||
.route("/api/backends", get(backend_status))
|
.route("/api/backends", get(backend_status))
|
||||||
|
.route("/api/alerts", get(alerts_status))
|
||||||
.route("/api/docker", get(docker_status))
|
.route("/api/docker", get(docker_status))
|
||||||
.route("/api/docker/refresh", post(docker_refresh))
|
.route("/api/docker/refresh", post(docker_refresh))
|
||||||
.route("/api/docker/test", post(docker_test))
|
.route("/api/docker/test", post(docker_test))
|
||||||
@@ -252,6 +255,7 @@ pub fn router(state: Arc<App>) -> Router {
|
|||||||
)
|
)
|
||||||
.route("/api/cache/bans", get(cache_bans))
|
.route("/api/cache/bans", get(cache_bans))
|
||||||
.route("/api/cache/rules/stats", get(cache_rules_stats))
|
.route("/api/cache/rules/stats", get(cache_rules_stats))
|
||||||
|
.route("/api/cache/rules/targets", get(cache_rules_targets))
|
||||||
.route(
|
.route(
|
||||||
"/api/cache/rules/test",
|
"/api/cache/rules/test",
|
||||||
post(cache_rules_test).layer(DefaultBodyLimit::max(256 * 1024)),
|
post(cache_rules_test).layer(DefaultBodyLimit::max(256 * 1024)),
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ fn status_payload(state: &App) -> Value {
|
|||||||
&snapshot.envelope.config,
|
&snapshot.envelope.config,
|
||||||
&state.docker.latest()
|
&state.docker.latest()
|
||||||
));
|
));
|
||||||
|
payload["alerts"] = json!(general_alerts(state));
|
||||||
payload["backends"] = json!(snapshot
|
payload["backends"] = json!(snapshot
|
||||||
.envelope
|
.envelope
|
||||||
.config
|
.config
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ fn live_status_payload(state: &App) -> Value {
|
|||||||
"vhost_cache_totals": state.cache.scope_totals(),
|
"vhost_cache_totals": state.cache.scope_totals(),
|
||||||
"streams": {"metrics": stream_metrics},
|
"streams": {"metrics": stream_metrics},
|
||||||
"docker": crate::docker::dashboard_summary(&snapshot.envelope.config, &state.docker.latest()),
|
"docker": crate::docker::dashboard_summary(&snapshot.envelope.config, &state.docker.latest()),
|
||||||
|
"alerts": general_alerts(state),
|
||||||
"logging": {"sinks": state.logs.stats(), "error_file": crate::logging::error_log_stats()}
|
"logging": {"sinks": state.logs.stats(), "error_file": crate::logging::error_log_stats()}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -705,6 +705,7 @@ mod tests {
|
|||||||
"response",
|
"response",
|
||||||
"logging",
|
"logging",
|
||||||
"global-security",
|
"global-security",
|
||||||
|
"alerts",
|
||||||
];
|
];
|
||||||
let mut original = Config::default();
|
let mut original = Config::default();
|
||||||
original.global_security.compile().unwrap();
|
original.global_security.compile().unwrap();
|
||||||
@@ -757,6 +758,7 @@ mod tests {
|
|||||||
"response",
|
"response",
|
||||||
"logging",
|
"logging",
|
||||||
"global-security",
|
"global-security",
|
||||||
|
"alerts",
|
||||||
] {
|
] {
|
||||||
let response = router
|
let response = router
|
||||||
.clone()
|
.clone()
|
||||||
|
|||||||
@@ -78,6 +78,8 @@ window.rustProxyAclPicker = (() => {
|
|||||||
options.addEventListener("change", event => { if (event.target.matches('input[type="checkbox"]')) sync(); });
|
options.addEventListener("change", event => { if (event.target.matches('input[type="checkbox"]')) sync(); });
|
||||||
search.addEventListener("input", syncSearch);
|
search.addEventListener("input", syncSearch);
|
||||||
search.addEventListener("keydown", event => { if (event.key === "Escape") { search.value = ""; syncSearch(); details.open = false; summary.focus(); } });
|
search.addEventListener("keydown", event => { if (event.key === "Escape") { search.value = ""; syncSearch(); details.open = false; summary.focus(); } });
|
||||||
|
root.select = ids => { for (const [id, box] of checks) box.checked = ids.includes(id); sync(); };
|
||||||
|
root.setDisabled = disabled => { root.classList.toggle("is-disabled", disabled); details.open = details.open && !disabled; summary.tabIndex = disabled ? -1 : 0; summary.setAttribute("aria-disabled", String(disabled)); };
|
||||||
syncSearch(); sync(); return root;
|
syncSearch(); sync(); return root;
|
||||||
}
|
}
|
||||||
return { create, read: chosenIds, count: root => chosenIds(root).length };
|
return { create, read: chosenIds, count: root => chosenIds(root).length };
|
||||||
@@ -103,7 +105,7 @@ window.rustProxyChoicePicker = (() => {
|
|||||||
const row = el("label", undefined, "acl-picker-option"), check = el("input"); check.type = "checkbox"; check.value = item.id; check.checked = !!checked;
|
const row = el("label", undefined, "acl-picker-option"), check = el("input"); check.type = "checkbox"; check.value = item.id; check.checked = !!checked;
|
||||||
const content = el("span", undefined, "acl-picker-option-content"), headingRow = el("span", undefined, "acl-picker-option-heading");
|
const content = el("span", undefined, "acl-picker-option-content"), headingRow = el("span", undefined, "acl-picker-option-heading");
|
||||||
headingRow.append(el("strong", item.title || item.id));
|
headingRow.append(el("strong", item.title || item.id));
|
||||||
if (item.title && item.title !== item.id) headingRow.append(el("code", item.id, "acl-picker-id"));
|
if (item.title && item.title !== item.id && !item.title.startsWith(`${item.id} `)) headingRow.append(el("code", item.id, "acl-picker-id"));
|
||||||
if (item.badge) headingRow.append(el("span", item.badge, `acl-picker-policy ${item.badgeClass || "is-none"}`));
|
if (item.badge) headingRow.append(el("span", item.badge, `acl-picker-policy ${item.badgeClass || "is-none"}`));
|
||||||
content.append(headingRow); if (item.detail) content.append(el("small", item.detail, "acl-picker-rule-preview"));
|
content.append(headingRow); if (item.detail) content.append(el("small", item.detail, "acl-picker-rule-preview"));
|
||||||
row.append(check, content); row.dataset.search = `${item.id} ${item.title || ""} ${item.search || ""} ${item.detail || ""}`.toLocaleLowerCase();
|
row.append(check, content); row.dataset.search = `${item.id} ${item.title || ""} ${item.search || ""} ${item.detail || ""}`.toLocaleLowerCase();
|
||||||
@@ -240,3 +242,42 @@ window.rustProxyCountryPicker = (() => {
|
|||||||
}
|
}
|
||||||
return { attach, codes: CODES, nameOf };
|
return { attach, codes: CODES, nameOf };
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
window.rustProxyMethodPicker = (() => {
|
||||||
|
const METHODS = [
|
||||||
|
["GET", "methodGet"], ["HEAD", "methodHead"], ["POST", "methodPost"], ["PUT", "methodPut"], ["PATCH", "methodPatch"], ["DELETE", "methodDelete"],
|
||||||
|
["OPTIONS", "methodOptions"], ["CONNECT", "methodConnect"], ["TRACE", "methodTrace"], ["TRACK", "methodTrack"], ["PURGE", "methodPurge"], ["BAN", "methodBan"],
|
||||||
|
["PROPFIND", "methodWebdav"], ["PROPPATCH", "methodWebdav"], ["MKCOL", "methodWebdav"], ["COPY", "methodWebdav"], ["MOVE", "methodWebdav"], ["LOCK", "methodWebdav"], ["UNLOCK", "methodWebdav"],
|
||||||
|
["SEARCH", "methodWebdav"], ["REPORT", "methodWebdav"], ["MKCALENDAR", "methodWebdav"],
|
||||||
|
];
|
||||||
|
const TOKEN = /^[A-Z0-9!#$%&'*+.^_`|~-]{1,32}$/;
|
||||||
|
const parse = text => [...new Set(String(text || "").split(/[\s,;]+/).map(value => value.trim().toUpperCase()).filter(Boolean))];
|
||||||
|
function attach(textarea) {
|
||||||
|
if (!textarea || textarea.dataset.methodPicker) return null;
|
||||||
|
textarea.dataset.methodPicker = "1"; textarea.hidden = true;
|
||||||
|
const wrapper = textarea.parentElement;
|
||||||
|
if (wrapper?.tagName === "LABEL") { const box = el("div", undefined, wrapper.className); box.append(...wrapper.childNodes); wrapper.replaceWith(box); }
|
||||||
|
const host = el("div", undefined, "method-picker-host"); textarea.after(host);
|
||||||
|
let picker = null, writing = false;
|
||||||
|
const build = () => {
|
||||||
|
picker = window.rustProxyChoicePicker.create({
|
||||||
|
className: "method-picker", selected: parse(textarea.value), limit: 64, unknownDetail: "methodCustom",
|
||||||
|
items: METHODS.map(([id, key]) => ({ id, title: id, detail: t(key) })),
|
||||||
|
labels: { choose: "methodPickerChoose", selected: "methodPickerSelected", none: "methodPickerNone", search: "methodPickerSearch", addHint: "methodPickerAddHint", empty: "methodPickerEmpty" },
|
||||||
|
custom: raw => {
|
||||||
|
const id = String(raw || "").trim().toUpperCase(); if (!id) return null;
|
||||||
|
if (!TOKEN.test(id)) throw new Error(t("methodPickerInvalid").replace("{value}", raw));
|
||||||
|
return { id, title: id, detail: t("methodCustom") };
|
||||||
|
},
|
||||||
|
});
|
||||||
|
picker.addEventListener("choicechange", event => { if (writing) return; const value = (event.detail || []).join("\n"); if (value === textarea.value) return; textarea.value = value; textarea.dispatchEvent(new Event("input", { bubbles: true })); textarea.dispatchEvent(new Event("change", { bubbles: true })); });
|
||||||
|
host.replaceChildren(picker);
|
||||||
|
picker.setDisabled(textarea.disabled);
|
||||||
|
};
|
||||||
|
const refresh = () => { writing = true; try { build(); } finally { writing = false; } };
|
||||||
|
refresh();
|
||||||
|
new MutationObserver(() => picker?.setDisabled(textarea.disabled)).observe(textarea, { attributes: true, attributeFilter: ["disabled"] });
|
||||||
|
return { refresh, host };
|
||||||
|
}
|
||||||
|
return { attach, methods: METHODS.map(([id]) => id) };
|
||||||
|
})();
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
window.rustProxyAlerts = (() => {
|
||||||
|
const KEYS = {
|
||||||
|
certificate_expired: "alertCertificateExpired",
|
||||||
|
certificate_expiring: "alertCertificateExpiring",
|
||||||
|
certificate_renewal_failed: "alertCertificateRenewalFailed",
|
||||||
|
acme_runtime: "alertAcmeRuntime",
|
||||||
|
file_descriptors_high: "alertFileDescriptorsHigh",
|
||||||
|
geoip_missing: "alertGeoipMissing",
|
||||||
|
prometheus_exposed: "alertPrometheusExposed",
|
||||||
|
update_available: "alertUpdateAvailable",
|
||||||
|
};
|
||||||
|
const LINKS = {
|
||||||
|
certificate_expired: "/tls", certificate_expiring: "/tls", certificate_renewal_failed: "/tls",
|
||||||
|
acme_runtime: "/settings?tab=system-info", file_descriptors_high: "/settings?tab=system-info", geoip_missing: "/settings?tab=geoip",
|
||||||
|
prometheus_exposed: "/settings?tab=prometheus", update_available: "/settings?tab=alerts",
|
||||||
|
};
|
||||||
|
function text(alert) {
|
||||||
|
const key = KEYS[alert.kind];
|
||||||
|
if (!key) return `${alert.kind}: ${alert.subject || ""}`;
|
||||||
|
return t(key).replace("{subject}", alert.subject || "-").replace("{value}", alert.value ?? "-").replace("{threshold}", alert.threshold ?? "-").replace("{message}", alert.message || "-");
|
||||||
|
}
|
||||||
|
const list = status => Array.isArray(status?.alerts) ? status.alerts : null;
|
||||||
|
function check(status) {
|
||||||
|
const alerts = list(status);
|
||||||
|
if (!alerts) return null;
|
||||||
|
const important = alerts.filter(alert => alert.severity !== "info");
|
||||||
|
const extra = details(status);
|
||||||
|
if (!important.length) return { level: "ok", label: t("appHealthAlerts"), detail: t("appHealthAlertsNone"), extra };
|
||||||
|
return { level: important.some(alert => alert.severity === "error") ? "error" : "warning", label: t("appHealthAlerts"), detail: t("alertsTitle").replace("{count}", important.length), extra };
|
||||||
|
}
|
||||||
|
let seen = null;
|
||||||
|
function notify(status) {
|
||||||
|
const alerts = list(status);
|
||||||
|
if (!alerts) return;
|
||||||
|
if (envelope?.config?.alerts?.notifications === false) { seen = new Set(alerts.map(alert => alert.key)); return; }
|
||||||
|
const keys = new Set(alerts.map(alert => alert.key));
|
||||||
|
if (seen === null) {
|
||||||
|
seen = keys;
|
||||||
|
const important = alerts.filter(alert => alert.severity !== "info");
|
||||||
|
if (important.length) toast(t("alertsTitle").replace("{count}", important.length), important.some(alert => alert.severity === "error"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (const alert of alerts) if (!seen.has(alert.key) && alert.severity !== "info") toast(text(alert), alert.severity === "error");
|
||||||
|
seen = keys;
|
||||||
|
}
|
||||||
|
function details(status) {
|
||||||
|
const alerts = list(status) || [];
|
||||||
|
if (!alerts.length) return null;
|
||||||
|
const box = el("ul", undefined, "app-alert-list");
|
||||||
|
for (const alert of alerts) {
|
||||||
|
const item = el("li", undefined, `is-${alert.severity}`);
|
||||||
|
item.append(el("span", alert.severity === "error" ? "●" : alert.severity === "info" ? "i" : "▲", "app-alert-icon"), el("span", text(alert)));
|
||||||
|
const link = LINKS[alert.kind];
|
||||||
|
if (link) { const anchor = el("a", t("alertOpen")); anchor.href = link; item.append(anchor); }
|
||||||
|
box.append(item);
|
||||||
|
}
|
||||||
|
return box;
|
||||||
|
}
|
||||||
|
return { text, check, notify, details, reset() { seen = null; } };
|
||||||
|
})();
|
||||||
@@ -216,6 +216,7 @@ function appHealthChecks(status) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const dockerCheck = window.rustProxyDockerDashboard?.healthCheck?.(status); if (dockerCheck) checks.push(dockerCheck);
|
const dockerCheck = window.rustProxyDockerDashboard?.healthCheck?.(status); if (dockerCheck) checks.push(dockerCheck);
|
||||||
|
const alertsCheck = window.rustProxyAlerts?.check?.(status); if (alertsCheck) checks.push(alertsCheck);
|
||||||
const sink = status.logging?.sinks || {}, errorFile = status.logging?.error_file || {};
|
const sink = status.logging?.sinks || {}, errorFile = status.logging?.error_file || {};
|
||||||
const loggingDropped = (Number(sink.queue_dropped) || 0) + (Number(errorFile.queue_dropped) || 0);
|
const loggingDropped = (Number(sink.queue_dropped) || 0) + (Number(errorFile.queue_dropped) || 0);
|
||||||
const loggingErrors = (Number(sink.errors) || 0) + (Number(errorFile.errors) || 0);
|
const loggingErrors = (Number(sink.errors) || 0) + (Number(errorFile.errors) || 0);
|
||||||
@@ -250,7 +251,7 @@ function renderAppHealth(status = latestStatus) {
|
|||||||
const list = $("app-health-checks");
|
const list = $("app-health-checks");
|
||||||
if (list) list.replaceChildren(...checks.map(check => {
|
if (list) list.replaceChildren(...checks.map(check => {
|
||||||
const row = el("div", undefined, `app-health-check is-${check.level}`), dot = el("i"), copy = el("div");
|
const row = el("div", undefined, `app-health-check is-${check.level}`), dot = el("i"), copy = el("div");
|
||||||
dot.setAttribute("aria-hidden", "true"); copy.append(el("strong", check.label), el("p", check.detail, "fine")); row.append(dot, copy); return row;
|
dot.setAttribute("aria-hidden", "true"); copy.append(el("strong", check.label), el("p", check.detail, "fine")); if (check.extra) copy.append(check.extra); row.append(dot, copy); return row;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
function enhanceEnabledControl(input, hintKey = "entityEnableHint") {
|
function enhanceEnabledControl(input, hintKey = "entityEnableHint") {
|
||||||
@@ -313,7 +314,15 @@ window.rustProxyOverviewSamples.onChange(() => {
|
|||||||
|
|
||||||
const nativeScrollAnchoring = typeof CSS !== "undefined" && CSS.supports?.("overflow-anchor", "auto");
|
const nativeScrollAnchoring = typeof CSS !== "undefined" && CSS.supports?.("overflow-anchor", "auto");
|
||||||
function preserveScrollAnchor(render) {
|
function preserveScrollAnchor(render) {
|
||||||
if (nativeScrollAnchoring || window.scrollY <= 0) return render();
|
if (window.scrollY <= 0) return render();
|
||||||
|
if (nativeScrollAnchoring) {
|
||||||
|
const scroller = document.scrollingElement || document.documentElement, before = window.scrollY, height = scroller.scrollHeight;
|
||||||
|
scroller.style.minHeight = `${height}px`;
|
||||||
|
let result;
|
||||||
|
try { result = render(); } finally { requestAnimationFrame(() => { scroller.style.minHeight = ""; }); }
|
||||||
|
if (window.scrollY < before - 1 && scroller.scrollHeight - window.innerHeight >= before - 1) window.scrollTo(window.scrollX, before);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
const probe = document.elementFromPoint(window.innerWidth / 2, window.innerHeight / 2);
|
const probe = document.elementFromPoint(window.innerWidth / 2, window.innerHeight / 2);
|
||||||
const anchor = probe?.closest?.("article, tr, .mini-live-chart, .network-interface-row") || probe;
|
const anchor = probe?.closest?.("article, tr, .mini-live-chart, .network-interface-row") || probe;
|
||||||
const before = anchor?.isConnected ? anchor.getBoundingClientRect().top : null;
|
const before = anchor?.isConnected ? anchor.getBoundingClientRect().top : null;
|
||||||
@@ -371,7 +380,7 @@ function renderStatusNow(s, systemSample = false) {
|
|||||||
$("metric-ws-proto-h1").textContent = (Number(m.websocket_h1_active) || 0).toLocaleString(locale());
|
$("metric-ws-proto-h1").textContent = (Number(m.websocket_h1_active) || 0).toLocaleString(locale());
|
||||||
$("metric-ws-proto-h2").textContent = (Number(m.websocket_h2_active) || 0).toLocaleString(locale());
|
$("metric-ws-proto-h2").textContent = (Number(m.websocket_h2_active) || 0).toLocaleString(locale());
|
||||||
$("metric-ws-proto-h3").textContent = (Number(m.websocket_h3_active) || 0).toLocaleString(locale());
|
$("metric-ws-proto-h3").textContent = (Number(m.websocket_h3_active) || 0).toLocaleString(locale());
|
||||||
renderFooter(s); renderDiagnostics(s, true, systemSample); window.rustProxyVhosts?.renderStatus(s); window.rustProxyDocker?.renderStatus(s); window.rustProxyStreams?.renderStatus(s); window.rustProxyStreamDashboard?.render(s); window.rustProxyDockerDashboard?.render(s); window.rustProxyDockerDashboard?.notify?.(s); window.rustProxyBackendDashboard?.render(s); window.rustProxyExtraOverview?.render(s); window.rustProxyWideOverview?.render(s); window.rustProxyWebOverview?.render(s); window.rustProxyWebServer?.renderLive?.(s);
|
renderFooter(s); renderDiagnostics(s, true, systemSample); window.rustProxyVhosts?.renderStatus(s); window.rustProxyDocker?.renderStatus(s); window.rustProxyStreams?.renderStatus(s); window.rustProxyStreamDashboard?.render(s); window.rustProxyDockerDashboard?.render(s); window.rustProxyDockerDashboard?.notify?.(s); window.rustProxyAlerts?.notify?.(s); window.rustProxyBackendDashboard?.render(s); window.rustProxyExtraOverview?.render(s); window.rustProxyWideOverview?.render(s); window.rustProxyWebOverview?.render(s); window.rustProxyWebServer?.renderLive?.(s);
|
||||||
}
|
}
|
||||||
function renderFooter(s) {
|
function renderFooter(s) {
|
||||||
const apiLatency = lastApiLatencyMs == null ? "API -" : `API ${lastApiLatencyMs.toFixed(lastApiLatencyMs < 10 ? 1 : 0)} ms`;
|
const apiLatency = lastApiLatencyMs == null ? "API -" : `API ${lastApiLatencyMs.toFixed(lastApiLatencyMs < 10 ? 1 : 0)} ms`;
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
const modalButton = $("overview-layout-open");
|
const modalButton = $("overview-layout-open");
|
||||||
const compactButton = $("overview-inline-compact");
|
const compactButton = $("overview-inline-compact");
|
||||||
const autoFitToggle = $("overview-inline-autofit");
|
const autoFitToggle = $("overview-inline-autofit");
|
||||||
|
const manualToggle = $("overview-inline-manual");
|
||||||
|
let manual = false;
|
||||||
let draft = null;
|
let draft = null;
|
||||||
let original = null;
|
let original = null;
|
||||||
let opening = false;
|
let opening = false;
|
||||||
@@ -31,7 +33,16 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
|| [...draft.hidden].some(id => !original.hidden.has(id)) || [...original.hidden].some(id => !draft.hidden.has(id))
|
|| [...draft.hidden].some(id => !original.hidden.has(id)) || [...original.hidden].some(id => !draft.hidden.has(id))
|
||||||
|| JSON.stringify(draft.sizes) !== JSON.stringify(original.sizes)
|
|| JSON.stringify(draft.sizes) !== JSON.stringify(original.sizes)
|
||||||
|| JSON.stringify(normalizeDashboardWidgetHeights(draft.heights)) !== JSON.stringify(normalizeDashboardWidgetHeights(original.heights))
|
|| JSON.stringify(normalizeDashboardWidgetHeights(draft.heights)) !== JSON.stringify(normalizeDashboardWidgetHeights(original.heights))
|
||||||
|| draft.autoFit !== original.autoFit);
|
|| draft.autoFit !== original.autoFit
|
||||||
|
|| JSON.stringify(cleanPositions(draft.positions)) !== JSON.stringify(cleanPositions(original.positions)));
|
||||||
|
const rows = () => window.rustProxyOverviewRows;
|
||||||
|
function cleanPositions(value) { return value ? normalizeDashboardWidgetPositions({ columns: value.columns, items: value.items }) : null; }
|
||||||
|
function capturePositions() {
|
||||||
|
if (!draft || !manual) return;
|
||||||
|
const captured = rows()?.currentPositions?.();
|
||||||
|
if (captured) { draft.positions = { columns: captured.columns, items: captured.items }; rows()?.setPositions?.(draft.positions); }
|
||||||
|
}
|
||||||
|
function settlePositions() { requestAnimationFrame(() => requestAnimationFrame(() => { rows()?.flush?.(); capturePositions(); })); }
|
||||||
|
|
||||||
function renderHidden() {
|
function renderHidden() {
|
||||||
if (!hiddenList || !draft) return;
|
if (!hiddenList || !draft) return;
|
||||||
@@ -58,7 +69,9 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
function hide(id) {
|
function hide(id) {
|
||||||
if (!draft || !visibleIds().includes(id)) return;
|
if (!draft || !visibleIds().includes(id)) return;
|
||||||
draft.hidden.add(id);
|
draft.hidden.add(id);
|
||||||
|
if (draft.positions?.items) delete draft.positions.items[id];
|
||||||
paint();
|
paint();
|
||||||
|
if (manual) settlePositions();
|
||||||
if (hiddenShelf) { hiddenShelf.open = true; hiddenShelf.querySelector("summary")?.focus(); }
|
if (hiddenShelf) { hiddenShelf.open = true; hiddenShelf.querySelector("summary")?.focus(); }
|
||||||
}
|
}
|
||||||
function paint() {
|
function paint() {
|
||||||
@@ -125,6 +138,7 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
if (next === dashboardDefaultWidth(id)) delete draft.sizes[id];
|
if (next === dashboardDefaultWidth(id)) delete draft.sizes[id];
|
||||||
else draft.sizes[id] = next;
|
else draft.sizes[id] = next;
|
||||||
paint();
|
paint();
|
||||||
|
if (manual) settlePositions();
|
||||||
nodeFor(id)?.querySelector(delta < 0 ? ".overview-inline-narrow" : ".overview-inline-widen")?.focus();
|
nodeFor(id)?.querySelector(delta < 0 ? ".overview-inline-narrow" : ".overview-inline-widen")?.focus();
|
||||||
}
|
}
|
||||||
function resizeHeight(id, delta) {
|
function resizeHeight(id, delta) {
|
||||||
@@ -137,6 +151,7 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
if (next <= rows.min) delete draft.heights[id];
|
if (next <= rows.min) delete draft.heights[id];
|
||||||
else draft.heights[id] = Math.min(DASHBOARD_MAX_ROWS, next);
|
else draft.heights[id] = Math.min(DASHBOARD_MAX_ROWS, next);
|
||||||
paint();
|
paint();
|
||||||
|
if (manual) settlePositions();
|
||||||
nodeFor(id)?.querySelector(delta < 0 ? ".overview-inline-lower" : ".overview-inline-taller")?.focus();
|
nodeFor(id)?.querySelector(delta < 0 ? ".overview-inline-lower" : ".overview-inline-taller")?.focus();
|
||||||
}
|
}
|
||||||
function nudge(id, delta) {
|
function nudge(id, delta) {
|
||||||
@@ -195,6 +210,10 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
if (compactButton) compactButton.title = t("overviewLayoutInlineCompactHint");
|
if (compactButton) compactButton.title = t("overviewLayoutInlineCompactHint");
|
||||||
const autoFitLabel = $("overview-inline-autofit-label");
|
const autoFitLabel = $("overview-inline-autofit-label");
|
||||||
if (autoFitLabel) autoFitLabel.title = t("overviewLayoutAutoFitHint");
|
if (autoFitLabel) autoFitLabel.title = t("overviewLayoutAutoFitHint");
|
||||||
|
const manualLabel = $("overview-inline-manual-label");
|
||||||
|
if (manualLabel) manualLabel.title = t("overviewLayoutManualHint");
|
||||||
|
if (manualToggle) manualToggle.checked = manual;
|
||||||
|
syncManual();
|
||||||
if (hiddenShelf) { hiddenShelf.hidden = false; hiddenShelf.open = false; }
|
if (hiddenShelf) { hiddenShelf.hidden = false; hiddenShelf.open = false; }
|
||||||
if (modalButton) modalButton.disabled = true;
|
if (modalButton) modalButton.disabled = true;
|
||||||
for (const node of nodes()) toolbar(node);
|
for (const node of nodes()) toolbar(node);
|
||||||
@@ -203,7 +222,7 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
function finish(preserveSaved = false) {
|
function finish(preserveSaved = false) {
|
||||||
clearDrag();
|
clearDrag();
|
||||||
for (const node of nodes()) node.querySelector(".overview-inline-toolbar")?.remove();
|
for (const node of nodes()) node.querySelector(".overview-inline-toolbar")?.remove();
|
||||||
grid.classList.remove("is-unlocked");
|
grid.classList.remove("is-unlocked", "is-manual-layout");
|
||||||
unlock.setAttribute("aria-pressed", "false");
|
unlock.setAttribute("aria-pressed", "false");
|
||||||
unlock.dataset.i18n = "overviewLayoutUnlock";
|
unlock.dataset.i18n = "overviewLayoutUnlock";
|
||||||
unlock.textContent = t("overviewLayoutUnlock");
|
unlock.textContent = t("overviewLayoutUnlock");
|
||||||
@@ -215,6 +234,7 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
if (modalButton) modalButton.disabled = false;
|
if (modalButton) modalButton.disabled = false;
|
||||||
if (!preserveSaved && original) {
|
if (!preserveSaved && original) {
|
||||||
window.rustProxyOverviewRows?.setAutoFit?.(original.autoFit);
|
window.rustProxyOverviewRows?.setAutoFit?.(original.autoFit);
|
||||||
|
window.rustProxyOverviewRows?.setPositions?.(original.positions);
|
||||||
applyDashboardLayout(original.order, [...original.hidden], original.sizes, original.heights);
|
applyDashboardLayout(original.order, [...original.hidden], original.sizes, original.heights);
|
||||||
}
|
}
|
||||||
draft = original = null;
|
draft = original = null;
|
||||||
@@ -233,7 +253,10 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
const heights = normalizeDashboardWidgetHeights(saved.dashboard_widget_heights);
|
const heights = normalizeDashboardWidgetHeights(saved.dashboard_widget_heights);
|
||||||
const autoFit = saved.dashboard_auto_fit !== false;
|
const autoFit = saved.dashboard_auto_fit !== false;
|
||||||
original = { order: [...order], hidden: new Set(hidden), sizes: sizes === null ? null : { ...sizes }, heights: heights ? { ...heights } : null, autoFit };
|
original = { order: [...order], hidden: new Set(hidden), sizes: sizes === null ? null : { ...sizes }, heights: heights ? { ...heights } : null, autoFit };
|
||||||
draft = { order: [...order], hidden: new Set(hidden), sizes: sizes === null ? null : { ...sizes }, heights: heights ? { ...heights } : null, autoFit };
|
const positions = normalizeDashboardWidgetPositions(saved.dashboard_widget_positions);
|
||||||
|
original.positions = positions ? structuredClone(positions) : null;
|
||||||
|
draft = { order: [...order], hidden: new Set(hidden), sizes: sizes === null ? null : { ...sizes }, heights: heights ? { ...heights } : null, autoFit, positions: positions ? structuredClone(positions) : null };
|
||||||
|
manual = !!positions;
|
||||||
if (autoFitToggle) autoFitToggle.checked = autoFit;
|
if (autoFitToggle) autoFitToggle.checked = autoFit;
|
||||||
showEditing();
|
showEditing();
|
||||||
} catch (error) { if (error?.status !== 401) toast(error.message, true); }
|
} catch (error) { if (error?.status !== 401) toast(error.message, true); }
|
||||||
@@ -250,6 +273,7 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
dashboard_widget_sizes: draft.sizes === null ? null : { ...draft.sizes },
|
dashboard_widget_sizes: draft.sizes === null ? null : { ...draft.sizes },
|
||||||
dashboard_widget_heights: normalizeDashboardWidgetHeights(draft.heights),
|
dashboard_widget_heights: normalizeDashboardWidgetHeights(draft.heights),
|
||||||
dashboard_auto_fit: draft.autoFit !== false,
|
dashboard_auto_fit: draft.autoFit !== false,
|
||||||
|
dashboard_widget_positions: manual ? cleanPositions(draft.positions) : null,
|
||||||
});
|
});
|
||||||
finish(true);
|
finish(true);
|
||||||
toast(t("overviewLayoutEditorSaved"));
|
toast(t("overviewLayoutEditorSaved"));
|
||||||
@@ -294,8 +318,25 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
if (last && y > last.getBoundingClientRect().bottom) return { node: last, after: true };
|
if (last && y > last.getBoundingClientRect().bottom) return { node: last, after: true };
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
function clearMarker(drag) {
|
||||||
|
drag?.marker?.node.classList.remove("is-drop-before", "is-drop-after");
|
||||||
|
if (drag) drag.marker = null;
|
||||||
|
}
|
||||||
function updatePlaceholder(x, y) {
|
function updatePlaceholder(x, y) {
|
||||||
const drag = pointerDrag;
|
const drag = pointerDrag;
|
||||||
|
if (manual) {
|
||||||
|
const cell = rows()?.cellAt?.(x - drag.offsetX, y - drag.offsetY);
|
||||||
|
if (!cell) return;
|
||||||
|
const span = Math.min(cell.columns, Number(drag.node.dataset.dashboardFit || drag.node.dataset.dashboardSpan) || dashboardWidgetWidth(drag.node.dataset.dashboardWidget, draft.sizes) || 1);
|
||||||
|
const column = Math.max(0, Math.min(cell.columns - span, cell.column));
|
||||||
|
drag.cell = { column, row: cell.row };
|
||||||
|
const box = rows()?.cellBox?.(column, cell.row, span, Number(drag.node.dataset.dashboardRows) || 1);
|
||||||
|
if (!box) return;
|
||||||
|
if (!drag.ghost) { drag.ghost = el("div", undefined, "overview-drop-ghost"); document.body.append(drag.ghost); }
|
||||||
|
const zoom = drag.zoom || 1;
|
||||||
|
Object.assign(drag.ghost.style, { left: `${box.left / zoom}px`, top: `${box.top / zoom}px`, width: `${box.width / zoom}px`, height: `${Math.max(box.height, 24) / zoom}px` });
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (performance.now() < drag.cooldownUntil) return;
|
if (performance.now() < drag.cooldownUntil) return;
|
||||||
const target = placeholderTarget(x, y);
|
const target = placeholderTarget(x, y);
|
||||||
if (!target) return;
|
if (!target) return;
|
||||||
@@ -322,10 +363,10 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
}
|
}
|
||||||
drag.frame = requestAnimationFrame(autoScroll);
|
drag.frame = requestAnimationFrame(autoScroll);
|
||||||
}
|
}
|
||||||
|
const bodyZoom = () => parseFloat(getComputedStyle(document.body).zoom) || 1;
|
||||||
function liftBlock() {
|
function liftBlock() {
|
||||||
const drag = pointerDrag;
|
const drag = pointerDrag;
|
||||||
enterFreeLayout();
|
if (!manual) { enterFreeLayout(); paint(); }
|
||||||
paint();
|
|
||||||
const rect = drag.node.getBoundingClientRect();
|
const rect = drag.node.getBoundingClientRect();
|
||||||
const placeholder = el("div", undefined, "overview-drop-placeholder");
|
const placeholder = el("div", undefined, "overview-drop-placeholder");
|
||||||
placeholder.dataset.dashboardSpan = drag.node.dataset.dashboardSpan || "2";
|
placeholder.dataset.dashboardSpan = drag.node.dataset.dashboardSpan || "2";
|
||||||
@@ -340,20 +381,24 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
drag.height = rect.height;
|
drag.height = rect.height;
|
||||||
drag.active = true;
|
drag.active = true;
|
||||||
drag.cooldownUntil = 0;
|
drag.cooldownUntil = 0;
|
||||||
grid.insertBefore(placeholder, drag.node);
|
drag.startRect = { left: rect.left, top: rect.top };
|
||||||
grid.classList.add("is-overview-sorting");
|
if (manual) grid.classList.add("is-manual-dragging");
|
||||||
|
else { grid.insertBefore(placeholder, drag.node); grid.classList.add("is-overview-sorting"); }
|
||||||
drag.node.classList.add("is-overview-lifted");
|
drag.node.classList.add("is-overview-lifted");
|
||||||
|
drag.zoom = bodyZoom();
|
||||||
Object.assign(drag.node.style, {
|
Object.assign(drag.node.style, {
|
||||||
position: "fixed", left: "0px", top: "0px", width: `${rect.width}px`, height: `${rect.height}px`,
|
position: "fixed", left: "0px", top: "0px", width: `${rect.width / drag.zoom}px`, height: `${rect.height / drag.zoom}px`,
|
||||||
zIndex: "60", pointerEvents: "none", margin: "0",
|
zIndex: "60", pointerEvents: "none", margin: "0",
|
||||||
});
|
});
|
||||||
moveLifted();
|
moveLifted();
|
||||||
|
hint.style.minHeight = `${hint.getBoundingClientRect().height / (parseFloat(getComputedStyle(document.body).zoom) || 1)}px`;
|
||||||
hint.textContent = t("overviewLayoutInlineDragging");
|
hint.textContent = t("overviewLayoutInlineDragging");
|
||||||
drag.frame = requestAnimationFrame(autoScroll);
|
drag.frame = requestAnimationFrame(autoScroll);
|
||||||
}
|
}
|
||||||
function moveLifted() {
|
function moveLifted() {
|
||||||
const drag = pointerDrag;
|
const drag = pointerDrag;
|
||||||
drag.node.style.transform = `translate(${drag.x - drag.offsetX}px, ${drag.y - drag.offsetY}px) rotate(.6deg) scale(1.015)`;
|
const zoom = drag.zoom || 1, x = (drag.x - drag.offsetX) / zoom, y = (drag.y - drag.offsetY) / zoom;
|
||||||
|
drag.node.style.transform = manual ? `translate(${x}px, ${y}px)` : `translate(${x}px, ${y}px) rotate(.6deg) scale(1.015)`;
|
||||||
}
|
}
|
||||||
function settle(commit) {
|
function settle(commit) {
|
||||||
const drag = pointerDrag;
|
const drag = pointerDrag;
|
||||||
@@ -367,8 +412,28 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
cancelAnimationFrame(drag.frame);
|
cancelAnimationFrame(drag.frame);
|
||||||
for (const key of ["position", "left", "top", "width", "height", "zIndex", "pointerEvents", "margin", "transform"]) drag.node.style[key] = "";
|
for (const key of ["position", "left", "top", "width", "height", "zIndex", "pointerEvents", "margin", "transform"]) drag.node.style[key] = "";
|
||||||
drag.node.classList.remove("is-overview-lifted");
|
drag.node.classList.remove("is-overview-lifted");
|
||||||
grid.classList.remove("is-overview-sorting");
|
grid.classList.remove("is-overview-sorting", "is-manual-dragging");
|
||||||
if (commit) drag.placeholder.replaceWith(drag.node);
|
requestAnimationFrame(() => { hint.style.minHeight = ""; });
|
||||||
|
clearMarker(drag); drag.ghost?.remove();
|
||||||
|
if (manual) {
|
||||||
|
if (commit && drag.cell && draft.positions) {
|
||||||
|
draft.positions = { columns: draft.positions.columns, items: { ...draft.positions.items, [drag.node.dataset.dashboardWidget]: [drag.cell.column, drag.cell.row] }, first: drag.node.dataset.dashboardWidget };
|
||||||
|
rows()?.setPositions?.(draft.positions);
|
||||||
|
settlePositions();
|
||||||
|
}
|
||||||
|
hint.textContent = t("overviewLayoutInlineHint");
|
||||||
|
paint();
|
||||||
|
drag.node.querySelector(".overview-inline-grip")?.focus({ preventScroll: true });
|
||||||
|
drag.node.animate?.([{ boxShadow: "0 0 0 3px var(--accent)" }, { boxShadow: "0 0 0 0 transparent" }], { duration: 450 });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (commit && manual && drag.cell && draft.positions) {
|
||||||
|
drag.placeholder.replaceWith(drag.node);
|
||||||
|
draft.positions = { columns: draft.positions.columns, items: { ...draft.positions.items, [drag.node.dataset.dashboardWidget]: [drag.cell.column, drag.cell.row] }, first: drag.node.dataset.dashboardWidget };
|
||||||
|
rows()?.setPositions?.(draft.positions);
|
||||||
|
settlePositions();
|
||||||
|
}
|
||||||
|
else if (commit) drag.placeholder.replaceWith(drag.node);
|
||||||
else { drag.placeholder.remove(); grid.insertBefore(drag.node, drag.origin?.parentNode === grid ? drag.origin : null); }
|
else { drag.placeholder.remove(); grid.insertBefore(drag.node, drag.origin?.parentNode === grid ? drag.origin : null); }
|
||||||
hint.textContent = t("overviewLayoutInlineHint");
|
hint.textContent = t("overviewLayoutInlineHint");
|
||||||
if (commit) {
|
if (commit) {
|
||||||
@@ -432,6 +497,24 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
compactButton?.addEventListener("click", compact);
|
compactButton?.addEventListener("click", compact);
|
||||||
|
function syncManual() {
|
||||||
|
grid?.classList.toggle("is-manual-layout", manual);
|
||||||
|
if (autoFitToggle) autoFitToggle.disabled = manual;
|
||||||
|
if (compactButton) compactButton.disabled = manual;
|
||||||
|
if (!draft) return;
|
||||||
|
if (manual) {
|
||||||
|
draft.autoFit = false; if (autoFitToggle) autoFitToggle.checked = false;
|
||||||
|
rows()?.setAutoFit?.(false);
|
||||||
|
if (!draft.positions) { enterFreeLayout(); paint(); rows()?.flush?.(); const captured = rows()?.currentPositions?.(); draft.positions = captured ? { columns: captured.columns, items: captured.items } : null; }
|
||||||
|
rows()?.setPositions?.(draft.positions);
|
||||||
|
} else {
|
||||||
|
draft.positions = null;
|
||||||
|
rows()?.setPositions?.(null);
|
||||||
|
rows()?.setAutoFit?.(draft.autoFit !== false);
|
||||||
|
}
|
||||||
|
paint();
|
||||||
|
}
|
||||||
|
manualToggle?.addEventListener("change", () => { manual = manualToggle.checked; syncManual(); });
|
||||||
autoFitToggle?.addEventListener("change", () => {
|
autoFitToggle?.addEventListener("change", () => {
|
||||||
if (!draft) return;
|
if (!draft) return;
|
||||||
draft.autoFit = autoFitToggle.checked;
|
draft.autoFit = autoFitToggle.checked;
|
||||||
@@ -448,6 +531,7 @@ window.rustProxyInlineLayout = (() => {
|
|||||||
sizes: draft.sizes === null ? null : { ...draft.sizes },
|
sizes: draft.sizes === null ? null : { ...draft.sizes },
|
||||||
heights: draft.heights ? { ...draft.heights } : null,
|
heights: draft.heights ? { ...draft.heights } : null,
|
||||||
autoFit: draft.autoFit !== false,
|
autoFit: draft.autoFit !== false,
|
||||||
|
positions: manual && draft.positions ? structuredClone(draft.positions) : null,
|
||||||
} : null,
|
} : null,
|
||||||
cancel,
|
cancel,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ const UI_PANEL_ICONS = Object.freeze({
|
|||||||
const UI_SETTINGS_TAB_ICONS = Object.freeze({
|
const UI_SETTINGS_TAB_ICONS = Object.freeze({
|
||||||
appearance: "palette", listeners: "plug", connections: "globe", "docker-agents": "box",
|
appearance: "palette", listeners: "plug", connections: "globe", "docker-agents": "box",
|
||||||
policies: "shield", cache: "database", transform: "wand", forwarding: "route", pages: "file",
|
policies: "shield", cache: "database", transform: "wand", forwarding: "route", pages: "file",
|
||||||
logging: "list", geoip: "mapPin", prometheus: "activity", administration: "users",
|
logging: "list", geoip: "mapPin", prometheus: "activity", alerts: "alert", administration: "users",
|
||||||
"system-info": "cpu", "certificate-api": "key", "tls-policy": "lock", "manual-config": "code", security: "shield",
|
"system-info": "cpu", "certificate-api": "key", "tls-policy": "lock", "manual-config": "code", security: "shield",
|
||||||
});
|
});
|
||||||
const UI_VHOST_TAB_ICONS = Object.freeze({
|
const UI_VHOST_TAB_ICONS = Object.freeze({
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ window.rustProxyOverviewRows = (() => {
|
|||||||
const MIN_CARD_WIDTH = { value: 150, value_chart: 210, chart: 300, panel: 340, table: 640 };
|
const MIN_CARD_WIDTH = { value: 150, value_chart: 210, chart: 300, panel: 340, table: 640 };
|
||||||
const noop = { schedule() { }, flush() { }, setHeights() { }, setAutoFit() { }, reveal() { }, dataReady() { }, rowsFor() { return null; }, fitFor() { return null; } };
|
const noop = { schedule() { }, flush() { }, setHeights() { }, setAutoFit() { }, reveal() { }, dataReady() { }, rowsFor() { return null; }, fitFor() { return null; } };
|
||||||
if (!grid) return noop;
|
if (!grid) return noop;
|
||||||
let heights = null, frame = 0, lastRun = 0, lastWidth = 0, autoFit = true;
|
let heights = null, frame = 0, lastRun = 0, lastWidth = 0, autoFit = true, positions = null, lastGeometry = null;
|
||||||
const state = new Map();
|
const state = new Map();
|
||||||
const shrinkVotes = new Map();
|
const shrinkVotes = new Map();
|
||||||
const cards = () => [...grid.children].filter(node => node.dataset.dashboardWidget);
|
const cards = () => [...grid.children].filter(node => node.dataset.dashboardWidget);
|
||||||
@@ -53,7 +53,7 @@ window.rustProxyOverviewRows = (() => {
|
|||||||
}
|
}
|
||||||
function apply() {
|
function apply() {
|
||||||
frame = 0;
|
frame = 0;
|
||||||
if (!grid.getClientRects().length || grid.classList.contains("is-overview-sorting")) return;
|
if (!grid.getClientRects().length || grid.classList.contains("is-overview-sorting") || grid.classList.contains("is-manual-dragging")) return;
|
||||||
if (!enabled()) { if (grid.classList.contains("has-row-units")) clear(); return; }
|
if (!enabled()) { if (grid.classList.contains("has-row-units")) clear(); return; }
|
||||||
lastRun = performance.now();
|
lastRun = performance.now();
|
||||||
lastWidth = grid.clientWidth;
|
lastWidth = grid.clientWidth;
|
||||||
@@ -96,7 +96,9 @@ window.rustProxyOverviewRows = (() => {
|
|||||||
grid.classList.add("has-row-units");
|
grid.classList.add("has-row-units");
|
||||||
const geometry = gridGeometry(unit + gap, zoom);
|
const geometry = gridGeometry(unit + gap, zoom);
|
||||||
if (!geometry) return;
|
if (!geometry) return;
|
||||||
|
lastGeometry = geometry;
|
||||||
if (autoFit) { packCards(items, geometry, isStat); return; }
|
if (autoFit) { packCards(items, geometry, isStat); return; }
|
||||||
|
if (positions && positions.columns === geometry.starts.length) { pinCards(items, geometry); return; }
|
||||||
equalizeStatRows(items.filter(isStat), geometry);
|
equalizeStatRows(items.filter(isStat), geometry);
|
||||||
alignBottom(items, geometry);
|
alignBottom(items, geometry);
|
||||||
}
|
}
|
||||||
@@ -224,6 +226,73 @@ window.rustProxyOverviewRows = (() => {
|
|||||||
}
|
}
|
||||||
grid.classList.add("has-auto-placement");
|
grid.classList.add("has-auto-placement");
|
||||||
}
|
}
|
||||||
|
function pinCards(items, geometry) {
|
||||||
|
const columns = geometry.starts.length, occupancy = [];
|
||||||
|
const free = (r, c, w, h) => {
|
||||||
|
for (let y = r; y < r + h; y++) for (let x = c; x < c + w; x++) if (occupancy[y]?.[x]) return false;
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
const mark = (r, c, w, h) => {
|
||||||
|
for (let y = r; y < r + h; y++) { const row = occupancy[y] || (occupancy[y] = new Uint8Array(columns)); for (let x = c; x < c + w; x++) row[x] = 1; }
|
||||||
|
};
|
||||||
|
const model = items.map((node, index) => {
|
||||||
|
const flow = place(node, geometry), w = Math.min(columns, spanOf(flow)), cell = positions.items[node.dataset.dashboardWidget];
|
||||||
|
return { node, w, h: rowsOf(node), index, cell, first: node.dataset.dashboardWidget === positions.first };
|
||||||
|
});
|
||||||
|
const pinned = model.filter(card => card.cell).sort((a, b) => (b.first - a.first) || a.cell[1] - b.cell[1] || a.cell[0] - b.cell[0] || a.index - b.index);
|
||||||
|
for (const card of pinned) {
|
||||||
|
card.c = Math.max(0, Math.min(columns - card.w, card.cell[0]));
|
||||||
|
card.r = card.cell[1];
|
||||||
|
while (!free(card.r, card.c, card.w, card.h)) card.r++;
|
||||||
|
mark(card.r, card.c, card.w, card.h);
|
||||||
|
}
|
||||||
|
for (const card of model.filter(card => !card.cell)) {
|
||||||
|
let placed = false;
|
||||||
|
for (let r = 0; !placed; r++) for (let c = 0; c + card.w <= columns && !placed; c++) if (free(r, c, card.w, card.h)) { card.r = r; card.c = c; placed = true; }
|
||||||
|
mark(card.r, card.c, card.w, card.h);
|
||||||
|
}
|
||||||
|
for (const card of model) {
|
||||||
|
card.node.style.setProperty("--overview-col", String(card.c + 1));
|
||||||
|
card.node.style.setProperty("--overview-cols", String(card.w));
|
||||||
|
card.node.style.setProperty("--overview-row", String(card.r + 1));
|
||||||
|
}
|
||||||
|
grid.classList.add("has-auto-placement");
|
||||||
|
}
|
||||||
|
function currentPositions() {
|
||||||
|
const geometry = lastGeometry || gridGeometry(1, zoomOf());
|
||||||
|
if (!geometry) return null;
|
||||||
|
const items = {};
|
||||||
|
for (const node of cards().filter(item => !item.hidden && item.getClientRects().length)) {
|
||||||
|
const col = Number(node.style.getPropertyValue("--overview-col")), row = Number(node.style.getPropertyValue("--overview-row"));
|
||||||
|
if (grid.classList.contains("has-auto-placement") && col && row) { items[node.dataset.dashboardWidget] = [col - 1, row - 1]; continue; }
|
||||||
|
const flow = place(node, geometry);
|
||||||
|
items[node.dataset.dashboardWidget] = [flow.first, flow.row];
|
||||||
|
}
|
||||||
|
return { columns: geometry.starts.length, items };
|
||||||
|
}
|
||||||
|
function cellAt(clientX, clientY) {
|
||||||
|
const geometry = lastGeometry;
|
||||||
|
if (!geometry) return null;
|
||||||
|
const box = grid.getBoundingClientRect();
|
||||||
|
const x = (clientX - box.left) / geometry.zoom - geometry.left, y = (clientY - box.top) / geometry.zoom - geometry.top;
|
||||||
|
const column = geometry.starts.reduce((best, start, index) => Math.abs(start - x) < Math.abs(geometry.starts[best] - x) ? index : best, 0);
|
||||||
|
return { column, row: Math.max(0, Math.round(y / geometry.step)), columns: geometry.starts.length, step: geometry.step };
|
||||||
|
}
|
||||||
|
function cellBox(column, row, span, rows) {
|
||||||
|
const geometry = lastGeometry;
|
||||||
|
if (!geometry) return null;
|
||||||
|
const box = grid.getBoundingClientRect(), columns = geometry.starts.length;
|
||||||
|
const first = Math.max(0, Math.min(columns - 1, column)), last = Math.max(first, Math.min(columns - 1, first + span - 1));
|
||||||
|
const left = box.left + (geometry.left + geometry.starts[first]) * geometry.zoom;
|
||||||
|
const right = box.left + (geometry.left + geometry.starts[last] + geometry.tracks[last]) * geometry.zoom;
|
||||||
|
const top = box.top + (geometry.top + row * geometry.step) * geometry.zoom;
|
||||||
|
return { left, top, width: right - left, height: Math.max(1, rows * geometry.step - (geometry.step - (parseFloat(getComputedStyle(grid).getPropertyValue("--overview-row-unit")) || geometry.step))) * geometry.zoom };
|
||||||
|
}
|
||||||
|
function setPositions(value) {
|
||||||
|
positions = value && typeof value === "object" && value.items ? value : null;
|
||||||
|
grid.classList.toggle("has-pinned-layout", !!positions);
|
||||||
|
schedule(true);
|
||||||
|
}
|
||||||
function setRows(node, rows) {
|
function setRows(node, rows) {
|
||||||
if (node.dataset.dashboardRows === String(rows)) return;
|
if (node.dataset.dashboardRows === String(rows)) return;
|
||||||
node.style.setProperty("--overview-rows", String(rows));
|
node.style.setProperty("--overview-rows", String(rows));
|
||||||
@@ -328,6 +397,10 @@ window.rustProxyOverviewRows = (() => {
|
|||||||
schedule,
|
schedule,
|
||||||
flush,
|
flush,
|
||||||
setHeights,
|
setHeights,
|
||||||
|
setPositions,
|
||||||
|
currentPositions,
|
||||||
|
cellAt,
|
||||||
|
cellBox,
|
||||||
setAutoFit,
|
setAutoFit,
|
||||||
reveal,
|
reveal,
|
||||||
dataReady,
|
dataReady,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const ADMIN_DEFAULT_HIDDEN_WIDGETS = Object.freeze([...new Set([
|
|||||||
const ADMIN_APPEARANCE_DEFAULTS = Object.freeze({
|
const ADMIN_APPEARANCE_DEFAULTS = Object.freeze({
|
||||||
theme: "dark", language: "auto", ui_scale: 100, time_format: "24h", chart_style: "default",
|
theme: "dark", language: "auto", ui_scale: 100, time_format: "24h", chart_style: "default",
|
||||||
chart_axes: false, interface_icons: false, logo_animation: false, stable_dialog_position: true,
|
chart_axes: false, interface_icons: false, logo_animation: false, stable_dialog_position: true,
|
||||||
button_style: "normal", corner_style: "default", table_density: "normal", dashboard_density: ADMIN_DASHBOARD_DEFAULTS.dashboard_density, dashboard_widgets: [...ADMIN_DASHBOARD_WIDGETS], dashboard_hidden_widgets: [...ADMIN_DEFAULT_HIDDEN_WIDGETS], dashboard_widget_sizes: null, dashboard_widget_heights: null, dashboard_auto_fit: true, sidebar_collapsed: false,
|
button_style: "normal", corner_style: "default", table_density: "normal", dashboard_density: ADMIN_DASHBOARD_DEFAULTS.dashboard_density, dashboard_widgets: [...ADMIN_DASHBOARD_WIDGETS], dashboard_hidden_widgets: [...ADMIN_DEFAULT_HIDDEN_WIDGETS], dashboard_widget_sizes: null, dashboard_widget_heights: null, dashboard_widget_positions: null, dashboard_auto_fit: true, sidebar_collapsed: false,
|
||||||
});
|
});
|
||||||
const CHART_STYLE_KEYS = Object.freeze({ default: "chartStyleDefault", soft: "chartStyleSoft", technical: "chartStyleTechnical", high_contrast: "chartStyleHighContrast", neon: "chartStyleNeon", monochrome: "chartStyleMonochrome", warm: "chartStyleWarm", cool: "chartStyleCool", sunset: "chartStyleSunset", aurora: "chartStyleAurora", ocean: "chartStyleOcean", forest: "chartStyleForest", pastel: "chartStylePastel", terminal: "chartStyleTerminal", blueprint: "chartStyleBlueprint", colorblind: "chartStyleColorblind" });
|
const CHART_STYLE_KEYS = Object.freeze({ default: "chartStyleDefault", soft: "chartStyleSoft", technical: "chartStyleTechnical", high_contrast: "chartStyleHighContrast", neon: "chartStyleNeon", monochrome: "chartStyleMonochrome", warm: "chartStyleWarm", cool: "chartStyleCool", sunset: "chartStyleSunset", aurora: "chartStyleAurora", ocean: "chartStyleOcean", forest: "chartStyleForest", pastel: "chartStylePastel", terminal: "chartStyleTerminal", blueprint: "chartStyleBlueprint", colorblind: "chartStyleColorblind" });
|
||||||
let adminPreferences = null, adminPreferencesLoading = null, adminPreferencesWrite = Promise.resolve(), adminPreferencesUnavailable = false;
|
let adminPreferences = null, adminPreferencesLoading = null, adminPreferencesWrite = Promise.resolve(), adminPreferencesUnavailable = false;
|
||||||
@@ -70,6 +70,18 @@ function normalizeDashboardWidgetSizes(value) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
const DASHBOARD_MAX_ROWS = 32;
|
const DASHBOARD_MAX_ROWS = 32;
|
||||||
|
function normalizeDashboardWidgetPositions(value) {
|
||||||
|
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
||||||
|
const columns = Number(value.columns);
|
||||||
|
if (!Number.isInteger(columns) || columns < 1 || columns > 24 || !value.items || typeof value.items !== "object") return null;
|
||||||
|
const items = {};
|
||||||
|
for (const [id, cell] of Object.entries(value.items)) {
|
||||||
|
if (!ADMIN_DASHBOARD_BY_ID.has(id) || !Array.isArray(cell) || cell.length !== 2) continue;
|
||||||
|
const [column, row] = cell.map(Number);
|
||||||
|
if (Number.isInteger(column) && Number.isInteger(row) && column >= 0 && column < columns && row >= 0 && row <= 2048) items[id] = [column, row];
|
||||||
|
}
|
||||||
|
return Object.keys(items).length ? { columns, items } : null;
|
||||||
|
}
|
||||||
function normalizeDashboardWidgetHeights(value) {
|
function normalizeDashboardWidgetHeights(value) {
|
||||||
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
||||||
const result = {};
|
const result = {};
|
||||||
@@ -310,6 +322,8 @@ function applyAdminPreferences(value, cache = true) {
|
|||||||
const savedSizes = normalizeDashboardWidgetSizes(value.dashboard_widget_sizes);
|
const savedSizes = normalizeDashboardWidgetSizes(value.dashboard_widget_sizes);
|
||||||
const savedHeights = normalizeDashboardWidgetHeights(value.dashboard_widget_heights);
|
const savedHeights = normalizeDashboardWidgetHeights(value.dashboard_widget_heights);
|
||||||
const savedAutoFit = value.dashboard_auto_fit !== false;
|
const savedAutoFit = value.dashboard_auto_fit !== false;
|
||||||
|
const savedPositions = normalizeDashboardWidgetPositions(value.dashboard_widget_positions);
|
||||||
|
window.rustProxyOverviewRows?.setPositions?.(editing ? editing.positions : savedPositions);
|
||||||
window.rustProxyOverviewRows?.setAutoFit?.(editing ? editing.autoFit !== false : savedAutoFit);
|
window.rustProxyOverviewRows?.setAutoFit?.(editing ? editing.autoFit !== false : savedAutoFit);
|
||||||
if (editing) applyDashboardLayout(editing.order, editing.hidden, editing.sizes, editing.heights);
|
if (editing) applyDashboardLayout(editing.order, editing.hidden, editing.sizes, editing.heights);
|
||||||
else applyDashboardLayout(savedOrder, savedHidden, savedSizes, savedHeights);
|
else applyDashboardLayout(savedOrder, savedHidden, savedSizes, savedHeights);
|
||||||
@@ -318,7 +332,7 @@ function applyAdminPreferences(value, cache = true) {
|
|||||||
refresh: normalizeRefreshPreferences(value.refresh),
|
refresh: normalizeRefreshPreferences(value.refresh),
|
||||||
theme: applyAdminTheme(value.theme, cache), language: applyAdminLanguage(value.language, cache, false), ui_scale: applyAdminUiScale(value.ui_scale, cache),
|
theme: applyAdminTheme(value.theme, cache), language: applyAdminLanguage(value.language, cache, false), ui_scale: applyAdminUiScale(value.ui_scale, cache),
|
||||||
time_format: applyAdminTimeFormat(value.time_format), chart_style: applyAdminChartStyle(value.chart_style), chart_axes: applyAdminChartAxes(value.chart_axes), interface_icons: applyAdminInterfaceIcons(value.interface_icons), logo_animation: applyAdminLogoAnimation(value.logo_animation), stable_dialog_position: applyAdminStableDialogPosition(value.stable_dialog_position), button_style: applyAdminButtonStyle(value.button_style), corner_style: applyAdminCornerStyle(value.corner_style, cache), table_density: applyAdminTableDensity(value.table_density),
|
time_format: applyAdminTimeFormat(value.time_format), chart_style: applyAdminChartStyle(value.chart_style), chart_axes: applyAdminChartAxes(value.chart_axes), interface_icons: applyAdminInterfaceIcons(value.interface_icons), logo_animation: applyAdminLogoAnimation(value.logo_animation), stable_dialog_position: applyAdminStableDialogPosition(value.stable_dialog_position), button_style: applyAdminButtonStyle(value.button_style), corner_style: applyAdminCornerStyle(value.corner_style, cache), table_density: applyAdminTableDensity(value.table_density),
|
||||||
dashboard_density: applyAdminDashboardDensity(value.dashboard_density), dashboard_widgets: savedOrder, dashboard_hidden_widgets: savedHidden, dashboard_widget_sizes: savedSizes, dashboard_widget_heights: savedHeights, dashboard_auto_fit: savedAutoFit,
|
dashboard_density: applyAdminDashboardDensity(value.dashboard_density), dashboard_widgets: savedOrder, dashboard_hidden_widgets: savedHidden, dashboard_widget_sizes: savedSizes, dashboard_widget_heights: savedHeights, dashboard_widget_positions: savedPositions, dashboard_auto_fit: savedAutoFit,
|
||||||
};
|
};
|
||||||
adminPreferences = normalized;
|
adminPreferences = normalized;
|
||||||
window.rustProxyRefresh?.update(normalized.refresh);
|
window.rustProxyRefresh?.update(normalized.refresh);
|
||||||
@@ -370,7 +384,7 @@ function updateAdminPreferences(patch) {
|
|||||||
next.refresh = normalizeRefreshPreferences(next.refresh);
|
next.refresh = normalizeRefreshPreferences(next.refresh);
|
||||||
next.theme = normalizeAdminTheme(next.theme); next.language = normalizeAdminLanguage(next.language); next.ui_scale = normalizeAdminUiScale(next.ui_scale);
|
next.theme = normalizeAdminTheme(next.theme); next.language = normalizeAdminLanguage(next.language); next.ui_scale = normalizeAdminUiScale(next.ui_scale);
|
||||||
next.time_format = normalizeAdminTimeFormat(next.time_format); next.chart_style = normalizeAdminChartStyle(next.chart_style); next.chart_axes = next.chart_axes === true; next.interface_icons = next.interface_icons === true; next.logo_animation = next.logo_animation === true; next.stable_dialog_position = next.stable_dialog_position !== false; next.button_style = normalizeAdminButtonStyle(next.button_style); next.corner_style = normalizeAdminCornerStyle(next.corner_style); next.table_density = normalizeAdminDensity(next.table_density);
|
next.time_format = normalizeAdminTimeFormat(next.time_format); next.chart_style = normalizeAdminChartStyle(next.chart_style); next.chart_axes = next.chart_axes === true; next.interface_icons = next.interface_icons === true; next.logo_animation = next.logo_animation === true; next.stable_dialog_position = next.stable_dialog_position !== false; next.button_style = normalizeAdminButtonStyle(next.button_style); next.corner_style = normalizeAdminCornerStyle(next.corner_style); next.table_density = normalizeAdminDensity(next.table_density);
|
||||||
next.dashboard_density = normalizeAdminDensity(next.dashboard_density, "compact"); next.dashboard_widgets = normalizeDashboardWidgets(next.dashboard_widgets); next.dashboard_hidden_widgets = normalizeHiddenDashboardWidgets(next.dashboard_hidden_widgets); next.dashboard_widget_sizes = normalizeDashboardWidgetSizes(next.dashboard_widget_sizes); next.dashboard_widget_heights = normalizeDashboardWidgetHeights(next.dashboard_widget_heights); next.dashboard_auto_fit = next.dashboard_auto_fit !== false; next.sidebar_collapsed = next.sidebar_collapsed === true;
|
next.dashboard_density = normalizeAdminDensity(next.dashboard_density, "compact"); next.dashboard_widgets = normalizeDashboardWidgets(next.dashboard_widgets); next.dashboard_hidden_widgets = normalizeHiddenDashboardWidgets(next.dashboard_hidden_widgets); next.dashboard_widget_sizes = normalizeDashboardWidgetSizes(next.dashboard_widget_sizes); next.dashboard_widget_heights = normalizeDashboardWidgetHeights(next.dashboard_widget_heights); next.dashboard_widget_positions = normalizeDashboardWidgetPositions(next.dashboard_widget_positions); next.dashboard_auto_fit = next.dashboard_auto_fit !== false; next.sidebar_collapsed = next.sidebar_collapsed === true;
|
||||||
const saved = await api("/api/preferences", { method: "PUT", body: JSON.stringify(next) });
|
const saved = await api("/api/preferences", { method: "PUT", body: JSON.stringify(next) });
|
||||||
if (!authenticated || epoch !== authEpoch) return adminPreferences;
|
if (!authenticated || epoch !== authEpoch) return adminPreferences;
|
||||||
return applyAdminPreferences(saved);
|
return applyAdminPreferences(saved);
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ function renderSettings() {
|
|||||||
$("global-ip-rules").value = rulesText(acl);
|
$("global-ip-rules").value = rulesText(acl);
|
||||||
$("global-method-mode").value = methods.mode || "off";
|
$("global-method-mode").value = methods.mode || "off";
|
||||||
$("global-method-list").value = (methods.methods || []).join("\n");
|
$("global-method-list").value = (methods.methods || []).join("\n");
|
||||||
|
globalMethodPicker()?.refresh();
|
||||||
$("global-content-type-enabled").checked = content.enabled === true;
|
$("global-content-type-enabled").checked = content.enabled === true;
|
||||||
$("global-content-type-list").value = (content.blocked || []).join("\n");
|
$("global-content-type-list").value = (content.blocked || []).join("\n");
|
||||||
$("global-rate-enabled").checked = rate.enabled === true;
|
$("global-rate-enabled").checked = rate.enabled === true;
|
||||||
@@ -142,9 +143,11 @@ function syncGlobalSecurityControls() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
globalCountryPicker();
|
globalCountryPicker();
|
||||||
|
globalMethodPicker();
|
||||||
syncGlobalPolicySummary();
|
syncGlobalPolicySummary();
|
||||||
}
|
}
|
||||||
let globalCountryPickerInstance = null;
|
let globalCountryPickerInstance = null, globalMethodPickerInstance = null;
|
||||||
|
function globalMethodPicker() { if (!globalMethodPickerInstance) globalMethodPickerInstance = window.rustProxyMethodPicker?.attach($("global-method-list")) || null; return globalMethodPickerInstance; }
|
||||||
function globalCountryPicker() { if (!globalCountryPickerInstance) globalCountryPickerInstance = window.rustProxyCountryPicker?.attach($("global-country-list")) || null; return globalCountryPickerInstance; }
|
function globalCountryPicker() { if (!globalCountryPickerInstance) globalCountryPickerInstance = window.rustProxyCountryPicker?.attach($("global-country-list")) || null; return globalCountryPickerInstance; }
|
||||||
function syncGlobalPolicySummary() {
|
function syncGlobalPolicySummary() {
|
||||||
const nav = $("global-policy-summary"); if (!nav) return;
|
const nav = $("global-policy-summary"); if (!nav) return;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ window.rustProxyCacheRules = (() => {
|
|||||||
const ACTIONS = {
|
const ACTIONS = {
|
||||||
request: ["pass", "strip_cookies", "strip_query", "hash_header", "hash_cookie"],
|
request: ["pass", "strip_cookies", "strip_query", "hash_header", "hash_cookie"],
|
||||||
response: ["ttl", "grace", "no_store", "ignore_cache_control", "strip_set_cookie"],
|
response: ["ttl", "grace", "no_store", "ignore_cache_control", "strip_set_cookie"],
|
||||||
deliver: ["set_header", "remove_header"],
|
deliver: ["set_header", "default_header", "remove_header"],
|
||||||
};
|
};
|
||||||
const ASPECTS = { pass: "pass", ttl: "ttl", grace: "grace", no_store: "store" };
|
const ASPECTS = { pass: "pass", ttl: "ttl", grace: "grace", no_store: "store" };
|
||||||
const tk = (prefix, value) => t(`${prefix}${String(value).split("_").map(part => part[0].toUpperCase() + part.slice(1)).join("")}`);
|
const tk = (prefix, value) => t(`${prefix}${String(value).split("_").map(part => part[0].toUpperCase() + part.slice(1)).join("")}`);
|
||||||
@@ -92,6 +92,7 @@ window.rustProxyCacheRules = (() => {
|
|||||||
case "strip_set_cookie": return "unset beresp.http.Set-Cookie;";
|
case "strip_set_cookie": return "unset beresp.http.Set-Cookie;";
|
||||||
case "set_header": return `set resp.http.${a.name} = "${esc(a.value ?? "")}";`;
|
case "set_header": return `set resp.http.${a.name} = "${esc(a.value ?? "")}";`;
|
||||||
case "remove_header": return `unset resp.http.${a.name};`;
|
case "remove_header": return `unset resp.http.${a.name};`;
|
||||||
|
case "default_header": return `if (!resp.http.${a.name}) { set resp.http.${a.name} = "${esc(a.value ?? "")}"; }`;
|
||||||
default: return `# ${a.type}`;
|
default: return `# ${a.type}`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -121,7 +122,8 @@ window.rustProxyCacheRules = (() => {
|
|||||||
const actions = rule.actions.map(a => {
|
const actions = rule.actions.map(a => {
|
||||||
if (a.type === "ttl" || a.type === "grace") return `${actionLabel(a.type)} ${fmtDuration(a.seconds)}`;
|
if (a.type === "ttl" || a.type === "grace") return `${actionLabel(a.type)} ${fmtDuration(a.seconds)}`;
|
||||||
if (a.type === "strip_query") return `${actionLabel(a.type)}${a.params?.length ? `: ${a.params.join(", ")}` : ""}`;
|
if (a.type === "strip_query") return `${actionLabel(a.type)}${a.params?.length ? `: ${a.params.join(", ")}` : ""}`;
|
||||||
if (a.type === "set_header" || a.type === "remove_header" || a.type === "hash_header" || a.type === "hash_cookie") return `${actionLabel(a.type)}: ${a.name || "-"}`;
|
if (a.type === "set_header" || a.type === "default_header") return `${actionLabel(a.type)}: ${a.name || "-"}${a.value ? ` = ${a.value}` : ""}`;
|
||||||
|
if (a.type === "remove_header" || a.type === "hash_header" || a.type === "hash_cookie") return `${actionLabel(a.type)}: ${a.name || "-"}`;
|
||||||
return actionLabel(a.type);
|
return actionLabel(a.type);
|
||||||
});
|
});
|
||||||
return actions.join(" · ");
|
return actions.join(" · ");
|
||||||
@@ -142,6 +144,9 @@ window.rustProxyCacheRules = (() => {
|
|||||||
language: () => [{ name: t("cacheRuleTplLanguage"), stage: "request", match: "all", conditions: [], actions: [{ type: "hash_cookie", name: "lang" }] }],
|
language: () => [{ name: t("cacheRuleTplLanguage"), stage: "request", match: "all", conditions: [], actions: [{ type: "hash_cookie", name: "lang" }] }],
|
||||||
notfound: () => [{ name: t("cacheRuleTplNotFound"), stage: "response", match: "all", conditions: [{ field: "status", operator: "equals", values: ["404"] }], actions: [{ type: "ttl", seconds: 60 }] }],
|
notfound: () => [{ name: t("cacheRuleTplNotFound"), stage: "response", match: "all", conditions: [{ field: "status", operator: "equals", values: ["404"] }], actions: [{ type: "ttl", seconds: 60 }] }],
|
||||||
headers: () => [{ name: t("cacheRuleTplHeaders"), stage: "deliver", match: "all", conditions: [], actions: [{ type: "remove_header", name: "X-Powered-By" }] }],
|
headers: () => [{ name: t("cacheRuleTplHeaders"), stage: "deliver", match: "all", conditions: [], actions: [{ type: "remove_header", name: "X-Powered-By" }] }],
|
||||||
|
browser: () => [{ name: t("cacheRuleTplBrowser"), stage: "deliver", match: "all", conditions: [{ field: "extension", operator: "equals", values: ["css", "js", "mjs", "png", "jpg", "jpeg", "gif", "webp", "avif", "svg", "ico", "woff", "woff2"] }, { field: "status", operator: "equals", values: ["200"] }], actions: [{ type: "set_header", name: "Cache-Control", value: "public, max-age=2592000" }] }],
|
||||||
|
nobrowser: () => [{ name: t("cacheRuleTplNoBrowser"), stage: "deliver", match: "any", conditions: [{ field: "content_type", operator: "prefix", values: ["text/html"] }, { field: "path", operator: "prefix", values: ["/admin", "/account"] }], actions: [{ type: "set_header", name: "Cache-Control", value: "no-store" }] }],
|
||||||
|
security: () => [{ name: t("cacheRuleTplSecurity"), stage: "deliver", match: "all", conditions: [], actions: [{ type: "default_header", name: "X-Content-Type-Options", value: "nosniff" }, { type: "default_header", name: "Referrer-Policy", value: "strict-origin-when-cross-origin" }] }],
|
||||||
};
|
};
|
||||||
function applicableGlobals(vhostId) {
|
function applicableGlobals(vhostId) {
|
||||||
return (envelope?.config?.cache?.rules || []).filter(rule => rule.enabled !== false && (!rule.vhosts?.length || rule.vhosts.includes(vhostId)));
|
return (envelope?.config?.cache?.rules || []).filter(rule => rule.enabled !== false && (!rule.vhosts?.length || rule.vhosts.includes(vhostId)));
|
||||||
@@ -172,6 +177,19 @@ window.rustProxyCacheRules = (() => {
|
|||||||
if (skippedBy.length) notes.push(t("cacheRulesIgnoredIn").replace("{vhosts}", skippedBy.join(", ")));
|
if (skippedBy.length) notes.push(t("cacheRulesIgnoredIn").replace("{vhosts}", skippedBy.join(", ")));
|
||||||
return notes;
|
return notes;
|
||||||
}
|
}
|
||||||
|
let targets = null, targetsLoading = null;
|
||||||
|
function loadTargets() {
|
||||||
|
if (targets || targetsLoading || typeof authenticated === "undefined" || !authenticated) return targetsLoading;
|
||||||
|
targetsLoading = api("/api/cache/rules/targets")
|
||||||
|
.then(data => { targets = Array.isArray(data.targets) ? data.targets : []; document.dispatchEvent(new Event("rustproxy-cache-targets")); })
|
||||||
|
.catch(() => { })
|
||||||
|
.finally(() => { targetsLoading = null; });
|
||||||
|
return targetsLoading;
|
||||||
|
}
|
||||||
|
function targetList() {
|
||||||
|
return targets || (envelope?.config?.vhosts || []).map(vhost => ({ id: vhost.id, hosts: vhost.frontend?.hosts || [], docker: false }));
|
||||||
|
}
|
||||||
|
const targetTitle = target => target.docker ? `${target.hosts?.[0] || target.id} (Docker)` : target.id;
|
||||||
let hits = {};
|
let hits = {};
|
||||||
async function loadHits() {
|
async function loadHits() {
|
||||||
if (!authenticated) return;
|
if (!authenticated) return;
|
||||||
@@ -203,7 +221,7 @@ window.rustProxyCacheRules = (() => {
|
|||||||
const exportButton = el("button", t("cacheRulesExportVcl"), "outline"); exportButton.type = "button";
|
const exportButton = el("button", t("cacheRulesExportVcl"), "outline"); exportButton.type = "button";
|
||||||
const addButton = el("button", t("cacheRulesAdd"), "primary"); addButton.type = "button";
|
const addButton = el("button", t("cacheRulesAdd"), "primary"); addButton.type = "button";
|
||||||
toolbar.append(templates, importButton, exportButton, addButton);
|
toolbar.append(templates, importButton, exportButton, addButton);
|
||||||
const ignoreWrap = el("label", undefined, "check cache-rules-ignore"), ignoreBox = el("input"); ignoreBox.type = "checkbox"; ignoreBox.checked = ignoreGlobal; ignoreBox.id = "vh-cache-ignore-global-rules";
|
const ignoreWrap = el("label", undefined, "check cache-rules-ignore"), ignoreBox = el("input"); ignoreBox.type = "checkbox"; ignoreBox.checked = ignoreGlobal; if (options.ignoreId !== "") ignoreBox.id = options.ignoreId || "vh-cache-ignore-global-rules";
|
||||||
ignoreWrap.append(ignoreBox, el("span", t("cacheRulesIgnoreGlobal")));
|
ignoreWrap.append(ignoreBox, el("span", t("cacheRulesIgnoreGlobal")));
|
||||||
const notices = el("div", undefined, "cache-rules-notices");
|
const notices = el("div", undefined, "cache-rules-notices");
|
||||||
const list = el("div", undefined, "cache-rules-list");
|
const list = el("div", undefined, "cache-rules-list");
|
||||||
@@ -224,6 +242,8 @@ window.rustProxyCacheRules = (() => {
|
|||||||
for (const isolated of [tester.node, importBox]) for (const type of ["input", "change"]) isolated.addEventListener(type, event => event.stopPropagation());
|
for (const isolated of [tester.node, importBox]) for (const type of ["input", "change"]) isolated.addEventListener(type, event => event.stopPropagation());
|
||||||
root.addEventListener("keydown", event => { if (event.key === "Enter" && event.target.matches?.("input:not([type=checkbox])")) event.preventDefault(); });
|
root.addEventListener("keydown", event => { if (event.key === "Enter" && event.target.matches?.("input:not([type=checkbox])")) event.preventDefault(); });
|
||||||
function taken() { return new Set(rules.map(rule => rule.id)); }
|
function taken() { return new Set(rules.map(rule => rule.id)); }
|
||||||
|
void loadTargets();
|
||||||
|
document.addEventListener("rustproxy-cache-targets", () => { if (root.isConnected && scope === "global" && open.size) render(); });
|
||||||
function renderNotices() {
|
function renderNotices() {
|
||||||
notices.replaceChildren();
|
notices.replaceChildren();
|
||||||
if (scope !== "vhost") return;
|
if (scope !== "vhost") return;
|
||||||
@@ -285,7 +305,7 @@ window.rustProxyCacheRules = (() => {
|
|||||||
grid.append(labeled("cacheRuleName", name), labeled("cacheRuleId", id), labeled("cacheRuleStage", stage, `cacheRuleStageHelp${rule.stage[0].toUpperCase()}${rule.stage.slice(1)}`), labeled("cacheRuleMatch", match), stopLabel);
|
grid.append(labeled("cacheRuleName", name), labeled("cacheRuleId", id), labeled("cacheRuleStage", stage, `cacheRuleStageHelp${rule.stage[0].toUpperCase()}${rule.stage.slice(1)}`), labeled("cacheRuleMatch", match), stopLabel);
|
||||||
body.append(grid);
|
body.append(grid);
|
||||||
if (scope === "global") {
|
if (scope === "global") {
|
||||||
const vhostItems = (envelope?.config?.vhosts || []).map(vhost => ({ id: vhost.id, title: vhost.name || vhost.id, detail: (vhost.frontend?.hosts || []).slice(0, 3).join(", ") }));
|
const vhostItems = targetList().map(target => ({ id: target.id, title: targetTitle(target), detail: target.docker ? target.id : (target.hosts || []).slice(0, 3).join(", "), search: (target.hosts || []).join(" "), badge: target.docker ? "Docker" : "", badgeClass: "is-allow" }));
|
||||||
const picker = window.rustProxyChoicePicker.create({ className: "cache-rule-vhosts", selected: rule.vhosts, items: vhostItems, limit: 64, labels: { choose: "cacheRuleVhostsAll", selected: "cacheRuleVhostsSelected", none: "cacheRuleVhostsNone", empty: "cacheRuleVhostsEmpty" } });
|
const picker = window.rustProxyChoicePicker.create({ className: "cache-rule-vhosts", selected: rule.vhosts, items: vhostItems, limit: 64, labels: { choose: "cacheRuleVhostsAll", selected: "cacheRuleVhostsSelected", none: "cacheRuleVhostsNone", empty: "cacheRuleVhostsEmpty" } });
|
||||||
picker.addEventListener("choicechange", event => { rule.vhosts = event.detail || []; exportPre.textContent = exportVcl(rules); });
|
picker.addEventListener("choicechange", event => { rule.vhosts = event.detail || []; exportPre.textContent = exportVcl(rules); });
|
||||||
picker.addEventListener("change", changed);
|
picker.addEventListener("change", changed);
|
||||||
@@ -358,6 +378,7 @@ window.rustProxyCacheRules = (() => {
|
|||||||
case "hash_cookie": params.append(nameInput("lang")); break;
|
case "hash_cookie": params.append(nameInput("lang")); break;
|
||||||
case "ttl": case "grace": params.append(durationInput(action.seconds ?? (action.type === "ttl" ? 3600 : 60), seconds => { action.seconds = seconds; changed(); })); if (action.seconds == null) action.seconds = action.type === "ttl" ? 3600 : 60; break;
|
case "ttl": case "grace": params.append(durationInput(action.seconds ?? (action.type === "ttl" ? 3600 : 60), seconds => { action.seconds = seconds; changed(); })); if (action.seconds == null) action.seconds = action.type === "ttl" ? 3600 : 60; break;
|
||||||
case "set_header": { const value = textInput(action.value, t("cacheRuleHeaderValue")); value.addEventListener("input", () => { action.value = value.value; changed(); }); params.append(nameInput("X-Cache-Rule"), value); break; }
|
case "set_header": { const value = textInput(action.value, t("cacheRuleHeaderValue")); value.addEventListener("input", () => { action.value = value.value; changed(); }); params.append(nameInput("X-Cache-Rule"), value); break; }
|
||||||
|
case "default_header": { const value = textInput(action.value, t("cacheRuleHeaderValue")); value.addEventListener("input", () => { action.value = value.value; changed(); }); params.append(nameInput("Cache-Control"), value); break; }
|
||||||
case "remove_header": params.append(nameInput("X-Powered-By")); break;
|
case "remove_header": params.append(nameInput("X-Powered-By")); break;
|
||||||
default: params.append(el("small", t(`cacheRuleActionHelp${action.type.split("_").map(p => p[0].toUpperCase() + p.slice(1)).join("")}`), "fine"));
|
default: params.append(el("small", t(`cacheRuleActionHelp${action.type.split("_").map(p => p[0].toUpperCase() + p.slice(1)).join("")}`), "fine"));
|
||||||
}
|
}
|
||||||
@@ -370,7 +391,12 @@ window.rustProxyCacheRules = (() => {
|
|||||||
const grid = el("div", undefined, "cache-rules-tester-grid");
|
const grid = el("div", undefined, "cache-rules-tester-grid");
|
||||||
const method = select(["GET", "HEAD", "POST"].map(value => [value, value]), "GET", t("cacheRuleFieldMethod"));
|
const method = select(["GET", "HEAD", "POST"].map(value => [value, value]), "GET", t("cacheRuleFieldMethod"));
|
||||||
const url = textInput("", scope === "vhost" ? "/produkt?id=7&utm_source=fb" : "https://shop.example.com/produkt?id=7&utm_source=fb", "mono");
|
const url = textInput("", scope === "vhost" ? "/produkt?id=7&utm_source=fb" : "https://shop.example.com/produkt?id=7&utm_source=fb", "mono");
|
||||||
const vhostSelect = select([["", t("cacheRulesTesterNoVhost")], ...(envelope?.config?.vhosts || []).map(vhost => [vhost.id, vhost.name || vhost.id])], vhostId, t("cacheRulesTesterVhost"));
|
const vhostSelect = select([["", t("cacheRulesTesterNoVhost")], ...targetList().map(target => [target.id, targetTitle(target)])], vhostId, t("cacheRulesTesterVhost"));
|
||||||
|
document.addEventListener("rustproxy-cache-targets", () => {
|
||||||
|
const current = vhostSelect.value;
|
||||||
|
vhostSelect.replaceChildren(...[["", t("cacheRulesTesterNoVhost")], ...targetList().map(target => [target.id, targetTitle(target)])].map(([value, text]) => { const option = el("option", text); option.value = value; return option; }));
|
||||||
|
vhostSelect.value = [...vhostSelect.options].some(option => option.value === current) ? current : "";
|
||||||
|
});
|
||||||
const headers = document.createElement("textarea"); headers.rows = 3; headers.placeholder = "Cookie: lang=pl; sid=1\nAccept-Language: pl"; headers.spellcheck = false;
|
const headers = document.createElement("textarea"); headers.rows = 3; headers.placeholder = "Cookie: lang=pl; sid=1\nAccept-Language: pl"; headers.spellcheck = false;
|
||||||
const clientIp = textInput("", "203.0.113.10", "mono");
|
const clientIp = textInput("", "203.0.113.10", "mono");
|
||||||
const status = el("input"); status.type = "number"; status.min = 100; status.max = 599; status.value = 200;
|
const status = el("input"); status.type = "number"; status.min = 100; status.max = 599; status.value = 200;
|
||||||
@@ -443,7 +469,7 @@ window.rustProxyCacheRules = (() => {
|
|||||||
if (FIELDS[c.field].name && !c.name) throw new Error(t("cacheRuleNeedsName").replace("{rule}", rule.name || rule.id));
|
if (FIELDS[c.field].name && !c.name) throw new Error(t("cacheRuleNeedsName").replace("{rule}", rule.name || rule.id));
|
||||||
if (c.operator !== "exists" && !(c.values || []).length) throw new Error(t("cacheRuleNeedsValue").replace("{rule}", rule.name || rule.id));
|
if (c.operator !== "exists" && !(c.values || []).length) throw new Error(t("cacheRuleNeedsValue").replace("{rule}", rule.name || rule.id));
|
||||||
}
|
}
|
||||||
for (const a of rule.actions) if (["hash_header", "hash_cookie", "set_header", "remove_header"].includes(a.type) && !a.name) throw new Error(t("cacheRuleNeedsName").replace("{rule}", rule.name || rule.id));
|
for (const a of rule.actions) if (["hash_header", "hash_cookie", "set_header", "default_header", "remove_header"].includes(a.type) && !a.name) throw new Error(t("cacheRuleNeedsName").replace("{rule}", rule.name || rule.id));
|
||||||
}
|
}
|
||||||
return rules.map(rule => clean(rule, scope === "global"));
|
return rules.map(rule => clean(rule, scope === "global"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,8 @@ curl --fail --show-error --request POST \\
|
|||||||
$("certificate-api-revoke-all").disabled = !credentials.length;
|
$("certificate-api-revoke-all").disabled = !credentials.length;
|
||||||
$("certificate-api-new").disabled = credentials.length >= max || ($("certificate-api-form").hidden === false && !certificateApiEditingKey);
|
$("certificate-api-new").disabled = credentials.length >= max || ($("certificate-api-form").hidden === false && !certificateApiEditingKey);
|
||||||
const form = $("certificate-api-form"), editingForm = !form.hidden && certificateApiEditingKey;
|
const form = $("certificate-api-form"), editingForm = !form.hidden && certificateApiEditingKey;
|
||||||
|
const scrolled = [...form.querySelectorAll("*")].filter(node => node.scrollTop > 0).map(node => [node, node.scrollTop]);
|
||||||
|
const focused = form.contains(document.activeElement) ? document.activeElement : null;
|
||||||
if (editingForm) $("certificate-api-card").insertBefore(form, target);
|
if (editingForm) $("certificate-api-card").insertBefore(form, target);
|
||||||
target.replaceChildren();
|
target.replaceChildren();
|
||||||
for (const credential of credentials) {
|
for (const credential of credentials) {
|
||||||
@@ -197,6 +199,8 @@ curl --fail --show-error --request POST \\
|
|||||||
target.append(container);
|
target.append(container);
|
||||||
if (editingForm && certificateApiEditingKey === credential.key_id) container.append(form);
|
if (editingForm && certificateApiEditingKey === credential.key_id) container.append(form);
|
||||||
}
|
}
|
||||||
|
for (const [node, top] of scrolled) node.scrollTop = top;
|
||||||
|
if (focused && document.activeElement !== focused) focused.focus({ preventScroll: true });
|
||||||
certificateApiExample();
|
certificateApiExample();
|
||||||
}
|
}
|
||||||
async function loadCertificateApi(force = false) {
|
async function loadCertificateApi(force = false) {
|
||||||
|
|||||||
+1231
-214
File diff suppressed because it is too large.
Load diff
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
.host-chip-editor.field-invalid,
|
.host-chip-editor.field-invalid,
|
||||||
.listener-choices.field-invalid {
|
.listener-choices.field-invalid {
|
||||||
border-color: var(--red) !important;
|
border-color: var(--red) !important;
|
||||||
@@ -1724,6 +1723,22 @@ html.app-loading,
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.acl-picker .acl-picker-options>label.acl-picker-option {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 9px;
|
||||||
|
margin: 0;
|
||||||
|
padding: 6px 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.acl-picker .acl-picker-options {
|
||||||
|
gap: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.acl-picker .acl-picker-option-content {
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
.acl-picker-option:has(input:checked) {
|
.acl-picker-option:has(input:checked) {
|
||||||
border-color: var(--pill-live-line);
|
border-color: var(--pill-live-line);
|
||||||
background: var(--nav-selected-bg);
|
background: var(--nav-selected-bg);
|
||||||
@@ -1731,10 +1746,11 @@ html.app-loading,
|
|||||||
|
|
||||||
.acl-picker-option input[type=checkbox] {
|
.acl-picker-option input[type=checkbox] {
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
width: 16px !important;
|
width: var(--ui-check-size) !important;
|
||||||
height: 16px !important;
|
height: var(--ui-check-size) !important;
|
||||||
min-height: 16px !important;
|
min-width: var(--ui-check-size) !important;
|
||||||
margin: 2px 0 0;
|
min-height: var(--ui-check-size) !important;
|
||||||
|
margin: calc((18px - var(--ui-check-size)) / 2) 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.acl-picker-option input:disabled {
|
.acl-picker-option input:disabled {
|
||||||
@@ -1760,8 +1776,13 @@ html.app-loading,
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.acl-picker-option-heading {
|
||||||
|
min-height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
.acl-picker-option-heading strong {
|
.acl-picker-option-heading strong {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
line-height: 18px;
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
@@ -1954,6 +1975,7 @@ html.app-loading,
|
|||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fine+:is(.switch-grid, .settings-tabs, .table-scroll, .soft-card, .appearance-settings-grid, .runtime-information-grid, details),
|
.fine+:is(.switch-grid, .settings-tabs, .table-scroll, .soft-card, .appearance-settings-grid, .runtime-information-grid, details),
|
||||||
.form-actions+.fine,
|
.form-actions+.fine,
|
||||||
.table-scroll+:is(.empty, .fine),
|
.table-scroll+:is(.empty, .fine),
|
||||||
@@ -2025,18 +2047,97 @@ h2+.fine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 761px) { .redirect-card .vhost-card-head { align-items: center; } }
|
@media (min-width: 761px) {
|
||||||
.redirect-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr); gap: 12px; align-items: center; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--rp-radius-surface, 0); background: var(--bg); }
|
.redirect-card .vhost-card-head {
|
||||||
.redirect-flow-from, .redirect-flow-to { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; align-items: center; }
|
align-items: center;
|
||||||
.redirect-flow-to { flex-direction: column; align-items: flex-start; gap: 3px; }
|
}
|
||||||
.redirect-flow-arrow { color: var(--muted); font-size: 16px; line-height: 1; }
|
|
||||||
.redirect-host-chip { max-width: 100%; padding: 2px 6px; border: 1px solid var(--line); border-radius: var(--rp-radius-control, 0); font: 11px/1.45 var(--mono); color: var(--text); overflow-wrap: anywhere; }
|
|
||||||
.redirect-target { font: 12px/1.45 var(--mono); font-weight: 600; color: var(--green); overflow-wrap: anywhere; min-width: 0; }
|
|
||||||
.redirect-target-more { font-size: 11px; color: var(--muted); }
|
|
||||||
.redirect-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; font-size: 11px; color: var(--muted); }
|
|
||||||
.redirect-meta-item { display: inline-flex; gap: 6px; min-width: 0; }
|
|
||||||
.redirect-meta-item b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
|
|
||||||
@media (max-width: 760px) {
|
|
||||||
.redirect-flow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
|
|
||||||
.redirect-flow-arrow { transform: rotate(90deg); justify-self: start; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.redirect-flow {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr);
|
||||||
|
gap: 12px;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 12px;
|
||||||
|
padding: 10px 12px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
border-radius: var(--rp-radius-surface, 0);
|
||||||
|
background: var(--bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-flow-from,
|
||||||
|
.redirect-flow-to {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
min-width: 0;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-flow-to {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-flow-arrow {
|
||||||
|
color: var(--muted);
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-host-chip {
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 2px 6px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
border-radius: var(--rp-radius-control, 0);
|
||||||
|
font: 11px/1.45 var(--mono);
|
||||||
|
color: var(--text);
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-target {
|
||||||
|
font: 12px/1.45 var(--mono);
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--green);
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-target-more {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-meta {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 4px 18px;
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-meta-item {
|
||||||
|
display: inline-flex;
|
||||||
|
gap: 6px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-meta-item b {
|
||||||
|
color: var(--text);
|
||||||
|
font-weight: 600;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 760px) {
|
||||||
|
.redirect-flow {
|
||||||
|
grid-template-columns: minmax(0, 1fr);
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.redirect-flow-arrow {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
justify-self: start;
|
||||||
|
}
|
||||||
|
}
|
||||||
+1595
-235
File diff suppressed because it is too large.
Load diff
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
@media (min-width:1201px) {
|
@media (min-width:1201px) {
|
||||||
#panel-overview .stats-grid {
|
#panel-overview .stats-grid {
|
||||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||||
@@ -117,6 +116,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:900px) {
|
@media (max-width:900px) {
|
||||||
|
|
||||||
.logging-builder-layout,
|
.logging-builder-layout,
|
||||||
.logging-format-actions,
|
.logging-format-actions,
|
||||||
.acl-policy-custom-controls,
|
.acl-policy-custom-controls,
|
||||||
@@ -405,6 +405,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:700px) {
|
@media (max-width:700px) {
|
||||||
|
|
||||||
#panel-tls .certificate-operation-heading,
|
#panel-tls .certificate-operation-heading,
|
||||||
#panel-tls .certificate-subheading,
|
#panel-tls .certificate-subheading,
|
||||||
#panel-tls .certificate-workspace-heading,
|
#panel-tls .certificate-workspace-heading,
|
||||||
@@ -762,6 +763,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:640px) {
|
@media (max-width:640px) {
|
||||||
|
|
||||||
.acl-rule,
|
.acl-rule,
|
||||||
.basic-user {
|
.basic-user {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
@@ -847,7 +849,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb b,
|
.breadcrumb b,
|
||||||
.nav span {
|
.nav span {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1065,6 +1067,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width:760px) {
|
@media (max-width:760px) {
|
||||||
|
|
||||||
.redirect-card .vhost-detail-strip,
|
.redirect-card .vhost-detail-strip,
|
||||||
.redirect-rule .vh-grid,
|
.redirect-rule .vh-grid,
|
||||||
.listener-choices,
|
.listener-choices,
|
||||||
@@ -1554,6 +1557,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion:reduce) {
|
@media (prefers-reduced-motion:reduce) {
|
||||||
|
|
||||||
.docker-publish-field .docker-publish,
|
.docker-publish-field .docker-publish,
|
||||||
.docker-publish-field .docker-publish::before,
|
.docker-publish-field .docker-publish::before,
|
||||||
#panel-overview .overview-meter-fill,
|
#panel-overview .overview-meter-fill,
|
||||||
@@ -1736,63 +1740,286 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.docker-service-editor:not(.docker-service-metrics)>summary,
|
.docker-service-editor:not(.docker-service-metrics)>summary,
|
||||||
.docker-health-editor>summary, .docker-acl-editor>summary, .docker-protocol-editor>summary, .docker-timeout-editor>summary, .docker-passive-health-editor>summary {
|
.docker-health-editor>summary,
|
||||||
|
.docker-acl-editor>summary,
|
||||||
|
.docker-cache-editor>summary,
|
||||||
|
.docker-protocol-editor>summary,
|
||||||
|
.docker-timeout-editor>summary,
|
||||||
|
.docker-passive-health-editor>summary {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
.docker-service-editor>summary::-webkit-details-marker, .docker-health-editor>summary::-webkit-details-marker, .docker-acl-editor>summary::-webkit-details-marker,
|
|
||||||
.docker-protocol-editor>summary::-webkit-details-marker, .docker-timeout-editor>summary::-webkit-details-marker, .docker-passive-health-editor>summary::-webkit-details-marker { display: none; }
|
.docker-service-editor>summary::-webkit-details-marker,
|
||||||
.docker-service-editor>summary::before, .docker-health-editor>summary::before, .docker-acl-editor>summary::before,
|
.docker-health-editor>summary::-webkit-details-marker,
|
||||||
.docker-protocol-editor>summary::before, .docker-timeout-editor>summary::before, .docker-passive-health-editor>summary::before {
|
.docker-acl-editor>summary::-webkit-details-marker,
|
||||||
content: "›"; display: inline-block; width: 14px; flex: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1; transition: transform .15s ease;
|
.docker-cache-editor>summary::-webkit-details-marker,
|
||||||
|
.docker-protocol-editor>summary::-webkit-details-marker,
|
||||||
|
.docker-timeout-editor>summary::-webkit-details-marker,
|
||||||
|
.docker-passive-health-editor>summary::-webkit-details-marker {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
.docker-service-editor[open]>summary::before, .docker-health-editor[open]>summary::before, .docker-acl-editor[open]>summary::before,
|
|
||||||
.docker-protocol-editor[open]>summary::before, .docker-timeout-editor[open]>summary::before, .docker-passive-health-editor[open]>summary::before { transform: rotate(90deg); color: var(--text); }
|
.docker-service-editor>summary::before,
|
||||||
.docker-service-editor>summary>span { flex: 0 0 auto; }
|
.docker-health-editor>summary::before,
|
||||||
.docker-service-editor>summary .docker-config-hint { flex: 1; min-width: 0; }
|
.docker-acl-editor>summary::before,
|
||||||
.docker-service-editor:not(.docker-service-metrics)>summary:hover>span { color: var(--green); }
|
.docker-cache-editor>summary::before,
|
||||||
.docker-service-editor[open]:not(.docker-service-metrics) { border: 1px solid var(--line); border-radius: var(--rp-radius-surface, 6px); background: var(--panel2); padding: 10px 12px 12px; }
|
.docker-protocol-editor>summary::before,
|
||||||
|
.docker-timeout-editor>summary::before,
|
||||||
|
.docker-passive-health-editor>summary::before {
|
||||||
|
content: "›";
|
||||||
|
display: inline-block;
|
||||||
|
width: 14px;
|
||||||
|
flex: 0 0 14px;
|
||||||
|
color: var(--muted);
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1;
|
||||||
|
transition: transform .15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docker-service-editor[open]>summary::before,
|
||||||
|
.docker-health-editor[open]>summary::before,
|
||||||
|
.docker-acl-editor[open]>summary::before,
|
||||||
|
.docker-cache-editor[open]>summary::before,
|
||||||
|
.docker-protocol-editor[open]>summary::before,
|
||||||
|
.docker-timeout-editor[open]>summary::before,
|
||||||
|
.docker-passive-health-editor[open]>summary::before {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.docker-service-editor>summary>span {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docker-service-editor>summary .docker-config-hint {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docker-service-editor:not(.docker-service-metrics)>summary:hover>span {
|
||||||
|
color: var(--green);
|
||||||
|
}
|
||||||
|
|
||||||
|
.docker-service-editor[open]:not(.docker-service-metrics) {
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
border-radius: var(--rp-radius-surface, 6px);
|
||||||
|
background: var(--panel2);
|
||||||
|
padding: 10px 12px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.docker-service-editor[open]:not(.docker-service-metrics)>.docker-health-editor,
|
.docker-service-editor[open]:not(.docker-service-metrics)>.docker-health-editor,
|
||||||
.docker-service-editor[open]:not(.docker-service-metrics)>.docker-acl-editor,
|
.docker-service-editor[open]:not(.docker-service-metrics)>.docker-acl-editor,
|
||||||
|
.docker-service-editor[open]:not(.docker-service-metrics)>.docker-cache-editor,
|
||||||
.docker-service-editor[open]:not(.docker-service-metrics)>.docker-protocol-editor,
|
.docker-service-editor[open]:not(.docker-service-metrics)>.docker-protocol-editor,
|
||||||
.docker-service-editor[open]:not(.docker-service-metrics)>.docker-timeout-editor { margin-top: 10px; }
|
.docker-service-editor[open]:not(.docker-service-metrics)>.docker-timeout-editor {
|
||||||
.docker-service-editor>summary:focus-visible, .docker-acl-editor>summary:focus-visible, .docker-protocol-editor>summary:focus-visible, .docker-timeout-editor>summary:focus-visible, .docker-health-editor>summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: var(--rp-radius-control, 0px); }
|
margin-top: 10px;
|
||||||
|
|
||||||
.vh-tabs { gap: 2px; padding: 4px 0 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
|
|
||||||
.vh-tabs button { font-size: 12px; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); margin-bottom: -1px; }
|
|
||||||
.vh-tabs button:hover { color: var(--text); background: var(--panel2); }
|
|
||||||
.vh-tabs button.active { color: var(--text); background: transparent; border-bottom-color: var(--green); font-weight: 600; }
|
|
||||||
.vh-tabs button:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
|
|
||||||
.vh-form>.card-heading { gap: 10px; align-items: center; }
|
|
||||||
.vh-form .form-actions { display: flex; gap: 8px; align-items: center; }
|
|
||||||
.vh-form .form-actions .primary { order: 0; }
|
|
||||||
.vh-form .form-actions .quiet { order: 1; }
|
|
||||||
.vh-setting-section>h3 { letter-spacing: .01em; }
|
|
||||||
.vh-tabs { flex-wrap: wrap; overflow: visible; row-gap: 0; }
|
|
||||||
@media (max-width:700px) { .vh-tabs button { font-size: 11px; padding: 7px 8px; } }
|
|
||||||
.auto-id-hint, .auto-cert-hint { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
|
|
||||||
.auto-id-reset { justify-self: start; margin-top: 3px; padding: 2px 8px; font-size: 11px; }
|
|
||||||
.auto-id-hint[hidden], .auto-cert-hint[hidden], .auto-id-reset[hidden] { display: none; }
|
|
||||||
.auto-id-field>span:first-child { color: var(--muted); }
|
|
||||||
.auto-id-field.is-compact>input { display: none; }
|
|
||||||
.auto-id-row { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 2px; }
|
|
||||||
.auto-id-value { font-family: var(--mono, monospace); font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
|
|
||||||
.auto-id-value.is-pending { color: var(--muted); font-style: italic; font-family: inherit; font-size: 12px; }
|
|
||||||
.auto-id-badge { display: inline-flex; align-items: center; padding: 2px 6px; border: 1px solid var(--pill-line); border-radius: var(--rp-radius-control, 0); color: var(--accent); font: 9px var(--mono); letter-spacing: 1px; text-transform: uppercase; }
|
|
||||||
.auto-id-change { padding: 2px 8px; font-size: 11px; margin-left: auto; }
|
|
||||||
.auto-id-row[hidden], .auto-id-change[hidden], .auto-id-badge[hidden] { display: none; }
|
|
||||||
.auto-id-field input { font-family: var(--mono, monospace); font-size: 12px; }
|
|
||||||
|
|
||||||
.docker-service-editor>summary, .docker-health-editor>summary, .docker-acl-editor>summary,
|
|
||||||
.docker-protocol-editor>summary, .docker-timeout-editor>summary, .docker-passive-health-editor>summary {
|
|
||||||
justify-content: flex-start; text-align: left;
|
|
||||||
}
|
}
|
||||||
.docker-service-editor>summary>span, .docker-health-editor>summary>span, .docker-acl-editor>summary>span,
|
|
||||||
.docker-protocol-editor>summary>span, .docker-timeout-editor>summary>span, .docker-passive-health-editor>summary>span { text-align: left; }
|
.docker-service-editor>summary:focus-visible,
|
||||||
.docker-service-editor>summary .docker-config-hint, .docker-health-editor>summary>small, .docker-acl-editor>summary>small,
|
.docker-acl-editor>summary:focus-visible,
|
||||||
.docker-protocol-editor>summary>small, .docker-timeout-editor>summary>small, .docker-passive-health-editor>summary>small {
|
.docker-cache-editor>summary:focus-visible,
|
||||||
flex: 1 1 auto; min-width: 0; text-align: left;
|
.docker-protocol-editor>summary:focus-visible,
|
||||||
|
.docker-timeout-editor>summary:focus-visible,
|
||||||
|
.docker-health-editor>summary:focus-visible {
|
||||||
|
outline: 2px solid var(--green);
|
||||||
|
outline-offset: 2px;
|
||||||
|
border-radius: var(--rp-radius-control, 0px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vh-tabs {
|
||||||
|
gap: 2px;
|
||||||
|
padding: 4px 0 0;
|
||||||
|
border-bottom: 1px solid var(--line);
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-tabs button {
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
border: 0;
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
border-radius: 0;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--muted);
|
||||||
|
margin-bottom: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-tabs button:hover {
|
||||||
|
color: var(--text);
|
||||||
|
background: var(--panel2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-tabs button.active {
|
||||||
|
color: var(--text);
|
||||||
|
background: transparent;
|
||||||
|
border-bottom-color: var(--green);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-tabs button:focus-visible {
|
||||||
|
outline: 2px solid var(--green);
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-form>.card-heading {
|
||||||
|
gap: 10px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-form .form-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-form .form-actions .primary {
|
||||||
|
order: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-form .form-actions .quiet {
|
||||||
|
order: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-setting-section>h3 {
|
||||||
|
letter-spacing: .01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-tabs {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
overflow: visible;
|
||||||
|
row-gap: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width:700px) {
|
||||||
|
.vh-tabs button {
|
||||||
|
font-size: 11px;
|
||||||
|
padding: 7px 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-hint,
|
||||||
|
.auto-cert-hint {
|
||||||
|
display: block;
|
||||||
|
margin-top: 3px;
|
||||||
|
color: var(--muted);
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 1.35;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-reset {
|
||||||
|
justify-self: start;
|
||||||
|
margin-top: 3px;
|
||||||
|
padding: 2px 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-hint[hidden],
|
||||||
|
.auto-cert-hint[hidden],
|
||||||
|
.auto-id-reset[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-field>span:first-child {
|
||||||
|
color: var(--muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-field.is-compact>input {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
min-height: 32px;
|
||||||
|
padding: 0 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-value {
|
||||||
|
font-family: var(--mono, monospace);
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--text);
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-value.is-pending {
|
||||||
|
color: var(--muted);
|
||||||
|
font-style: italic;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 2px 6px;
|
||||||
|
border: 1px solid var(--pill-line);
|
||||||
|
border-radius: var(--rp-radius-control, 0);
|
||||||
|
color: var(--accent);
|
||||||
|
font: 9px var(--mono);
|
||||||
|
letter-spacing: 1px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-change {
|
||||||
|
padding: 2px 8px;
|
||||||
|
font-size: 11px;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-row[hidden],
|
||||||
|
.auto-id-change[hidden],
|
||||||
|
.auto-id-badge[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.auto-id-field input {
|
||||||
|
font-family: var(--mono, monospace);
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docker-service-editor>summary,
|
||||||
|
.docker-health-editor>summary,
|
||||||
|
.docker-acl-editor>summary,
|
||||||
|
.docker-cache-editor>summary,
|
||||||
|
.docker-protocol-editor>summary,
|
||||||
|
.docker-timeout-editor>summary,
|
||||||
|
.docker-passive-health-editor>summary {
|
||||||
|
justify-content: flex-start;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docker-service-editor>summary>span,
|
||||||
|
.docker-health-editor>summary>span,
|
||||||
|
.docker-acl-editor>summary>span,
|
||||||
|
.docker-cache-editor>summary>span,
|
||||||
|
.docker-protocol-editor>summary>span,
|
||||||
|
.docker-timeout-editor>summary>span,
|
||||||
|
.docker-passive-health-editor>summary>span {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docker-service-editor>summary .docker-config-hint,
|
||||||
|
.docker-health-editor>summary>small,
|
||||||
|
.docker-acl-editor>summary>small,
|
||||||
|
.docker-cache-editor>summary>small,
|
||||||
|
.docker-protocol-editor>summary>small,
|
||||||
|
.docker-timeout-editor>summary>small,
|
||||||
|
.docker-passive-health-editor>summary>small {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width:721px) {
|
@media (min-width:721px) {
|
||||||
.docker-service-editor>summary>span, .docker-health-editor>summary>span, .docker-acl-editor>summary>span,
|
|
||||||
.docker-protocol-editor>summary>span, .docker-timeout-editor>summary>span, .docker-passive-health-editor>summary>span { flex: 0 0 190px; }
|
.docker-service-editor>summary>span,
|
||||||
}
|
.docker-health-editor>summary>span,
|
||||||
|
.docker-acl-editor>summary>span,
|
||||||
|
.docker-cache-editor>summary>span,
|
||||||
|
.docker-protocol-editor>summary>span,
|
||||||
|
.docker-timeout-editor>summary>span,
|
||||||
|
.docker-passive-health-editor>summary>span {
|
||||||
|
flex: 0 0 190px;
|
||||||
|
}
|
||||||
|
}
|
||||||
+107
-20
@@ -146,7 +146,6 @@
|
|||||||
const ip = String(binding.bind_ip || "");
|
const ip = String(binding.bind_ip || "");
|
||||||
if (ip && ip !== "0.0.0.0" && ip !== "::" && !ip.startsWith("127.") && ip !== "::1") add(ip, `${ip} (${t("dockerBindingIp")})`);
|
if (ip && ip !== "0.0.0.0" && ip !== "::" && !ip.startsWith("127.") && ip !== "::1") add(ip, `${ip} (${t("dockerBindingIp")})`);
|
||||||
}
|
}
|
||||||
if (agent?.default_target_ip) add(agent.default_target_ip, `${agent.default_target_ip} (${t("dockerAgentDefaultIp")})`);
|
|
||||||
if (assignment?.target_ip) add(assignment.target_ip, assignment.target_ip);
|
if (assignment?.target_ip) add(assignment.target_ip, assignment.target_ip);
|
||||||
return [...byIp.entries()];
|
return [...byIp.entries()];
|
||||||
}
|
}
|
||||||
@@ -195,12 +194,22 @@
|
|||||||
if (payload?.v !== 1 || token.length < 24 || token.length > 512) throw new Error(t("dockerProvisionInvalid"));
|
if (payload?.v !== 1 || token.length < 24 || token.length > 512) throw new Error(t("dockerProvisionInvalid"));
|
||||||
return { ...base, token };
|
return { ...base, token };
|
||||||
}
|
}
|
||||||
|
function certificateNameKind(name) {
|
||||||
|
const clean = cleanDomain(name);
|
||||||
|
if (clean.startsWith("*.")) return "dockerCertNameWildcard";
|
||||||
|
if (clean.startsWith("www.")) return "dockerCertNameWww";
|
||||||
|
const agentDomainSet = new Set((cfg().agents || []).flatMap(agentDomains));
|
||||||
|
return agentDomainSet.has(clean) || clean.split(".").length === 2 ? "dockerCertNameApex" : "dockerCertNameSubdomain";
|
||||||
|
}
|
||||||
|
const describeCertificateName = name => `${name} (${t(certificateNameKind(name))})`;
|
||||||
function domainOptionsFor(selected) {
|
function domainOptionsFor(selected) {
|
||||||
const known = new Map(), add = (domain, detail) => { domain = cleanDomain(domain).replace(/^\*\./, ""); if (domain && domain.includes(".") && validDnsName(domain) && !known.has(domain)) known.set(domain, detail); };
|
const known = new Map(), add = (domain, detail) => { domain = cleanDomain(domain).replace(/^\*\./, ""); if (!domain || !domain.includes(".") || !validDnsName(domain)) return; const list = known.get(domain) || []; if (detail && !list.includes(detail)) list.push(detail); known.set(domain, list); };
|
||||||
for (const agent of cfg().agents || []) for (const domain of agentDomains(agent)) add(domain, `${t("dockerAgent")}: ${agent.name || agent.id}`);
|
const agentsByDomain = new Map();
|
||||||
for (const cert of envelope?.config?.tls?.certificates || []) for (const name of certificateNames(cert)) if (name.startsWith("*.")) add(name, `${t("vhCertificate")}: ${cert.id}`);
|
for (const agent of cfg().agents || []) for (const domain of agentDomains(agent)) agentsByDomain.set(domain, [...(agentsByDomain.get(domain) || []), agent.name || agent.id]);
|
||||||
|
for (const [domain, agents] of agentsByDomain) add(domain, `${t(agents.length > 1 ? "dockerAgentsShared" : "dockerAgent")}: ${agents.join(", ")}`);
|
||||||
|
for (const cert of envelope?.config?.tls?.certificates || []) for (const name of certificateNames(cert)) if (name.startsWith("*.")) add(name, `${t("vhCertificate")}: ${cert.id} (${t("dockerCertNameWildcard")})`);
|
||||||
for (const domain of selected) add(domain, "");
|
for (const domain of selected) add(domain, "");
|
||||||
return [...known.entries()].map(([id, detail]) => ({ id, title: id, detail }));
|
return [...known.entries()].map(([id, details]) => ({ id, title: id, detail: details.join(" · ") }));
|
||||||
}
|
}
|
||||||
function domainPicker(selected) {
|
function domainPicker(selected) {
|
||||||
return window.rustProxyChoicePicker.create({
|
return window.rustProxyChoicePicker.create({
|
||||||
@@ -210,7 +219,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function certificatePicker(selected) {
|
function certificatePicker(selected) {
|
||||||
const items = (envelope?.config?.tls?.certificates || []).map(cert => { const names = certificateNames(cert); return { id: cert.id, title: cert.id, detail: names.slice(0, 4).join(", ") + (names.length > 4 ? ` +${names.length - 4}` : ""), search: names.join(" "), badge: cert.issuer ? "ACME" : "", badgeClass: "is-allow" }; });
|
const items = (envelope?.config?.tls?.certificates || []).map(cert => { const names = certificateNames(cert); return { id: cert.id, title: cert.id, detail: names.slice(0, 4).map(describeCertificateName).join(", ") + (names.length > 4 ? ` +${names.length - 4}` : ""), search: names.join(" "), badge: cert.issuer ? "ACME" : "", badgeClass: "is-allow" }; });
|
||||||
return window.rustProxyChoicePicker.create({ className: "docker-agent-certificates", selected, items, limit: MAX_CERTIFICATES, unknownDetail: "dockerCertificateUnknown", labels: { choose: "dockerCertificatesChoose", selected: "dockerCertificatesSelected", none: "dockerCertificatesNone", empty: "dockerCertificatesEmpty" } });
|
return window.rustProxyChoicePicker.create({ className: "docker-agent-certificates", selected, items, limit: MAX_CERTIFICATES, unknownDetail: "dockerCertificateUnknown", labels: { choose: "dockerCertificatesChoose", selected: "dockerCertificatesSelected", none: "dockerCertificatesNone", empty: "dockerCertificatesEmpty" } });
|
||||||
}
|
}
|
||||||
function addressGroup(address, primary) {
|
function addressGroup(address, primary) {
|
||||||
@@ -309,7 +318,7 @@
|
|||||||
if (!state) { holder.hidden = true; return; }
|
if (!state) { holder.hidden = true; return; }
|
||||||
holder.hidden = false;
|
holder.hidden = false;
|
||||||
const head = el("div", undefined, "docker-agent-diagnostics-head"), inventory = state.inventory;
|
const head = el("div", undefined, "docker-agent-diagnostics-head"), inventory = state.inventory;
|
||||||
head.append(el("span", t("dockerAgentDiagnostics"), "small-label"), el("span", state.ok ? t("dockerConnected") : t("dockerError"), `pill ${state.ok ? "live" : "warn"}`.trim()), el("span", `${t("dockerLastChecked")}: ${checkedAgo(state.checked_at_unix_ms)}`, "fine"));
|
head.append(el("span", t("dockerAgentDiagnostics"), "small-label"), el("span", `${t("dockerLastChecked")}: ${checkedAgo(state.checked_at_unix_ms)}`, "fine"));
|
||||||
if (inventory) head.append(el("span", `${t("dockerHost")}: ${inventory.hostname} · ${t("dockerAgentVersion")}: ${inventory.agent_version} · ${t("dockerServices")}: ${(inventory.services || []).length}`, "fine"));
|
if (inventory) head.append(el("span", `${t("dockerHost")}: ${inventory.hostname} · ${t("dockerAgentVersion")}: ${inventory.agent_version} · ${t("dockerServices")}: ${(inventory.services || []).length}`, "fine"));
|
||||||
holder.append(head);
|
holder.append(head);
|
||||||
if (!state.ok && state.error) holder.append(el("p", state.error, "fine docker-agent-diagnostics-error"));
|
if (!state.ok && state.error) holder.append(el("p", state.error, "fine docker-agent-diagnostics-error"));
|
||||||
@@ -631,16 +640,62 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
function aclEditor(assignment, agent) {
|
function aclEditor(assignment, agent) {
|
||||||
const details = el("details", undefined, "docker-acl-editor"), summary = el("summary"); summary.append(el("span", t("dockerAccessControl")), el("small", t("dockerAclSummary"), "fine")); details.append(summary);
|
const details = el("details", undefined, "docker-acl-editor"), summary = el("summary"), state = el("small", "", "fine"); summary.append(el("span", t("dockerAccessControl")), state); details.append(summary);
|
||||||
const grid = el("div", undefined, "field-grid docker-acl-grid"), profile = profileChoices(selectedProfileIds(assignment), "docker-acl-profile");
|
const profiles = envelope?.config?.acl_profiles || [], nameOf = id => profiles.find(item => item.id === id)?.name || id;
|
||||||
const inheritedProfiles = selectedProfileIds(agent);
|
const inheritedProfiles = selectedProfileIds(agent), explicit = selectedProfileIds(assignment), inherit = assignment?.inherit_acl_profiles !== false;
|
||||||
const profileControl = profileField("dockerAclProfile", profile, inheritedProfiles.length ? `${t("dockerAclProfileInherit")}: ${inheritedProfiles.map(id => (envelope?.config?.acl_profiles || []).find(item => item.id === id)?.name || id).join(", ")}` : t("dockerAclProfileNone"));
|
const grid = el("div", undefined, "field-grid docker-acl-grid"), profile = profileChoices(explicit.length ? explicit : inherit ? inheritedProfiles : [], "docker-acl-profile");
|
||||||
profileControl.append(profileWarning(profile, inheritedProfiles.length));
|
details._inheritedProfiles = inheritedProfiles;
|
||||||
const inline = input("", "checkbox", "docker-acl-inline"); inline.checked = !!assignment?.acl; const inlineLabel = checkboxField("dockerAclInline", inline);
|
const help = el("small", "", "fine"), profileControl = el("div", undefined, "docker-field docker-profile-field");
|
||||||
|
profileControl.append(el("span", t("dockerAclProfile")), profile, help, profileWarning(profile, 0));
|
||||||
|
const publicAccess = input("", "checkbox", "docker-acl-public"); publicAccess.checked = !explicit.length && !inherit && !assignment?.acl;
|
||||||
|
const publicLabel = checkboxField("dockerAclPublic", publicAccess); publicLabel.append(el("small", t("dockerAclPublicHelp"), "fine"));
|
||||||
|
const inline = input("", "checkbox", "docker-acl-inline"); inline.checked = !!assignment?.acl; const inlineLabel = checkboxField("dockerAclInline", inline); inlineLabel.classList.add("docker-acl-inline-row");
|
||||||
const defaultAction = el("select", undefined, "docker-acl-default"); for (const value of ["deny", "allow"]) { const option = el("option", t(value)); option.value = value; defaultAction.append(option); } defaultAction.value = assignment?.acl?.default || "deny";
|
const defaultAction = el("select", undefined, "docker-acl-default"); for (const value of ["deny", "allow"]) { const option = el("option", t(value)); option.value = value; defaultAction.append(option); } defaultAction.value = assignment?.acl?.default || "deny";
|
||||||
const rules = document.createElement("textarea"); rules.className = "docker-acl-rules"; rules.rows = 4; rules.maxLength = 32768; rules.spellcheck = false; rules.value = rulesText(assignment?.acl); rules.placeholder = "allow 10.0.0.0/8\ndeny 0.0.0.0/0";
|
const rules = document.createElement("textarea"); rules.className = "docker-acl-rules"; rules.rows = 4; rules.maxLength = 32768; rules.spellcheck = false; rules.value = rulesText(assignment?.acl); rules.placeholder = "allow 10.0.0.0/8\ndeny 0.0.0.0/0";
|
||||||
const sync = () => { defaultAction.disabled = !inline.checked; rules.disabled = !inline.checked; }; inline.addEventListener("change", sync); sync();
|
const sameSet = (a, b) => a.length === b.length && a.every(id => b.includes(id));
|
||||||
grid.append(profileControl, inlineLabel, labeled("dockerAclDefault", defaultAction), labeled("dockerAclRules", rules, t("dockerAclHelp"))); details.append(grid); return details;
|
const sync = () => {
|
||||||
|
const open = !publicAccess.checked, picked = window.rustProxyAclPicker.read(profile);
|
||||||
|
profile.setDisabled?.(!open); profile.classList.toggle("is-disabled", !open); inline.disabled = !open; if (!open) inline.checked = false;
|
||||||
|
defaultAction.disabled = !open || !inline.checked; rules.disabled = !open || !inline.checked;
|
||||||
|
const inheritedText = inheritedProfiles.map(nameOf).join(", ");
|
||||||
|
help.textContent = !inheritedProfiles.length ? t("dockerAclProfileNone")
|
||||||
|
: sameSet(picked, inheritedProfiles) ? t("dockerAclInheritedActive").replace("{profiles}", inheritedText)
|
||||||
|
: t("dockerAclInheritedOverridden").replace("{profiles}", inheritedText);
|
||||||
|
state.textContent = publicAccess.checked ? t("dockerAclStatePublic")
|
||||||
|
: picked.length ? `${t("dockerAclStateProfiles")}: ${picked.map(nameOf).join(", ")}${inline.checked ? ` + ${t("dockerAclStateInline")}` : ""}`
|
||||||
|
: inline.checked ? t("dockerAclStateInline") : t("dockerAclStateNone");
|
||||||
|
};
|
||||||
|
publicAccess.addEventListener("change", () => { if (publicAccess.checked) profile.select?.([]); else if (!window.rustProxyAclPicker.read(profile).length) profile.select?.(inheritedProfiles); sync(); });
|
||||||
|
inline.addEventListener("change", sync); profile.addEventListener("change", sync); sync();
|
||||||
|
grid.append(publicLabel, profileControl, inlineLabel, labeled("dockerAclDefault", defaultAction), labeled("dockerAclRules", rules, t("dockerAclHelp"))); details.append(grid); return details;
|
||||||
|
}
|
||||||
|
function collectAcl(row) {
|
||||||
|
const editor = row.querySelector(".docker-acl-editor"), inherited = editor?._inheritedProfiles || [];
|
||||||
|
const picked = readProfileChoices(row, ".docker-acl-profile"), isPublic = row.querySelector(".docker-acl-public")?.checked === true;
|
||||||
|
if (isPublic) return { acl_profile_ids: [], inherit_acl_profiles: false };
|
||||||
|
if (inherited.length && picked.length === inherited.length && picked.every(id => inherited.includes(id))) return { acl_profile_ids: [], inherit_acl_profiles: true };
|
||||||
|
if (!picked.length) return { acl_profile_ids: [], inherit_acl_profiles: !inherited.length };
|
||||||
|
return { acl_profile_ids: picked, inherit_acl_profiles: true };
|
||||||
|
}
|
||||||
|
function cacheEditor(assignment, agent, key, enabled) {
|
||||||
|
const details = el("details", undefined, "docker-cache-editor"), summary = el("summary"); summary.append(el("span", t("dockerCacheSettings")), el("small", t("dockerCacheSettingsHelp"), "fine")); details.append(summary);
|
||||||
|
const grid = el("div", undefined, "field-grid docker-cache-grid");
|
||||||
|
const ttl = input(assignment?.cache_default_ttl_seconds ?? "", "number", "docker-cache-ttl"); ttl.min = 0; ttl.max = 31536000; ttl.placeholder = String(envelope?.config?.cache?.default_ttl_seconds ?? "");
|
||||||
|
grid.append(labeled("dockerCacheTtl", ttl, t("dockerCacheTtlHelp")));
|
||||||
|
const vhostId = poolRoutes.find(item => item.agent_id === agent.id && item.service_key === key)?.pool_id || "";
|
||||||
|
const rules = window.rustProxyCacheRules?.create?.({ scope: "vhost", vhostId, rules: assignment?.cache_rules || [], ignoreGlobal: assignment?.cache_ignore_global_rules === true, ignoreId: "" });
|
||||||
|
if (rules?.node) { rules.node.classList.add("docker-cache-rules"); details._rules = rules; }
|
||||||
|
details.append(grid); if (rules?.node) details.append(rules.node);
|
||||||
|
const sync = () => { details.hidden = !enabled.checked; }; enabled.addEventListener("change", sync); sync();
|
||||||
|
return details;
|
||||||
|
}
|
||||||
|
function collectCache(row) {
|
||||||
|
const details = row.querySelector(".docker-cache-editor"), ttl = row.querySelector(".docker-cache-ttl")?.value.trim();
|
||||||
|
return {
|
||||||
|
cache_default_ttl_seconds: ttl === "" || ttl === undefined ? null : Number(ttl),
|
||||||
|
cache_rules: details?._rules?.read?.() || [],
|
||||||
|
cache_ignore_global_rules: details?._rules?.ignoreGlobal?.() === true,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
function timeoutEditor(assignment) {
|
function timeoutEditor(assignment) {
|
||||||
const value = { ...defaultProxyTimeouts(), ...(assignment?.proxy_timeouts || {}) }, details = el("details", undefined, "docker-timeout-editor"), summary = el("summary"); summary.append(el("span", t("dockerProxyTimeouts")), el("small", t("dockerProxyTimeoutsHelp"), "fine")); details.append(summary);
|
const value = { ...defaultProxyTimeouts(), ...(assignment?.proxy_timeouts || {}) }, details = el("details", undefined, "docker-timeout-editor"), summary = el("summary"); summary.append(el("span", t("dockerProxyTimeouts")), el("small", t("dockerProxyTimeoutsHelp"), "fine")); details.append(summary);
|
||||||
@@ -655,9 +710,9 @@
|
|||||||
service_key: row.dataset.key, hostname: row.querySelector(".docker-hostname").value.trim().toLowerCase().replace(/\.$/, ""), domain: row.querySelector(".docker-master-domain")?.value || null, aliases: row._readAliases?.() || [], target_ip: row.querySelector(".docker-target-ip").value || null,
|
service_key: row.dataset.key, hostname: row.querySelector(".docker-hostname").value.trim().toLowerCase().replace(/\.$/, ""), domain: row.querySelector(".docker-master-domain")?.value || null, aliases: row._readAliases?.() || [], target_ip: row.querySelector(".docker-target-ip").value || null,
|
||||||
enabled: true, scheme: row.querySelector(".docker-scheme").value, preserve_host: row.querySelector(".docker-preserve-host").checked, force_ssl: row.querySelector(".docker-force-ssl").checked, websockets: row.querySelector(".docker-websockets").checked, http2_enabled: row.querySelector(".docker-http2-enabled").checked, http3_enabled: row.querySelector(".docker-http3-enabled").checked, cache_enabled: row.querySelector(".docker-cache-enabled").checked, transform_enabled: row.querySelector(".docker-transform-enabled").checked, compression_enabled: row.querySelector(".docker-compression-enabled").checked,
|
enabled: true, scheme: row.querySelector(".docker-scheme").value, preserve_host: row.querySelector(".docker-preserve-host").checked, force_ssl: row.querySelector(".docker-force-ssl").checked, websockets: row.querySelector(".docker-websockets").checked, http2_enabled: row.querySelector(".docker-http2-enabled").checked, http3_enabled: row.querySelector(".docker-http3-enabled").checked, cache_enabled: row.querySelector(".docker-cache-enabled").checked, transform_enabled: row.querySelector(".docker-transform-enabled").checked, compression_enabled: row.querySelector(".docker-compression-enabled").checked,
|
||||||
compression_zstd: null, compression_br: null, compression_gzip: null, compression_deflate: null,
|
compression_zstd: null, compression_br: null, compression_gzip: null, compression_deflate: null,
|
||||||
acl_profile_id: null, acl_profile_ids: readProfileChoices(row, ".docker-acl-profile"),
|
acl_profile_id: null, ...collectAcl(row), ...collectCache(row),
|
||||||
allow_certificate_mismatch: row.querySelector(".docker-cert-mismatch")?.checked === true,
|
allow_certificate_mismatch: row.querySelector(".docker-cert-mismatch")?.checked === true,
|
||||||
acl: inline ? { default: row.querySelector(".docker-acl-default").value, rules: parseRules(row.querySelector(".docker-acl-rules").value) } : null,
|
acl: inline && row.querySelector(".docker-acl-public")?.checked !== true ? { default: row.querySelector(".docker-acl-default").value, rules: parseRules(row.querySelector(".docker-acl-rules").value) } : null,
|
||||||
proxy_timeouts: { connect_timeout_seconds: Number(row.querySelector(".docker-proxy-connect").value), response_header_timeout_seconds: Number(row.querySelector(".docker-proxy-header").value), read_timeout_seconds: Number(row.querySelector(".docker-proxy-read").value), send_timeout_seconds: Number(row.querySelector(".docker-proxy-send").value) },
|
proxy_timeouts: { connect_timeout_seconds: Number(row.querySelector(".docker-proxy-connect").value), response_header_timeout_seconds: Number(row.querySelector(".docker-proxy-header").value), read_timeout_seconds: Number(row.querySelector(".docker-proxy-read").value), send_timeout_seconds: Number(row.querySelector(".docker-proxy-send").value) },
|
||||||
health_check: collectHealth(row), passive_health: collectPassiveHealth(row)
|
health_check: collectHealth(row), passive_health: collectPassiveHealth(row)
|
||||||
};
|
};
|
||||||
@@ -804,7 +859,7 @@
|
|||||||
protocolOptions.append(h1, checkboxField("dockerHttp2Enabled", h2Enabled), checkboxField("dockerHttp3Enabled", h3Enabled));
|
protocolOptions.append(h1, checkboxField("dockerHttp2Enabled", h2Enabled), checkboxField("dockerHttp3Enabled", h3Enabled));
|
||||||
protocolBox.append(protocolSummary, protocolOptions);
|
protocolBox.append(protocolSummary, protocolOptions);
|
||||||
route.append(hostField, aliases.node, backendIpSettings, labeled("dockerBackendScheme", scheme), switches); syncHostHelp();
|
route.append(hostField, aliases.node, backendIpSettings, labeled("dockerBackendScheme", scheme), switches); syncHostHelp();
|
||||||
editor.append(route, protocolBox, aclEditor(assignment, agent), timeoutEditor(assignment), healthEditor(assignment), passiveHealthEditor(assignment));
|
editor.append(route, protocolBox, aclEditor(assignment, agent), cacheEditor(assignment, agent, key, cacheEnabled), timeoutEditor(assignment), healthEditor(assignment), passiveHealthEditor(assignment));
|
||||||
const actions = el("div", undefined, "docker-service-actions"), apply = el("button", t("dockerApplyService"), "outline docker-apply"); apply.type = "button"; apply.disabled = !publish.checked; apply.addEventListener("click", async () => { apply.disabled = true; try { await saveAssignment(agent.id, row, true); } catch (error) { toast(error.message, true); } finally { if (row.isConnected) apply.disabled = !publish.checked; } }); actions.append(apply); editor.append(actions); row.append(editor);
|
const actions = el("div", undefined, "docker-service-actions"), apply = el("button", t("dockerApplyService"), "outline docker-apply"); apply.type = "button"; apply.disabled = !publish.checked; apply.addEventListener("click", async () => { apply.disabled = true; try { await saveAssignment(agent.id, row, true); } catch (error) { toast(error.message, true); } finally { if (row.isConnected) apply.disabled = !publish.checked; } }); actions.append(apply); editor.append(actions); row.append(editor);
|
||||||
if (agent.enabled !== false && assignment && assignment.enabled !== false) row.append(statisticsSection(agent, key));
|
if (agent.enabled !== false && assignment && assignment.enabled !== false) row.append(statisticsSection(agent, key));
|
||||||
function updateHint() { syncCertificateHint(); const targetLabel = target.selectedOptions?.[0]?.textContent || t("dockerBackendIpAuto"), aliasCount = aliases.count(); editorHint.textContent = `${expandedHost(host.value.trim() || technical, domainSelect.value) || host.value.trim() || technical} → ${scheme.value.toUpperCase()} · ${targetLabel} · H1${h2Enabled.checked ? "/H2" : ""}${h3Enabled.checked ? "/H3" : ""}${aliasCount ? ` · +${aliasCount} ${t("dockerAliasesShort")}` : ""}`; } updateHint();
|
function updateHint() { syncCertificateHint(); const targetLabel = target.selectedOptions?.[0]?.textContent || t("dockerBackendIpAuto"), aliasCount = aliases.count(); editorHint.textContent = `${expandedHost(host.value.trim() || technical, domainSelect.value) || host.value.trim() || technical} → ${scheme.value.toUpperCase()} · ${targetLabel} · H1${h2Enabled.checked ? "/H2" : ""}${h3Enabled.checked ? "/H3" : ""}${aliasCount ? ` · +${aliasCount} ${t("dockerAliasesShort")}` : ""}`; } updateHint();
|
||||||
@@ -854,14 +909,45 @@
|
|||||||
box.append(agentDetails);
|
box.append(agentDetails);
|
||||||
const rows = el("div", undefined, "docker-service-list"), assignments = new Map((agent.assignments || []).map(item => [item.service_key, item]));
|
const rows = el("div", undefined, "docker-service-list"), assignments = new Map((agent.assignments || []).map(item => [item.service_key, item]));
|
||||||
for (const route of poolRoutes) if (route.agent_id === agent.id && route.source === "labels" && route.assignment && !assignments.has(route.service_key)) assignments.set(route.service_key, { ...route.assignment, from_labels: true });
|
for (const route of poolRoutes) if (route.agent_id === agent.id && route.source === "labels" && route.assignment && !assignments.has(route.service_key)) assignments.set(route.service_key, { ...route.assignment, from_labels: true });
|
||||||
for (const service of inv.services || []) rows.append(assignmentRow(agent, inv, service, assignments.get(service.key), false)); for (const item of agent.assignments || []) if (!(inv.services || []).some(service => service.key === item.service_key)) rows.append(assignmentRow(agent, inv, null, item, true)); if (!rows.children.length) rows.append(el("p", t("dockerNoPublishedPorts"), "empty")); box.append(rows); target.append(box);
|
for (const service of inv.services || []) rows.append(assignmentRow(agent, inv, service, assignments.get(service.key), false)); for (const item of agent.assignments || []) if (!(inv.services || []).some(service => service.key === item.service_key)) rows.append(assignmentRow(agent, inv, null, item, true)); if (!rows.children.length) rows.append(el("p", t("dockerNoPublishedPorts"), "empty")); groupServiceRows(agent, rows); box.append(rows); target.append(box);
|
||||||
}
|
}
|
||||||
applyViewFilters();
|
applyViewFilters();
|
||||||
renderDockerMetrics();
|
renderDockerMetrics();
|
||||||
}
|
}
|
||||||
|
function serviceGroup(key) {
|
||||||
|
const compose = /^compose:([^/]+)\//.exec(key || ""); if (compose) return { id: `compose:${compose[1]}`, name: compose[1], type: "compose" };
|
||||||
|
const container = /^container:(.+):\d+\/[a-z]+$/.exec(key || ""); if (container) return { id: `container:${container[1]}`, name: container[1], type: "container" };
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const GROUP_STATE_KEY = "rustproxy.docker.collapsedGroups";
|
||||||
|
function collapsedGroups() { try { return new Set(JSON.parse(localStorage.getItem(GROUP_STATE_KEY) || "[]")); } catch { return new Set(); } }
|
||||||
|
function saveCollapsedGroups(set) { try { localStorage.setItem(GROUP_STATE_KEY, JSON.stringify([...set].slice(-256))); } catch { } }
|
||||||
|
function groupServiceRows(agent, holder) {
|
||||||
|
const rows = [...holder.querySelectorAll(":scope > .docker-service-row")], buckets = new Map();
|
||||||
|
for (const row of rows) { const group = serviceGroup(row.dataset.key); if (!group) continue; if (!buckets.has(group.id)) buckets.set(group.id, { group, rows: [] }); buckets.get(group.id).rows.push(row); }
|
||||||
|
const collapsed = collapsedGroups();
|
||||||
|
for (const { group, rows: members } of buckets.values()) {
|
||||||
|
if (members.length < 2) continue;
|
||||||
|
const stateKey = `${agent.id}|${group.id}`, box = el("details", undefined, "docker-service-group"), summary = el("summary"), body = el("div", undefined, "docker-service-group-rows");
|
||||||
|
box.open = !collapsed.has(stateKey); box.dataset.groupKey = stateKey;
|
||||||
|
const published = members.filter(row => row.dockerSort?.published === 0).length;
|
||||||
|
const hosts = members.filter(row => row.dockerSort?.published === 0).map(row => { try { return new URL(row.querySelector(".docker-open-app")?.href || "").host; } catch { return row.querySelector(".docker-hostname")?.value?.trim(); } }).filter(Boolean);
|
||||||
|
summary.append(el("span", group.type === "compose" ? "Compose" : t("dockerGroupContainer"), "pill"), el("strong", group.name), el("span", t("dockerGroupCount").replace("{count}", members.length).replace("{published}", published), "fine"));
|
||||||
|
if (hosts.length) summary.append(el("span", hosts.slice(0, 4).join(", ") + (hosts.length > 4 ? " …" : ""), "fine docker-service-group-hosts"));
|
||||||
|
box.append(summary, body); members[0].before(box); body.append(...members);
|
||||||
|
box.dockerSort = members[0].dockerSort;
|
||||||
|
box.addEventListener("toggle", () => { const set = collapsedGroups(); if (box.open) set.delete(stateKey); else set.add(stateKey); saveCollapsedGroups(set); });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function sortRowsIn(holder) {
|
||||||
|
const rows = [...holder.querySelectorAll(":scope > .docker-service-row")];
|
||||||
|
rows.sort((left, right) => { const a = left.dockerSort?.[listPrefs.sort] ?? "", b = right.dockerSort?.[listPrefs.sort] ?? ""; const result = typeof a === "number" && typeof b === "number" ? a - b : String(a).localeCompare(String(b), locale(), { numeric: true, sensitivity: "base" }); return listPrefs.descending ? -result : result; });
|
||||||
|
for (const row of rows) holder.append(row);
|
||||||
|
}
|
||||||
function sortServiceRows(card) {
|
function sortServiceRows(card) {
|
||||||
const holder = card.querySelector(".docker-service-list"); if (!holder) return;
|
const holder = card.querySelector(".docker-service-list"); if (!holder) return;
|
||||||
const rows = [...holder.querySelectorAll(":scope > .docker-service-row")];
|
for (const group of holder.querySelectorAll(":scope > .docker-service-group")) { const body = group.querySelector(".docker-service-group-rows"); sortRowsIn(body); group.dockerSort = body.querySelector(".docker-service-row")?.dockerSort; }
|
||||||
|
const rows = [...holder.querySelectorAll(":scope > .docker-service-row, :scope > .docker-service-group")];
|
||||||
rows.sort((left, right) => { const a = left.dockerSort?.[listPrefs.sort] ?? "", b = right.dockerSort?.[listPrefs.sort] ?? ""; const result = typeof a === "number" && typeof b === "number" ? a - b : String(a).localeCompare(String(b), locale(), { numeric: true, sensitivity: "base" }); return listPrefs.descending ? -result : result; });
|
rows.sort((left, right) => { const a = left.dockerSort?.[listPrefs.sort] ?? "", b = right.dockerSort?.[listPrefs.sort] ?? ""; const result = typeof a === "number" && typeof b === "number" ? a - b : String(a).localeCompare(String(b), locale(), { numeric: true, sensitivity: "base" }); return listPrefs.descending ? -result : result; });
|
||||||
for (const row of rows) holder.append(row);
|
for (const row of rows) holder.append(row);
|
||||||
}
|
}
|
||||||
@@ -879,6 +965,7 @@
|
|||||||
row.hidden = (!showHidden && viewHidden) || !matches;
|
row.hidden = (!showHidden && viewHidden) || !matches;
|
||||||
if (!row.hidden) visible += 1;
|
if (!row.hidden) visible += 1;
|
||||||
}
|
}
|
||||||
|
for (const group of card.querySelectorAll(".docker-service-group")) group.hidden = ![...group.querySelectorAll(".docker-service-row")].some(row => !row.hidden);
|
||||||
card.hidden = rows.length ? visible === 0 : (!!query && !(card.dataset.searchText || "").includes(query));
|
card.hidden = rows.length ? visible === 0 : (!!query && !(card.dataset.searchText || "").includes(query));
|
||||||
}
|
}
|
||||||
const hideDisabled = $("docker-hide-disabled");
|
const hideDisabled = $("docker-hide-disabled");
|
||||||
|
|||||||
@@ -155,6 +155,11 @@
|
|||||||
<input id="overview-inline-autofit" type="checkbox" checked>
|
<input id="overview-inline-autofit" type="checkbox" checked>
|
||||||
<span data-i18n="overviewLayoutAutoFit">Fit to screen</span>
|
<span data-i18n="overviewLayoutAutoFit">Fit to screen</span>
|
||||||
</label>
|
</label>
|
||||||
|
<label class="overview-inline-autofit" id="overview-inline-manual-label"
|
||||||
|
title="Blocks stay in place while dragging; the drop position is only marked">
|
||||||
|
<input id="overview-inline-manual" type="checkbox">
|
||||||
|
<span data-i18n="overviewLayoutManual">Arrange manually</span>
|
||||||
|
</label>
|
||||||
<button class="quiet" id="overview-inline-cancel" type="button"
|
<button class="quiet" id="overview-inline-cancel" type="button"
|
||||||
data-i18n="overviewLayoutInlineCancel">Cancel changes</button>
|
data-i18n="overviewLayoutInlineCancel">Cancel changes</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -2054,6 +2059,9 @@
|
|||||||
tabindex="-1" type="button"></button><button aria-controls="settings-page-prometheus"
|
tabindex="-1" type="button"></button><button aria-controls="settings-page-prometheus"
|
||||||
aria-selected="false" data-i18n="prometheusTitle" data-settings-tab="prometheus"
|
aria-selected="false" data-i18n="prometheusTitle" data-settings-tab="prometheus"
|
||||||
id="settings-tab-prometheus" role="tab" tabindex="-1" type="button"></button><button
|
id="settings-tab-prometheus" role="tab" tabindex="-1" type="button"></button><button
|
||||||
|
aria-controls="settings-page-alerts" aria-selected="false" data-i18n="alertSettingsTitle"
|
||||||
|
data-settings-tab="alerts" id="settings-tab-alerts" role="tab" tabindex="-1"
|
||||||
|
type="button"></button><button
|
||||||
aria-controls="settings-page-administration" aria-selected="false"
|
aria-controls="settings-page-administration" aria-selected="false"
|
||||||
data-i18n="administration" data-settings-tab="administration"
|
data-i18n="administration" data-settings-tab="administration"
|
||||||
id="settings-tab-administration" role="tab" tabindex="-1" type="button"></button><button
|
id="settings-tab-administration" role="tab" tabindex="-1" type="button"></button><button
|
||||||
@@ -2546,10 +2554,9 @@
|
|||||||
<option value="allow" data-i18n="locationMethodAllow">Allow listed
|
<option value="allow" data-i18n="locationMethodAllow">Allow listed
|
||||||
only</option>
|
only</option>
|
||||||
</select></label>
|
</select></label>
|
||||||
<label><span data-i18n="globalMethodList">Methods (comma, space or newline
|
<div class="settings-chip-field"><span data-i18n="globalMethodList">HTTP methods</span><textarea id="global-method-list" rows="2"
|
||||||
separated)</span><textarea id="global-method-list" rows="2"
|
|
||||||
maxlength="1024" spellcheck="false"
|
maxlength="1024" spellcheck="false"
|
||||||
placeholder="TRACE, TRACK"></textarea></label>
|
placeholder="TRACE, TRACK"></textarea></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="global-policy-section">
|
<section class="global-policy-section">
|
||||||
@@ -3421,6 +3428,72 @@
|
|||||||
<pre class="metrics-preview" hidden="" id="prom-preview-output"></pre>
|
<pre class="metrics-preview" hidden="" id="prom-preview-output"></pre>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<div aria-labelledby="settings-tab-alerts" class="settings-page"
|
||||||
|
data-settings-page="alerts" hidden="" id="settings-page-alerts" role="tabpanel">
|
||||||
|
<form class="card edit-form" id="alerts-form">
|
||||||
|
<div class="card-heading">
|
||||||
|
<h2 data-i18n="alertSettingsTitle">Alerts</h2><span class="pill live"
|
||||||
|
data-i18n="hotApply">LIVE APPLY</span>
|
||||||
|
</div>
|
||||||
|
<p class="fine" data-i18n="alertSettingsHelp">Alerts computed from the current state.</p>
|
||||||
|
<p class="docs-links"><a class="docs-link" data-i18n="alertSettingsDocs"
|
||||||
|
href="/docs#doc=docs%2FMONITORING.md&section=alerts" rel="noopener noreferrer"
|
||||||
|
target="_blank">Documentation</a></p>
|
||||||
|
<section class="settings-section">
|
||||||
|
<h3 class="subheading" data-i18n="alertSettingsGeneral">General</h3>
|
||||||
|
<div class="switch-grid">
|
||||||
|
<label class="check"><input id="alerts-enabled" type="checkbox" /><span
|
||||||
|
data-i18n="alertSettingsEnabled">Alerts enabled</span></label>
|
||||||
|
<label class="check"><input id="alerts-notifications" type="checkbox" /><span
|
||||||
|
data-i18n="alertSettingsNotifications">Show notifications for new alerts</span></label>
|
||||||
|
</div>
|
||||||
|
<p class="fine" id="alerts-active" role="status"></p>
|
||||||
|
</section>
|
||||||
|
<section class="settings-section alerts-settings-group">
|
||||||
|
<h3 class="subheading" data-i18n="alertSettingsCertificates">Certificates</h3>
|
||||||
|
<label class="check"><input id="alerts-certificate-expiry" type="checkbox" /><span
|
||||||
|
data-i18n="alertSettingsCertificateExpiry">Expired or expiring certificates</span></label>
|
||||||
|
<div class="field-grid">
|
||||||
|
<label><span data-i18n="alertSettingsWarningDays">Warning (days before expiry)</span><input
|
||||||
|
id="alerts-certificate-warning" max="90" min="1" type="number" /></label>
|
||||||
|
<label><span data-i18n="alertSettingsErrorDays">Error (days before expiry)</span><input
|
||||||
|
id="alerts-certificate-error" max="89" min="0" type="number" /></label>
|
||||||
|
</div>
|
||||||
|
<div class="switch-grid">
|
||||||
|
<label class="check"><input id="alerts-certificate-renewal" type="checkbox" /><span
|
||||||
|
data-i18n="alertSettingsRenewal">Failed ACME renewals</span></label>
|
||||||
|
<label class="check"><input id="alerts-acme-runtime" type="checkbox" /><span
|
||||||
|
data-i18n="alertSettingsAcmeRuntime">ACME environment not ready</span></label>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="settings-section alerts-settings-group">
|
||||||
|
<h3 class="subheading" data-i18n="alertSettingsResources">Resources</h3>
|
||||||
|
<label class="check"><input id="alerts-file-descriptors" type="checkbox" /><span
|
||||||
|
data-i18n="alertSettingsFileDescriptors">File descriptors of RustProxy</span></label>
|
||||||
|
<div class="field-grid">
|
||||||
|
<label><span data-i18n="alertSettingsWarningPercent">Warning (% of limit)</span><input
|
||||||
|
id="alerts-fd-warning" max="99" min="50" type="number" /></label>
|
||||||
|
<label><span data-i18n="alertSettingsErrorPercent">Error (% of limit)</span><input
|
||||||
|
id="alerts-fd-error" max="100" min="51" type="number" /></label>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="settings-section alerts-settings-group">
|
||||||
|
<h3 class="subheading" data-i18n="alertSettingsConfiguration">Configuration and updates</h3>
|
||||||
|
<div class="switch-grid">
|
||||||
|
<label class="check"><input id="alerts-geoip" type="checkbox" /><span
|
||||||
|
data-i18n="alertSettingsGeoip">Country rules without a GeoIP database</span></label>
|
||||||
|
<label class="check"><input id="alerts-prometheus" type="checkbox" /><span
|
||||||
|
data-i18n="alertSettingsPrometheus">Prometheus exporter open without token</span></label>
|
||||||
|
<label class="check"><input id="alerts-update" type="checkbox" /><span
|
||||||
|
data-i18n="alertSettingsUpdate">New RustProxy version (information)</span></label>
|
||||||
|
</div>
|
||||||
|
<p class="fine"><span data-i18n="alertSettingsDockerHint">Docker alerts are configured in</span>
|
||||||
|
<a href="/settings?tab=docker-agents" data-i18n="alertSettingsDockerLink">Settings → Docker agents</a>.</p>
|
||||||
|
</section>
|
||||||
|
<div class="form-actions"><button class="primary" data-i18n="apply"
|
||||||
|
type="submit">Validate, save and apply</button></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
<div aria-labelledby="settings-tab-administration" class="settings-page"
|
<div aria-labelledby="settings-tab-administration" class="settings-page"
|
||||||
data-settings-page="administration" hidden="" id="settings-page-administration"
|
data-settings-page="administration" hidden="" id="settings-page-administration"
|
||||||
role="tabpanel">
|
role="tabpanel">
|
||||||
|
|||||||
@@ -209,6 +209,8 @@
|
|||||||
$("tls-policy-key-exchange").textContent = kxGroups.length ? `${t("tlsPqcKeyExchangeGroups")}: ${kxGroups.join(", ")}` : "";
|
$("tls-policy-key-exchange").textContent = kxGroups.length ? `${t("tlsPqcKeyExchangeGroups")}: ${kxGroups.join(", ")}` : "";
|
||||||
$("tls-policy-effective").textContent = effective.length ? `${t("tlsEffectiveCiphers")}: ${effective.join(", ")}` : "";
|
$("tls-policy-effective").textContent = effective.length ? `${t("tlsEffectiveCiphers")}: ${effective.join(", ")}` : "";
|
||||||
$("tls-policy-available").textContent = available.length ? `${t("tlsAvailableCiphers")}: ${available.join(", ")}` : "";
|
$("tls-policy-available").textContent = available.length ? `${t("tlsAvailableCiphers")}: ${available.join(", ")}` : "";
|
||||||
|
window.rustProxyTlsConfigurator?.refresh();
|
||||||
|
renderAlertSettings();
|
||||||
window.rustProxyCertificateApi?.render();
|
window.rustProxyCertificateApi?.render();
|
||||||
if (authenticated && active === "certificate-api") void window.rustProxyCertificateApi?.load?.();
|
if (authenticated && active === "certificate-api") void window.rustProxyCertificateApi?.load?.();
|
||||||
}
|
}
|
||||||
@@ -246,6 +248,38 @@
|
|||||||
const locked = !!latestStatus?.administration?.listen_locked;
|
const locked = !!latestStatus?.administration?.listen_locked;
|
||||||
next.administration = { listen: locked ? null : $("admin-listen").value.trim(), tls: $("admin-tls").checked, certificate_id: $("admin-tls").checked ? ($("admin-certificate").value || null) : null, allowed_hosts: additionalAdminHosts($("admin-hosts").value.split(/[\n,]+/), $("admin-public-origin").value.trim()), public_origin: $("admin-public-origin").value.trim() || null, session_days: Number($("admin-session-days").value), panel_compression: Object.fromEntries(["zstd", "br", "gzip"].map(codec => [codec, $(`admin-compression-${codec}`).checked])) };
|
next.administration = { listen: locked ? null : $("admin-listen").value.trim(), tls: $("admin-tls").checked, certificate_id: $("admin-tls").checked ? ($("admin-certificate").value || null) : null, allowed_hosts: additionalAdminHosts($("admin-hosts").value.split(/[\n,]+/), $("admin-public-origin").value.trim()), public_origin: $("admin-public-origin").value.trim() || null, session_days: Number($("admin-session-days").value), panel_compression: Object.fromEntries(["zstd", "br", "gzip"].map(codec => [codec, $(`admin-compression-${codec}`).checked])) };
|
||||||
}, "administration");
|
}, "administration");
|
||||||
|
const ALERT_DEFAULTS = { enabled: true, notifications: true, certificate_expiry: true, certificate_warning_days: 14, certificate_error_days: 3, certificate_renewal: true, acme_runtime: true, file_descriptors: true, file_descriptors_warning_percent: 80, file_descriptors_error_percent: 95, geoip: true, prometheus: true, update: true };
|
||||||
|
const ALERT_CHECKS = { "alerts-enabled": "enabled", "alerts-notifications": "notifications", "alerts-certificate-expiry": "certificate_expiry", "alerts-certificate-renewal": "certificate_renewal", "alerts-acme-runtime": "acme_runtime", "alerts-file-descriptors": "file_descriptors", "alerts-geoip": "geoip", "alerts-prometheus": "prometheus", "alerts-update": "update" };
|
||||||
|
const ALERT_NUMBERS = { "alerts-certificate-warning": "certificate_warning_days", "alerts-certificate-error": "certificate_error_days", "alerts-fd-warning": "file_descriptors_warning_percent", "alerts-fd-error": "file_descriptors_error_percent" };
|
||||||
|
function syncAlertSettings() {
|
||||||
|
const on = $("alerts-enabled").checked;
|
||||||
|
for (const id of [...Object.keys(ALERT_CHECKS), ...Object.keys(ALERT_NUMBERS)]) if (id !== "alerts-enabled") $(id).disabled = !on;
|
||||||
|
$("alerts-certificate-warning").disabled = !on || !$("alerts-certificate-expiry").checked;
|
||||||
|
$("alerts-certificate-error").disabled = !on || !$("alerts-certificate-expiry").checked;
|
||||||
|
$("alerts-fd-warning").disabled = !on || !$("alerts-file-descriptors").checked;
|
||||||
|
$("alerts-fd-error").disabled = !on || !$("alerts-file-descriptors").checked;
|
||||||
|
for (const group of document.querySelectorAll("#alerts-form .alerts-settings-group")) group.classList.toggle("is-off", !on);
|
||||||
|
}
|
||||||
|
function renderAlertSettings() {
|
||||||
|
if (!$("alerts-form")) return;
|
||||||
|
const value = { ...ALERT_DEFAULTS, ...(envelope?.config?.alerts || {}) };
|
||||||
|
if (!settingsDirty.has("alerts-form")) {
|
||||||
|
for (const [id, key] of Object.entries(ALERT_CHECKS)) $(id).checked = value[key] !== false;
|
||||||
|
for (const [id, key] of Object.entries(ALERT_NUMBERS)) $(id).value = value[key];
|
||||||
|
}
|
||||||
|
syncAlertSettings();
|
||||||
|
const active = Array.isArray(latestStatus?.alerts) ? latestStatus.alerts : null;
|
||||||
|
$("alerts-active").textContent = active === null ? "" : active.length ? t("alertsTitle").replace("{count}", active.length) + ": " + active.map(alert => window.rustProxyAlerts?.text?.(alert) || alert.kind).join(" · ") : t("appHealthAlertsNone");
|
||||||
|
}
|
||||||
|
$("alerts-form").addEventListener("change", syncAlertSettings);
|
||||||
|
bindSettingsForm("alerts-form", next => {
|
||||||
|
const value = {};
|
||||||
|
for (const [id, key] of Object.entries(ALERT_CHECKS)) value[key] = $(id).checked;
|
||||||
|
for (const [id, key] of Object.entries(ALERT_NUMBERS)) { const number = Number($(id).value); if (!Number.isInteger(number)) throw fieldError($(id), t("alertSettingsNumberInvalid")); value[key] = number; }
|
||||||
|
if (value.certificate_error_days >= value.certificate_warning_days) throw fieldError($("alerts-certificate-error"), t("alertSettingsCertificateOrder"));
|
||||||
|
if (value.file_descriptors_error_percent <= value.file_descriptors_warning_percent) throw fieldError($("alerts-fd-error"), t("alertSettingsPercentOrder"));
|
||||||
|
next.alerts = value;
|
||||||
|
}, "alerts");
|
||||||
bindSettingsForm("tls-policy-form", next => {
|
bindSettingsForm("tls-policy-form", next => {
|
||||||
if (!$("tls-policy-12").checked && !$("tls-policy-13").checked) throw fieldError($("tls-policy-12"), t("tlsPolicyVersionRequired"));
|
if (!$("tls-policy-12").checked && !$("tls-policy-13").checked) throw fieldError($("tls-policy-12"), t("tlsPolicyVersionRequired"));
|
||||||
if ($("tls-policy-pqc").checked && !$("tls-policy-13").checked) throw fieldError($("tls-policy-13"), t("tlsPqcTls13Required"));
|
if ($("tls-policy-pqc").checked && !$("tls-policy-13").checked) throw fieldError($("tls-policy-13"), t("tlsPqcTls13Required"));
|
||||||
|
|||||||
@@ -0,0 +1,167 @@
|
|||||||
|
window.rustProxyTlsConfigurator = (() => {
|
||||||
|
"use strict";
|
||||||
|
const FALLBACK = [
|
||||||
|
"TLS13_AES_256_GCM_SHA384", "TLS13_AES_128_GCM_SHA256", "TLS13_CHACHA20_POLY1305_SHA256",
|
||||||
|
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
|
||||||
|
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
|
||||||
|
];
|
||||||
|
const CLIENTS = [
|
||||||
|
{ id: "modern", tls13: true, tls12: () => true },
|
||||||
|
{ id: "safari_new", tls13: true, tls12: () => true },
|
||||||
|
{ id: "safari_old", tls13: false, tls12: suite => suite.gcm },
|
||||||
|
{ id: "android_7", tls13: false, tls12: () => true },
|
||||||
|
{ id: "android_44", tls13: false, tls12: suite => suite.gcm },
|
||||||
|
{ id: "java_11", tls13: true, tls12: () => true },
|
||||||
|
{ id: "java_8", tls13: false, tls12: suite => suite.gcm },
|
||||||
|
{ id: "openssl_111", tls13: true, tls12: () => true },
|
||||||
|
{ id: "openssl_102", tls13: false, tls12: suite => suite.gcm },
|
||||||
|
{ id: "ie11_win10", tls13: false, tls12: suite => suite.gcm },
|
||||||
|
{ id: "ie11_win7", tls13: false, tls12: suite => suite.gcm && suite.auth === "ECDSA", ecdsa: true },
|
||||||
|
{ id: "legacy", impossible: true },
|
||||||
|
];
|
||||||
|
const PRESETS = {
|
||||||
|
modern: { tls12: false, tls13: true, suites: [] },
|
||||||
|
recommended: { tls12: true, tls13: true, suites: [] },
|
||||||
|
strong: { tls12: true, tls13: true, suites: names => names.filter(name => /AES_256|CHACHA20/.test(name)) },
|
||||||
|
};
|
||||||
|
function meta(name) {
|
||||||
|
const tls13 = name.startsWith("TLS13_");
|
||||||
|
const auth = tls13 ? "*" : name.includes("_ECDSA_") ? "ECDSA" : name.includes("_RSA_") ? "RSA" : "*";
|
||||||
|
const cipher = name.includes("CHACHA20") ? "ChaCha20-Poly1305" : name.includes("AES_256_GCM") ? "AES-256-GCM" : name.includes("AES_128_GCM") ? "AES-128-GCM" : name;
|
||||||
|
const bits = cipher === "AES-128-GCM" ? 128 : 256;
|
||||||
|
return { name, tls13, auth, cipher, bits, gcm: cipher.includes("GCM"), hash: (name.match(/SHA(\d+)$/) || [])[1] ? `SHA-${name.match(/SHA(\d+)$/)[1]}` : "" };
|
||||||
|
}
|
||||||
|
function attach() {
|
||||||
|
const textarea = $("tls-policy-ciphers"), box12 = $("tls-policy-12"), box13 = $("tls-policy-13"), pqc = $("tls-policy-pqc");
|
||||||
|
if (!textarea || textarea.dataset.tlsConfigurator) return null;
|
||||||
|
textarea.dataset.tlsConfigurator = "1";
|
||||||
|
for (const id of ["tls-policy-effective", "tls-policy-available"]) { const node = $(id); if (node) node.hidden = true; }
|
||||||
|
const holder = textarea.closest("label"); if (holder) holder.hidden = true; else textarea.hidden = true;
|
||||||
|
const root = el("div", undefined, "tls-configurator");
|
||||||
|
(holder || textarea).after(root);
|
||||||
|
const presets = el("div", undefined, "tls-config-presets");
|
||||||
|
const presetButtons = Object.keys(PRESETS).map(id => { const button = el("button", t(`tlsPreset${id[0].toUpperCase()}${id.slice(1)}`), "outline"); button.type = "button"; button.dataset.preset = id; button.title = t(`tlsPreset${id[0].toUpperCase()}${id.slice(1)}Help`); return button; });
|
||||||
|
const custom = el("span", t("tlsPresetCustom"), "pill tls-config-custom");
|
||||||
|
presets.append(el("span", t("tlsPresets"), "small-label"), ...presetButtons, custom);
|
||||||
|
const layout = el("div", undefined, "tls-config-layout");
|
||||||
|
const tableWrap = el("div", undefined, "tls-config-suites"), side = el("div", undefined, "tls-config-side");
|
||||||
|
layout.append(tableWrap, side);
|
||||||
|
root.append(presets, layout, el("p", t("tlsConfiguratorHelp"), "fine"));
|
||||||
|
const available = () => { const list = latestStatus?.tls?.cipher_suites; return Array.isArray(list) && list.length ? list : FALLBACK; };
|
||||||
|
const selected = () => String(textarea.value || "").split(/[\n,]+/).map(value => value.trim()).filter(Boolean);
|
||||||
|
const effective = () => { const names = available(), chosen = selected(); return (chosen.length ? chosen : names).filter(name => names.includes(name)); };
|
||||||
|
const write = suites => {
|
||||||
|
const names = available(), all = names.every(name => suites.includes(name));
|
||||||
|
const value = all ? "" : names.filter(name => suites.includes(name)).join("\n");
|
||||||
|
if (value === textarea.value) return;
|
||||||
|
textarea.value = value;
|
||||||
|
textarea.dispatchEvent(new Event("input", { bubbles: true }));
|
||||||
|
};
|
||||||
|
function suiteTable() {
|
||||||
|
const names = available(), active = new Set(effective());
|
||||||
|
const table = el("table", undefined, "tls-config-table");
|
||||||
|
const head = el("thead"), headRow = el("tr");
|
||||||
|
for (const key of ["", "tlsSuite", "tlsSuiteAuth", "tlsSuiteCipher", "tlsSuiteBits", "tlsSuiteRating"]) headRow.append(el("th", key ? t(key) : ""));
|
||||||
|
head.append(headRow); table.append(head);
|
||||||
|
const body = el("tbody");
|
||||||
|
for (const [label, version, enabled] of [["TLS 1.3", true, box13.checked], ["TLS 1.2", false, box12.checked]]) {
|
||||||
|
const group = el("tr", undefined, "tls-config-group"), cell = el("td"); cell.colSpan = 6;
|
||||||
|
cell.append(el("strong", label), el("span", enabled ? t("tlsVersionOn") : t("tlsVersionOff"), `pill ${enabled ? "live" : ""}`.trim()));
|
||||||
|
group.append(cell); body.append(group);
|
||||||
|
for (const name of names.filter(item => meta(item).tls13 === version)) {
|
||||||
|
const info = meta(name), row = el("tr"), check = el("input"); check.type = "checkbox"; check.checked = active.has(name); check.disabled = !enabled; check.dataset.suite = name;
|
||||||
|
check.setAttribute("aria-label", name);
|
||||||
|
const first = el("td"); first.append(check);
|
||||||
|
const nameCell = el("td"); nameCell.append(el("code", name));
|
||||||
|
const rating = info.bits === 256 ? ["tlsRatingStrong", "live"] : ["tlsRatingRecommended", ""];
|
||||||
|
const ratingCell = el("td"); ratingCell.append(el("span", t(rating[0]), `pill ${rating[1]}`.trim()));
|
||||||
|
row.classList.toggle("is-off", !enabled || !check.checked);
|
||||||
|
row.append(first, nameCell, el("td", info.auth === "*" ? t("tlsSuiteAnyCert") : info.auth), el("td", info.cipher), el("td", String(info.bits)), ratingCell);
|
||||||
|
body.append(row);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
table.append(body);
|
||||||
|
table.addEventListener("change", event => {
|
||||||
|
if (!event.target.matches("input[data-suite]")) return;
|
||||||
|
const chosen = [...table.querySelectorAll("input[data-suite]:checked")].map(input => input.dataset.suite);
|
||||||
|
const off = [...table.querySelectorAll("input[data-suite]:disabled")].filter(input => active.has(input.dataset.suite)).map(input => input.dataset.suite);
|
||||||
|
write([...new Set([...chosen, ...off])]);
|
||||||
|
render();
|
||||||
|
});
|
||||||
|
return table;
|
||||||
|
}
|
||||||
|
function grade(suites) {
|
||||||
|
const hsts = envelope?.config?.global_security?.security_headers?.hsts?.enabled === true;
|
||||||
|
const tls13 = box13.checked && suites.some(name => meta(name).tls13), tls12 = box12.checked && suites.some(name => !meta(name).tls13);
|
||||||
|
const weakest = Math.min(...suites.filter(name => (meta(name).tls13 ? box13.checked : box12.checked)).map(name => meta(name).bits), 256);
|
||||||
|
const score = { protocol: tls13 ? (tls12 ? 95 : 100) : 90, exchange: pqc.checked ? 100 : 90, cipher: weakest >= 256 ? 100 : 90 };
|
||||||
|
const letter = !tls13 && !tls12 ? "-" : tls13 && hsts ? "A+" : "A";
|
||||||
|
return { letter, score, hsts, tls13, tls12 };
|
||||||
|
}
|
||||||
|
function clientState(client, suites) {
|
||||||
|
if (client.impossible) return "impossible";
|
||||||
|
const metas = suites.map(meta);
|
||||||
|
if (client.tls13 && box13.checked && metas.some(item => item.tls13)) return "ok";
|
||||||
|
if (box12.checked && metas.some(item => !item.tls13 && client.tls12(item))) return client.ecdsa ? "ecdsa" : "ok";
|
||||||
|
return "fail";
|
||||||
|
}
|
||||||
|
function summary() {
|
||||||
|
const suites = effective(), result = grade(suites);
|
||||||
|
const card = el("div", undefined, "tls-config-grade");
|
||||||
|
card.append(el("strong", result.letter, `tls-config-letter ${result.letter === "-" ? "is-bad" : ""}`.trim()));
|
||||||
|
const bars = el("div", undefined, "tls-config-bars");
|
||||||
|
for (const [key, value] of [["tlsScoreProtocol", result.score.protocol], ["tlsScoreKeyExchange", result.score.exchange], ["tlsScoreCipher", result.score.cipher]]) {
|
||||||
|
const bar = el("div", undefined, "tls-config-bar"); const meter = el("i", undefined, "pr-meter"), fill = el("b"); fill.style.width = `${value}%`; meter.append(fill);
|
||||||
|
bar.append(el("span", t(key)), meter, el("b", String(value))); bars.append(bar);
|
||||||
|
}
|
||||||
|
card.append(bars);
|
||||||
|
const checks = el("ul", undefined, "tls-config-checks");
|
||||||
|
const item = (ok, key) => { const li = el("li", t(key), ok ? "is-ok" : "is-warn"); li.prepend(el("span", ok ? "✓" : "!", "tls-config-mark")); checks.append(li); };
|
||||||
|
item(true, "tlsCheckForwardSecrecy"); item(true, "tlsCheckAead"); item(true, "tlsCheckNoLegacy");
|
||||||
|
item(result.tls13, result.tls13 ? "tlsCheckTls13" : "tlsCheckNoTls13");
|
||||||
|
item(pqc.checked, pqc.checked ? "tlsCheckPqc" : "tlsCheckNoPqc");
|
||||||
|
item(result.hsts, result.hsts ? "tlsCheckHsts" : "tlsCheckNoHsts");
|
||||||
|
const compat = el("div", undefined, "tls-config-compat");
|
||||||
|
compat.append(el("span", t("tlsCompatibility"), "small-label"));
|
||||||
|
const list = el("ul");
|
||||||
|
for (const client of CLIENTS) {
|
||||||
|
const state = clientState(client, suites), li = el("li", undefined, `is-${state}`);
|
||||||
|
li.append(el("span", { ok: "✓", ecdsa: "!", fail: "✕", impossible: "✕" }[state], "tls-config-mark"), el("span", t(`tlsClient_${client.id}`)));
|
||||||
|
if (state !== "ok") li.append(el("small", t(`tlsClientState_${state}`), "fine"));
|
||||||
|
list.append(li);
|
||||||
|
}
|
||||||
|
compat.append(list);
|
||||||
|
return [card, compat, checks, el("p", t("tlsGradeNote"), "fine")];
|
||||||
|
}
|
||||||
|
function syncPresetState() {
|
||||||
|
const chosen = selected(), names = available();
|
||||||
|
let match = "";
|
||||||
|
for (const [id, preset] of Object.entries(PRESETS)) {
|
||||||
|
const suites = typeof preset.suites === "function" ? preset.suites(names) : preset.suites;
|
||||||
|
const sameSuites = suites.length ? suites.length === chosen.length && suites.every(name => chosen.includes(name)) : !chosen.length;
|
||||||
|
if (sameSuites && preset.tls12 === box12.checked && preset.tls13 === box13.checked) match = id;
|
||||||
|
}
|
||||||
|
for (const button of presetButtons) { const on = button.dataset.preset === match; button.classList.toggle("primary", on); button.classList.toggle("outline", !on); button.setAttribute("aria-pressed", String(on)); }
|
||||||
|
custom.hidden = !!match;
|
||||||
|
}
|
||||||
|
function render() {
|
||||||
|
tableWrap.replaceChildren(suiteTable());
|
||||||
|
side.replaceChildren(...summary());
|
||||||
|
syncPresetState();
|
||||||
|
}
|
||||||
|
for (const button of presetButtons) button.addEventListener("click", () => {
|
||||||
|
const preset = PRESETS[button.dataset.preset], names = available();
|
||||||
|
box12.checked = preset.tls12; box13.checked = preset.tls13;
|
||||||
|
if (!preset.tls13) pqc.checked = false;
|
||||||
|
const suites = typeof preset.suites === "function" ? preset.suites(names) : preset.suites;
|
||||||
|
textarea.value = suites.length ? suites.join("\n") : "";
|
||||||
|
textarea.dispatchEvent(new Event("input", { bubbles: true }));
|
||||||
|
render();
|
||||||
|
});
|
||||||
|
for (const box of [box12, box13, pqc]) box.addEventListener("change", render);
|
||||||
|
render();
|
||||||
|
return { refresh: render };
|
||||||
|
}
|
||||||
|
let instance = null;
|
||||||
|
return { refresh() { if (!instance) instance = attach(); else instance.refresh(); }, meta };
|
||||||
|
})();
|
||||||
@@ -415,7 +415,7 @@ function locationsEditor(parent, values) {
|
|||||||
locationProfile.value = value.acl_profile_id || "";
|
locationProfile.value = value.acl_profile_id || "";
|
||||||
const locationMethods = subsection(accessBody, "vhTrafficMethodsSection");
|
const locationMethods = subsection(accessBody, "vhTrafficMethodsSection");
|
||||||
field(locationMethods, "location-method-mode", "locationMethodMode", value.method_policy?.mode || "off", "select", { values: [["off", "vhOff"], ["allow", "locationMethodAllow"], ["block", "locationMethodBlock"]] });
|
field(locationMethods, "location-method-mode", "locationMethodMode", value.method_policy?.mode || "off", "select", { values: [["off", "vhOff"], ["allow", "locationMethodAllow"], ["block", "locationMethodBlock"]] });
|
||||||
field(locationMethods, "location-method-list", "locationMethodList", (value.method_policy?.methods || []).join("\n"), "textarea", { rows: 3, maxLength: 1024 });
|
window.rustProxyMethodPicker?.attach(field(locationMethods, "location-method-list", "locationMethodList", (value.method_policy?.methods || []).join("\n"), "textarea", { rows: 3, maxLength: 1024 }));
|
||||||
note(locationMethods, "locationMethodHelp");
|
note(locationMethods, "locationMethodHelp");
|
||||||
const locationCountries = subsection(accessBody, "vhTrafficCountrySection");
|
const locationCountries = subsection(accessBody, "vhTrafficCountrySection");
|
||||||
field(locationCountries, "location-country-mode", "locationCountryMode", value.country_access?.mode || "off", "select", { values: [["off", "vhOff"], ["block", "vhCountryBlock"], ["allow", "vhCountryAllow"]] });
|
field(locationCountries, "location-country-mode", "locationCountryMode", value.country_access?.mode || "off", "select", { values: [["off", "vhOff"], ["block", "vhCountryBlock"], ["allow", "vhCountryAllow"]] });
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ function load(value = defaults(), migrationIds = [], show = true) {
|
|||||||
|
|
||||||
const methodFields = subsection(g, "vhTrafficMethodsSection");
|
const methodFields = subsection(g, "vhTrafficMethodsSection");
|
||||||
field(methodFields, "method-mode", "vhMethodMode", methodPolicy.mode || "off", "select", { values: [["off", "vhOff"], ["allow", "locationMethodAllow"], ["block", "locationMethodBlock"]] });
|
field(methodFields, "method-mode", "vhMethodMode", methodPolicy.mode || "off", "select", { values: [["off", "vhOff"], ["allow", "locationMethodAllow"], ["block", "locationMethodBlock"]] });
|
||||||
field(methodFields, "method-list", "vhMethodList", (methodPolicy.methods || []).join("\n"), "textarea", { rows: 3, maxLength: 1024 });
|
window.rustProxyMethodPicker?.attach(field(methodFields, "method-list", "vhMethodList", (methodPolicy.methods || []).join("\n"), "textarea", { rows: 3, maxLength: 1024 }));
|
||||||
note(methodFields, "vhMethodHelp");
|
note(methodFields, "vhMethodHelp");
|
||||||
|
|
||||||
const mimePolicy = value.content_type_policy || {};
|
const mimePolicy = value.content_type_policy || {};
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
use anyhow::{ensure, Result};
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
|
#[serde(default, deny_unknown_fields)]
|
||||||
|
pub struct Settings {
|
||||||
|
pub enabled: bool,
|
||||||
|
pub notifications: bool,
|
||||||
|
pub certificate_expiry: bool,
|
||||||
|
pub certificate_warning_days: u32,
|
||||||
|
pub certificate_error_days: u32,
|
||||||
|
pub certificate_renewal: bool,
|
||||||
|
pub acme_runtime: bool,
|
||||||
|
pub file_descriptors: bool,
|
||||||
|
pub file_descriptors_warning_percent: u8,
|
||||||
|
pub file_descriptors_error_percent: u8,
|
||||||
|
pub geoip: bool,
|
||||||
|
pub prometheus: bool,
|
||||||
|
pub update: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Default for Settings {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self {
|
||||||
|
enabled: true,
|
||||||
|
notifications: true,
|
||||||
|
certificate_expiry: true,
|
||||||
|
certificate_warning_days: 14,
|
||||||
|
certificate_error_days: 3,
|
||||||
|
certificate_renewal: true,
|
||||||
|
acme_runtime: true,
|
||||||
|
file_descriptors: true,
|
||||||
|
file_descriptors_warning_percent: 80,
|
||||||
|
file_descriptors_error_percent: 95,
|
||||||
|
geoip: true,
|
||||||
|
prometheus: true,
|
||||||
|
update: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Settings {
|
||||||
|
pub fn is_default(&self) -> bool {
|
||||||
|
self == &Self::default()
|
||||||
|
}
|
||||||
|
pub fn validate(&self) -> Result<()> {
|
||||||
|
ensure!(
|
||||||
|
(1..=90).contains(&self.certificate_warning_days),
|
||||||
|
"certificate warning must be 1..=90 days"
|
||||||
|
);
|
||||||
|
ensure!(
|
||||||
|
self.certificate_error_days < self.certificate_warning_days,
|
||||||
|
"certificate error days must be lower than the warning days"
|
||||||
|
);
|
||||||
|
ensure!(
|
||||||
|
(50..=99).contains(&self.file_descriptors_warning_percent)
|
||||||
|
&& (50..=100).contains(&self.file_descriptors_error_percent)
|
||||||
|
&& self.file_descriptors_warning_percent < self.file_descriptors_error_percent,
|
||||||
|
"file descriptor thresholds must be 50..=100 percent and warning below error"
|
||||||
|
);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
Vendored
+25
-2
@@ -154,6 +154,10 @@ pub enum RuleAction {
|
|||||||
RemoveHeader {
|
RemoveHeader {
|
||||||
name: String,
|
name: String,
|
||||||
},
|
},
|
||||||
|
DefaultHeader {
|
||||||
|
name: String,
|
||||||
|
value: String,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RuleAction {
|
impl RuleAction {
|
||||||
@@ -169,7 +173,9 @@ impl RuleAction {
|
|||||||
| Self::NoStore
|
| Self::NoStore
|
||||||
| Self::IgnoreCacheControl
|
| Self::IgnoreCacheControl
|
||||||
| Self::StripSetCookie => RuleStage::Response,
|
| Self::StripSetCookie => RuleStage::Response,
|
||||||
Self::SetHeader { .. } | Self::RemoveHeader { .. } => RuleStage::Deliver,
|
Self::SetHeader { .. } | Self::RemoveHeader { .. } | Self::DefaultHeader { .. } => {
|
||||||
|
RuleStage::Deliver
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn aspect(&self) -> Option<&'static str> {
|
fn aspect(&self) -> Option<&'static str> {
|
||||||
@@ -537,7 +543,7 @@ fn validate_action(action: &RuleAction) -> Result<()> {
|
|||||||
"TTL and grace are limited to one year"
|
"TTL and grace are limited to one year"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
RuleAction::SetHeader { name, value } => {
|
RuleAction::SetHeader { name, value } | RuleAction::DefaultHeader { name, value } => {
|
||||||
let header = rule_header_name(name)?;
|
let header = rule_header_name(name)?;
|
||||||
ensure!(
|
ensure!(
|
||||||
!PROTECTED_RULE_HEADERS.contains(&header.as_str()),
|
!PROTECTED_RULE_HEADERS.contains(&header.as_str()),
|
||||||
@@ -681,6 +687,9 @@ impl CompiledRules {
|
|||||||
pub fn is_empty(&self) -> bool {
|
pub fn is_empty(&self) -> bool {
|
||||||
self.request.is_empty() && self.response.is_empty() && self.deliver.is_empty()
|
self.request.is_empty() && self.response.is_empty() && self.deliver.is_empty()
|
||||||
}
|
}
|
||||||
|
pub fn has_deliver_rules(&self) -> bool {
|
||||||
|
!self.deliver.is_empty()
|
||||||
|
}
|
||||||
pub fn has_late_rules(&self) -> bool {
|
pub fn has_late_rules(&self) -> bool {
|
||||||
!self.response.is_empty() || !self.deliver.is_empty()
|
!self.response.is_empty() || !self.deliver.is_empty()
|
||||||
}
|
}
|
||||||
@@ -896,6 +905,7 @@ pub struct ResponseRuleOutcome {
|
|||||||
#[derive(Debug, Clone, Default, Serialize)]
|
#[derive(Debug, Clone, Default, Serialize)]
|
||||||
pub struct DeliverRuleOutcome {
|
pub struct DeliverRuleOutcome {
|
||||||
pub set: Vec<(String, String)>,
|
pub set: Vec<(String, String)>,
|
||||||
|
pub defaults: Vec<(String, String)>,
|
||||||
pub remove: Vec<String>,
|
pub remove: Vec<String>,
|
||||||
pub matched: Vec<RuleMatchInfo>,
|
pub matched: Vec<RuleMatchInfo>,
|
||||||
}
|
}
|
||||||
@@ -1065,6 +1075,9 @@ impl CompiledRules {
|
|||||||
RuleAction::RemoveHeader { name } => {
|
RuleAction::RemoveHeader { name } => {
|
||||||
outcome.remove.push(name.to_ascii_lowercase())
|
outcome.remove.push(name.to_ascii_lowercase())
|
||||||
}
|
}
|
||||||
|
RuleAction::DefaultHeader { name, value } => outcome
|
||||||
|
.defaults
|
||||||
|
.push((name.to_ascii_lowercase(), value.clone())),
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1146,6 +1159,16 @@ impl DeliverRuleOutcome {
|
|||||||
headers.insert(header, value);
|
headers.insert(header, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (name, value) in &self.defaults {
|
||||||
|
if let (Ok(header), Ok(value)) = (
|
||||||
|
http::HeaderName::from_bytes(name.as_bytes()),
|
||||||
|
HeaderValue::from_str(value),
|
||||||
|
) {
|
||||||
|
if !headers.contains_key(&header) {
|
||||||
|
headers.insert(header, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+16
@@ -195,6 +195,22 @@ mod cache_rules_tests {
|
|||||||
assert!(headers.get("server").is_none());
|
assert!(headers.get("server").is_none());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn default_header_only_fills_missing_headers() {
|
||||||
|
let rules = vec![rule(
|
||||||
|
serde_json::json!({"id": "defaults", "stage": "deliver", "actions": [{"type": "default_header", "name": "Cache-Control", "value": "public, max-age=60"}, {"type": "default_header", "name": "X-Content-Type-Options", "value": "nosniff"}]}),
|
||||||
|
)];
|
||||||
|
let compiled = CompiledRules::compile("", &[], &rules, false).unwrap();
|
||||||
|
assert!(compiled.has_deliver_rules());
|
||||||
|
let mut headers = HeaderMap::new();
|
||||||
|
headers.insert("cache-control", HeaderValue::from_static("no-store"));
|
||||||
|
let outcome =
|
||||||
|
compiled.evaluate_deliver(&request("/", None, &[]), StatusCode::OK, &headers, false);
|
||||||
|
outcome.apply(&mut headers);
|
||||||
|
assert_eq!(headers.get("cache-control").unwrap(), "no-store");
|
||||||
|
assert_eq!(headers.get("x-content-type-options").unwrap(), "nosniff");
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn rule_variant_changes_the_cache_key_only_when_present() {
|
fn rule_variant_changes_the_cache_key_only_when_present() {
|
||||||
let cache = Cache::new(1);
|
let cache = Cache::new(1);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ pub fn compile_with_active(
|
|||||||
config.listeners.validate(&desired_policy)?;
|
config.listeners.validate(&desired_policy)?;
|
||||||
config.http2.validate()?;
|
config.http2.validate()?;
|
||||||
config.docker_agents.validate(&config.listeners)?;
|
config.docker_agents.validate(&config.listeners)?;
|
||||||
|
config.alerts.validate()?;
|
||||||
let certificate_ids: HashSet<_> = config
|
let certificate_ids: HashSet<_> = config
|
||||||
.tls
|
.tls
|
||||||
.certificates
|
.certificates
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ pub struct Config {
|
|||||||
pub http2: crate::settings::Http2Connections,
|
pub http2: crate::settings::Http2Connections,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub docker_agents: crate::docker::Settings,
|
pub docker_agents: crate::docker::Settings,
|
||||||
|
#[serde(default, skip_serializing_if = "crate::alerts::Settings::is_default")]
|
||||||
|
pub alerts: crate::alerts::Settings,
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
pub streams: Vec<crate::stream::Host>,
|
pub streams: Vec<crate::stream::Host>,
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ const MAX_BINDINGS: usize = 32;
|
|||||||
const MAX_DOMAINS: usize = 16;
|
const MAX_DOMAINS: usize = 16;
|
||||||
const MAX_CERTIFICATES: usize = 32;
|
const MAX_CERTIFICATES: usize = 32;
|
||||||
|
|
||||||
|
fn is_true(value: &bool) -> bool {
|
||||||
|
*value
|
||||||
|
}
|
||||||
fn yes() -> bool {
|
fn yes() -> bool {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
@@ -174,10 +177,18 @@ pub struct Assignment {
|
|||||||
pub compression_zstd: Option<bool>,
|
pub compression_zstd: Option<bool>,
|
||||||
pub compression_deflate: Option<bool>,
|
pub compression_deflate: Option<bool>,
|
||||||
pub cache_enabled: bool,
|
pub cache_enabled: bool,
|
||||||
|
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||||
|
pub cache_default_ttl_seconds: Option<u64>,
|
||||||
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
|
pub cache_rules: Vec<crate::cache::Rule>,
|
||||||
|
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||||
|
pub cache_ignore_global_rules: bool,
|
||||||
pub transform_enabled: bool,
|
pub transform_enabled: bool,
|
||||||
pub acl_profile_id: Option<String>,
|
pub acl_profile_id: Option<String>,
|
||||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||||
pub acl_profile_ids: Vec<String>,
|
pub acl_profile_ids: Vec<String>,
|
||||||
|
#[serde(default = "yes", skip_serializing_if = "is_true")]
|
||||||
|
pub inherit_acl_profiles: bool,
|
||||||
pub allow_certificate_mismatch: bool,
|
pub allow_certificate_mismatch: bool,
|
||||||
pub acl: Option<crate::acl::Acl>,
|
pub acl: Option<crate::acl::Acl>,
|
||||||
pub proxy_timeouts: crate::vhost::ProxyTimeouts,
|
pub proxy_timeouts: crate::vhost::ProxyTimeouts,
|
||||||
@@ -205,9 +216,13 @@ impl Default for Assignment {
|
|||||||
compression_zstd: None,
|
compression_zstd: None,
|
||||||
compression_deflate: None,
|
compression_deflate: None,
|
||||||
cache_enabled: false,
|
cache_enabled: false,
|
||||||
|
cache_default_ttl_seconds: None,
|
||||||
|
cache_rules: Vec::new(),
|
||||||
|
cache_ignore_global_rules: false,
|
||||||
transform_enabled: false,
|
transform_enabled: false,
|
||||||
acl_profile_id: None,
|
acl_profile_id: None,
|
||||||
acl_profile_ids: Vec::new(),
|
acl_profile_ids: Vec::new(),
|
||||||
|
inherit_acl_profiles: true,
|
||||||
allow_certificate_mismatch: false,
|
allow_certificate_mismatch: false,
|
||||||
acl: None,
|
acl: None,
|
||||||
proxy_timeouts: crate::vhost::ProxyTimeouts::default(),
|
proxy_timeouts: crate::vhost::ProxyTimeouts::default(),
|
||||||
|
|||||||
+10
-2
@@ -356,10 +356,13 @@ fn build_vhost(
|
|||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
let override_profiles =
|
let override_profiles =
|
||||||
assignment.acl_profile_id.is_some() || !assignment.acl_profile_ids.is_empty();
|
assignment.acl_profile_id.is_some() || !assignment.acl_profile_ids.is_empty();
|
||||||
|
let no_profiles = Vec::new();
|
||||||
let (acl_profile_id, acl_profile_ids) = if override_profiles {
|
let (acl_profile_id, acl_profile_ids) = if override_profiles {
|
||||||
(&assignment.acl_profile_id, &assignment.acl_profile_ids)
|
(&assignment.acl_profile_id, &assignment.acl_profile_ids)
|
||||||
} else {
|
} else if assignment.inherit_acl_profiles {
|
||||||
(&agent.acl_profile_id, &agent.acl_profile_ids)
|
(&agent.acl_profile_id, &agent.acl_profile_ids)
|
||||||
|
} else {
|
||||||
|
(&None, &no_profiles)
|
||||||
};
|
};
|
||||||
let value = serde_json::json!({
|
let value = serde_json::json!({
|
||||||
"id": generated_id(&agent.id, &assignment.service_key),
|
"id": generated_id(&agent.id, &assignment.service_key),
|
||||||
@@ -371,7 +374,12 @@ fn build_vhost(
|
|||||||
"http3_enabled": assignment.http3_enabled,
|
"http3_enabled": assignment.http3_enabled,
|
||||||
"backends": backends,
|
"backends": backends,
|
||||||
"compression": {"enabled": assignment.compression_enabled},
|
"compression": {"enabled": assignment.compression_enabled},
|
||||||
"cache": {"enabled": assignment.cache_enabled},
|
"cache": {
|
||||||
|
"enabled": assignment.cache_enabled,
|
||||||
|
"default_ttl_seconds": assignment.cache_default_ttl_seconds,
|
||||||
|
"rules": &assignment.cache_rules,
|
||||||
|
"ignore_global_rules": assignment.cache_ignore_global_rules
|
||||||
|
},
|
||||||
"transform": {"enabled": assignment.transform_enabled},
|
"transform": {"enabled": assignment.transform_enabled},
|
||||||
"acl_profile_id": acl_profile_id,
|
"acl_profile_id": acl_profile_id,
|
||||||
"acl_profile_ids": acl_profile_ids,
|
"acl_profile_ids": acl_profile_ids,
|
||||||
|
|||||||
@@ -104,6 +104,43 @@ mod tests {
|
|||||||
assert_eq!(other.acl_profile_id.as_deref(), Some("office"));
|
assert_eq!(other.acl_profile_id.as_deref(), Some("office"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn public_docker_publication_skips_agent_default_acl_profiles() {
|
||||||
|
let mut desired = crate::config::demo_config("127.0.0.1:9000".parse().unwrap());
|
||||||
|
desired.vhosts.clear();
|
||||||
|
desired.docker_agents.agents.push(Agent {
|
||||||
|
id: "node1".into(),
|
||||||
|
name: "Node 1".into(),
|
||||||
|
endpoint: "http://10.0.0.2:9876".into(),
|
||||||
|
token: "012345678901234567890123".into(),
|
||||||
|
base_domain: "docker1.lab.local".into(),
|
||||||
|
listener_ids: vec!["http".into()],
|
||||||
|
acl_profile_id: Some("office".into()),
|
||||||
|
assignments: vec![
|
||||||
|
Assignment {
|
||||||
|
service_key: "container:app:8080/tcp".into(),
|
||||||
|
hostname: "app".into(),
|
||||||
|
inherit_acl_profiles: false,
|
||||||
|
..Default::default()
|
||||||
|
},
|
||||||
|
Assignment {
|
||||||
|
service_key: "container:second:8080/tcp".into(),
|
||||||
|
hostname: "second".into(),
|
||||||
|
..Default::default()
|
||||||
|
},
|
||||||
|
],
|
||||||
|
..Default::default()
|
||||||
|
});
|
||||||
|
let serialized =
|
||||||
|
serde_json::to_value(&desired.docker_agents.agents[0].assignments).unwrap();
|
||||||
|
assert_eq!(serialized[0]["inherit_acl_profiles"], false);
|
||||||
|
assert!(serialized[1].get("inherit_acl_profiles").is_none());
|
||||||
|
let result = effective_config(desired, &observation(service(), vec![])).unwrap();
|
||||||
|
let public = &result.vhosts[0];
|
||||||
|
assert!(public.acl_profile_id.is_none() && public.acl_profile_ids.is_empty());
|
||||||
|
assert_eq!(result.vhosts[1].acl_profile_id.as_deref(), Some("office"));
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn generated_vhost_supports_base_domain_custom_domain_aliases_and_selected_ip() {
|
fn generated_vhost_supports_base_domain_custom_domain_aliases_and_selected_ip() {
|
||||||
let mut desired = crate::config::demo_config("127.0.0.1:9000".parse().unwrap());
|
let mut desired = crate::config::demo_config("127.0.0.1:9000".parse().unwrap());
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
pub mod acl;
|
pub mod acl;
|
||||||
pub mod acme;
|
pub mod acme;
|
||||||
pub mod admin;
|
pub mod admin;
|
||||||
|
pub mod alerts;
|
||||||
#[path = "auth/mod.rs"]
|
#[path = "auth/mod.rs"]
|
||||||
pub mod auth;
|
pub mod auth;
|
||||||
pub mod backup;
|
pub mod backup;
|
||||||
|
|||||||
@@ -127,6 +127,25 @@ let mut cache_rule_context: Option<Arc<crate::cache::RuleContext>> = None;
|
|||||||
let mut cache_rule_query: Option<Option<String>> = None;
|
let mut cache_rule_query: Option<Option<String>> = None;
|
||||||
let mut cache_rule_variant = String::new();
|
let mut cache_rule_variant = String::new();
|
||||||
let mut cache_rule_pass = false;
|
let mut cache_rule_pass = false;
|
||||||
|
if !admin_control_plane && !cache_settings.active_for(route.cache) {
|
||||||
|
if let Some(rules) = cache_settings
|
||||||
|
.compiled_rules
|
||||||
|
.clone()
|
||||||
|
.filter(|rules| rules.has_deliver_rules())
|
||||||
|
{
|
||||||
|
let rule_request = crate::cache::RuleRequest {
|
||||||
|
host: host.clone(),
|
||||||
|
path: path.to_string(),
|
||||||
|
query: request.uri().query().map(str::to_owned),
|
||||||
|
method: request.method().clone(),
|
||||||
|
headers: request.headers().clone(),
|
||||||
|
client_ip: Some(context.client_ip),
|
||||||
|
};
|
||||||
|
if let Some(sink) = request.extensions().get::<crate::cache::RuleSink>() {
|
||||||
|
sink.set(Arc::new(crate::cache::RuleContext { rules, request: rule_request }));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if !admin_control_plane && cache_settings.active_for(route.cache) {
|
if !admin_control_plane && cache_settings.active_for(route.cache) {
|
||||||
if let Some(rules) = cache_settings.compiled_rules.clone() {
|
if let Some(rules) = cache_settings.compiled_rules.clone() {
|
||||||
let mut rule_request = crate::cache::RuleRequest {
|
let mut rule_request = crate::cache::RuleRequest {
|
||||||
|
|||||||
@@ -51,5 +51,5 @@ const events = openapi.paths["/api/events"].get;
|
|||||||
const logsFlag = (events.parameters || []).find(parameter => parameter.name === "logs");
|
const logsFlag = (events.parameters || []).find(parameter => parameter.name === "logs");
|
||||||
assert.equal(logsFlag?.schema?.type, "boolean");
|
assert.equal(logsFlag?.schema?.type, "boolean");
|
||||||
assert.equal(logsFlag?.schema?.default, true);
|
assert.equal(logsFlag?.schema?.default, true);
|
||||||
assert.equal(openapi.info.version, "0.37.1");
|
assert.equal(openapi.info.version, "0.37.2");
|
||||||
console.log("Panel refresh/API contract checks: OK");
|
console.log("Panel refresh/API contract checks: OK");
|
||||||
Reference in new issue
Block a user