This commit is contained in:
Mateusz Gruszczyński committed 2026-11-15 17:51:19 +01:00
1 parent faedd249b8
commit 758cfd6274
25 files changed
+973 -39

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
# RustProxy source and documentation maintenance # RustProxy source and documentation maintenance
Current source version: **0.38.0**. The Cargo package and binary are named `rust-proxy`. Current source version: **0.38.1**. 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.
+8
View File
@@ -2,6 +2,14 @@
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.38.1 — built-in dashboard presets and matching fixes
- **Path prefixes with a trailing slash:** a cache bypass prefix or forced-cache target written as `/api/` now also matches the paths below it (`/api/health`); before, it matched only the exact path `/api/`, so such responses were cached when their headers allowed it. `/api` (without the slash) already covered `/api` and `/api/…` and still does not match `/apix`.
- **Cache rule extensions:** an `extension` condition value written with a leading dot or spaces (`.css`, ` .JS`) now matches like `css`; before, it never matched.
- **Headless reload in containers:** `rust-proxy --headless reload` also signals RustProxy running as process 1, the usual case in a container.
- **Built-in dashboard presets:** **Dashboard presets** now offers twelve ready-made Overview layouts next to your own: ten for a Full HD screen (Operations/NOC, Traffic and protocols, Cache and compression, Backends and load balancing, Resources and process, Errors and security, Docker, Web Server and PHP, TCP/UDP streams, Wall display) and two for phones (status, on call). They set card order, widths, visibility, density and history length, cannot be deleted and do not count towards the 16 saved presets; see [Dashboard](docs/DASHBOARD.md).
- **Docs:** the headless production example uses `/api`, `/admin`, `/login` as cache bypass prefixes.
## 0.38.0 — headless mode and catch-all host ## 0.38.0 — headless mode and catch-all host
- **Headless mode:** `rust-proxy --headless --config /etc/rustproxy/config.json serve …` (or `RUST_PROXY_HEADLESS=1` with `RUST_PROXY_CONFIG` in `/etc/rustproxy/environment`, which the packaged unit already reads) runs RustProxy as a plain reverse proxy and load balancer configured only from a JSON file. No administration listener, API or administrator account; RustProxy never writes the file. Everything that serves traffic works as in panel mode. See [Headless mode](docs/HEADLESS.md). - **Headless mode:** `rust-proxy --headless --config /etc/rustproxy/config.json serve …` (or `RUST_PROXY_HEADLESS=1` with `RUST_PROXY_CONFIG` in `/etc/rustproxy/environment`, which the packaged unit already reads) runs RustProxy as a plain reverse proxy and load balancer configured only from a JSON file. No administration listener, API or administrator account; RustProxy never writes the file. Everything that serves traffic works as in panel mode. See [Headless mode](docs/HEADLESS.md).
Generated
+1 -1
View File
@@ -1943,7 +1943,7 @@ dependencies = [
[[package]] [[package]]
name = "rust-proxy" name = "rust-proxy"
version = "0.38.0" version = "0.38.1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"arc-swap", "arc-swap",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "rust-proxy" name = "rust-proxy"
version = "0.38.0" version = "0.38.1"
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"
+24 -23
View File
@@ -1,10 +1,10 @@
61bf40a0572889dc8b0dda9eae4e93e44b0de9364b3c798106c85700ffb37c23 .dockerignore 61bf40a0572889dc8b0dda9eae4e93e44b0de9364b3c798106c85700ffb37c23 .dockerignore
4140a2956264b44f259e6a37fc00ba02097bbe68b09296e04d3d243c1287129b .env.example 4140a2956264b44f259e6a37fc00ba02097bbe68b09296e04d3d243c1287129b .env.example
e76e688874828e3743d03693b1d2872b9633b4db09909673786caf30f7cfe489 .gitignore e76e688874828e3743d03693b1d2872b9633b4db09909673786caf30f7cfe489 .gitignore
f3549b7a74b9d902672d1637bfbbd70df7f47cd7a69a7b15d0fdcb78704ea3b2 AGENTS.md 122f41f43e1cf8850f96bac13d22f16f9d30c33b732d74c315f48348ad9636bd AGENTS.md
c68b2d4f4e1cca986225ab94d34687cb85a75084375eebc33af5776137d79e08 CHANGELOG.md 6307ff9ad7354b4fc9f6be84cf85b23cabae3fe0f7d0a2bd8ff7af9e3038fcea CHANGELOG.md
cffd1a831775774a1d2c3f8a9e5c1fc462e9737b7f5f5438ed5045d756482b0a Cargo.lock a15872609fb33f704d999ed035fd5b3916b165977f221931a7a93e7f4a745dbb Cargo.lock
48e85b34ba68a97a0b22a978c69aa84f72c3d2323cd1672952fc7516fc345f19 Cargo.toml cc78701e5bd56d3cd0a2327b0fdcf2a8422afb6b07cb3f1f2d15673ed0bb0e0d Cargo.toml
788745d4f70a0382c6280020afbd48844bb2af65e835a826852143f8132cdeca Dockerfile 788745d4f70a0382c6280020afbd48844bb2af65e835a826852143f8132cdeca Dockerfile
0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0 LICENSE 0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0 LICENSE
82d1dee2fc68158f0ea73259151461e64c8b18d807cd1fecfb1ed99dc30cf5f4 README.md 82d1dee2fc68158f0ea73259151461e64c8b18d807cd1fecfb1ed99dc30cf5f4 README.md
@@ -28,7 +28,7 @@ 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
c007fd51220b372ffa5c5760fa7a2f2c50d1b926dc269fdb64baf37166905ba9 docker-agent/model.go 603768f959b43e18843ec68e0eb6e83c17a58adfc90107c471366a1ccd5d1432 docker-agent/model.go
e7d2ef3cc83d8089d3b5eb2154c113d82bbab5e7bac0b9077785d5ab92f48df2 docker-agent/network.go e7d2ef3cc83d8089d3b5eb2154c113d82bbab5e7bac0b9077785d5ab92f48df2 docker-agent/network.go
6e2e13136fd8198c2d64dfd0612dfc91c4a9c0a952e71b3b24c9614a72b083aa docker-agent/network_proc_test.go 6e2e13136fd8198c2d64dfd0612dfc91c4a9c0a952e71b3b24c9614a72b083aa docker-agent/network_proc_test.go
021e0799a95a7c76bc245ff464d94b4495ce0d22555ca202579bd5f45e4be794 docker-agent/provision.go 021e0799a95a7c76bc245ff464d94b4495ce0d22555ca202579bd5f45e4be794 docker-agent/provision.go
@@ -44,10 +44,10 @@ c0940a4b323d71931cf2ad4ad24d58b6d6bfd49af90c6e3fc91fcbe2b4cf312f docs/ACCESS.md
375241ef87cff34c0bda5b771ee474a402f24ae8fb00e97f601b1a5060690508 docs/CERTIFICATES.md 375241ef87cff34c0bda5b771ee474a402f24ae8fb00e97f601b1a5060690508 docs/CERTIFICATES.md
6aa83366ad45227d10ebe121ed2c4f690ebcb826939ec2b2eafb40bfd714ac69 docs/CONFIGURATION.md 6aa83366ad45227d10ebe121ed2c4f690ebcb826939ec2b2eafb40bfd714ac69 docs/CONFIGURATION.md
fec29ce846d6705eb45819d85d382f28e28a146b265feab2e4c7cce2a35e5883 docs/CUSTOM_LOCATIONS.md fec29ce846d6705eb45819d85d382f28e28a146b265feab2e4c7cce2a35e5883 docs/CUSTOM_LOCATIONS.md
5776a6e59df079a8788df00f031cb366f12718f5336ddabd90a953aed2f8b1f7 docs/DASHBOARD.md a8dbcdafb2aef7de2747163ae07939b3984d29a4380064e50645e57392e41c95 docs/DASHBOARD.md
40de73f749877b1a371b48be2f43422b8598c59a2e8768c9d2d986a35c693cdf docs/DOCKER_DISCOVERY.md 40de73f749877b1a371b48be2f43422b8598c59a2e8768c9d2d986a35c693cdf docs/DOCKER_DISCOVERY.md
1ea47fbdc41b28024d57af9280f5c07ab92f08a38ff011fc3b978e579c2cb188 docs/FEATURES.md 1ea47fbdc41b28024d57af9280f5c07ab92f08a38ff011fc3b978e579c2cb188 docs/FEATURES.md
3e6d8c03095af2328d1c4a15f7bb1834ef9b554ad588bd714b40d6d79754a2a2 docs/HEADLESS.md 2d411c88e8bde1e95c553d36e4125fd0f34a5b11ef4f59b76bfb7a1715d7ede6 docs/HEADLESS.md
4282602f0b814841f71282040003bec91c24611e5152b33407b76e62357f8d3a docs/INSTALL.md 4282602f0b814841f71282040003bec91c24611e5152b33407b76e62357f8d3a docs/INSTALL.md
6e37859bf0dced99d4a7db93790cb38fcd90191932827946d5223eaa4c784fce docs/LOGS.md 6e37859bf0dced99d4a7db93790cb38fcd90191932827946d5223eaa4c784fce docs/LOGS.md
0e9ae9509a78d00951d2c7c3f13eaf518d1f3448a29b048f5933e1f5f8440275 docs/MIGRATION.md 0e9ae9509a78d00951d2c7c3f13eaf518d1f3448a29b048f5933e1f5f8440275 docs/MIGRATION.md
@@ -82,7 +82,7 @@ dcdd387384037c7a1a32f6a4d948a182e44bea472542b8fe4e9b6c917edcf551 docs/images/ov
e31ac05a99615e4ea6c4c9a8b2e090968583fe3959f838a600b5740cb170f8c5 examples/config.json e31ac05a99615e4ea6c4c9a8b2e090968583fe3959f838a600b5740cb170f8c5 examples/config.json
39cad993003930febf98460311d185a278e7a9508b6b591299d9339d0f0c51cf examples/empty.json 39cad993003930febf98460311d185a278e7a9508b6b591299d9339d0f0c51cf examples/empty.json
50d9799a6fa7e4bbf754937f9741459392fa93eabe8fe3b892671a31f59fd505 examples/headless-minimal.json 50d9799a6fa7e4bbf754937f9741459392fa93eabe8fe3b892671a31f59fd505 examples/headless-minimal.json
3bbf64c65dd770f05af0eeecc2a5d6eb88149e35163f491f5f9eabb6f586c2a8 examples/headless-production.json 7d50a9352ba4eeb0ed343f709b6f61bdc90b01f693bd118a8321b28a2cb50c4e examples/headless-production.json
695cc7621aa403148fcd0868f351b6e9ccc076fe35610e779af4a72f94d7d5f4 examples/http3-vhost.json 695cc7621aa403148fcd0868f351b6e9ccc076fe35610e779af4a72f94d7d5f4 examples/http3-vhost.json
b26833cb4251f9390a44192ecc827ff7f052fd19016a5ccf7498c94503ab4ce3 examples/mock-vhost.json b26833cb4251f9390a44192ecc827ff7f052fd19016a5ccf7498c94503ab4ce3 examples/mock-vhost.json
a6b835dc07defc12b8f0e48491d5f413843c8be2ba4501d7c28140a2822b034f examples/oidc-vhost.json a6b835dc07defc12b8f0e48491d5f413843c8be2ba4501d7c28140a2822b034f examples/oidc-vhost.json
@@ -103,12 +103,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
eb9225830f344886ce57c51fbf9ded7bfd525a2ede71a5f67ce81f7c01348a6d integrations/routeros-oci-build/README.md 1560291c3234a6d62d830f4c9394e8ad2b60c85dd343472e3e1bfc7c9cb1d88a 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
ae2ee2887fcba096d0de25edcc18faa1ffec35759274518db1bf6d6982f7176c langs/README.md ae2ee2887fcba096d0de25edcc18faa1ffec35759274518db1bf6d6982f7176c langs/README.md
ac86cd8a11bc23e2327633e932833e5bfa411d752fb0d1865caed8810e0fb200 langs/en_US.json 116ae780bf5ebe5310d6813b05524f9a492d832664bf005e22995186ca7f0e53 langs/en_US.json
1b9647755059be5869160f4e347c1c1f3226332c46e051590773f711303d748a langs/pl_pl.json 61b3fc79e05c067ccf705cf3c19216d5aaec27791ab4aa1a2054ec9941cc4e82 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
@@ -182,17 +182,17 @@ d58a2ed83319176de4e66790ed292447c9497ae031464ec55cfe27174acb639a src/admin/file
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
51228956c33358278ebed62941da273e1e87d0b5c5d1c40cc0d2c91aec9d7362 src/admin/mod.rs 51228956c33358278ebed62941da273e1e87d0b5c5d1c40cc0d2c91aec9d7362 src/admin/mod.rs
98bdd2811c608ef6caacc695075e717829e3774ff594d29dcf18905396bbbc6a src/admin/openapi.json ba9a05470d57f5bd2dc6b80a2d0b47440d8c67a85ea4cb97b1623ed658b90366 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
09c019cd49ff3829d119d918513b87d87c643fd753cd3a0d3392ac5c845da7af 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 1eec04026ad52e8dfdd6f56b193a6997e171bf1ac7d2300742d05873048f9abe 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
b20ef332aef006d06f7da48e98f4eb6d1313cfca21274954496cac378515acf8 src/admin/router.rs 649a9d46279f042d42d8e0efe205a957529f20cea221e50c331964b82242660f src/admin/router.rs
fba52102e77ca8871a42f97c91be8f10a9aa4f997868652d550fff3fbd41b66e src/admin/session.rs fba52102e77ca8871a42f97c91be8f10a9aa4f997868652d550fff3fbd41b66e src/admin/session.rs
22f6f8c5e293fb6f8f1734660a0931605dbe35a974d9c819269492450aa39aa1 src/admin/status.rs 22f6f8c5e293fb6f8f1734660a0931605dbe35a974d9c819269492450aa39aa1 src/admin/status.rs
9b5bc1a439c5e5611c47732fe86097877b50b09b10a0838d9813314ea6232d0c src/admin/status_live.rs 9b5bc1a439c5e5611c47732fe86097877b50b09b10a0838d9813314ea6232d0c src/admin/status_live.rs
@@ -211,7 +211,7 @@ dedda129e173a347ebca9445c8a313849d1d678c256deabeb18f9977559e021a src/admin/web/
5ce9d3e0849da1109b8eaa609dd693b2414814e132685cafcddfeb9436bfed41 src/admin/web/app/core.js 5ce9d3e0849da1109b8eaa609dd693b2414814e132685cafcddfeb9436bfed41 src/admin/web/app/core.js
1fe90b27e241477e67b24283f3ae8a15a1770e3a3a8f5017a0732396294bff90 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 995b4282fd3738436863af954c08d9abfa71298e49f8ccbbeb27b4e9372e965a src/admin/web/app/dashboard-presets.js
fce1fe268749b28ab68ac41519ced05252c1193f11bc9a3851de45dae4c419ad src/admin/web/app/docker-dashboard.js fce1fe268749b28ab68ac41519ced05252c1193f11bc9a3851de45dae4c419ad src/admin/web/app/docker-dashboard.js
f01c5fe8eb9c8249b1d07563f42bb63c397de0b602eb178c131b8a9e50d3b1c4 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
@@ -237,13 +237,14 @@ b7ead49224a4ec67181d3f24f9d9634bd6d76756f826a4d5d993300637d1d8f3 src/admin/web/
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
23b5f5c1b28944b7a911eaf5058c006df40f47874eddaa36512baccd1c9cfd6c src/admin/web/css/30-overview.css 9a7a0e0f7d81728d0bbf7fa5f591b7825c07382da4483a4441b80f2c99d35f00 src/admin/web/css/30-overview.css
6ba5e21e0a8eb85f2bd6937b14e67dd151fdf97362e2d6c179acdaaafc3d6d3c src/admin/web/css/40-editors.css 6ba5e21e0a8eb85f2bd6937b14e67dd151fdf97362e2d6c179acdaaafc3d6d3c src/admin/web/css/40-editors.css
5584e779de815a86efd3cd2514d7973a38e3fda20f7e8aaa9900fa724b204018 src/admin/web/css/50-settings.css 5584e779de815a86efd3cd2514d7973a38e3fda20f7e8aaa9900fa724b204018 src/admin/web/css/50-settings.css
a2941410b885ac4487c2dc9003fb1d1073c163d707b5d085a15d9e8a8a628e03 src/admin/web/css/60-monitoring.css a2941410b885ac4487c2dc9003fb1d1073c163d707b5d085a15d9e8a8a628e03 src/admin/web/css/60-monitoring.css
faab7ea6b07cdb69cbba3b9db74cc995ce12a7ab097fdc053227ddab72b23cdb src/admin/web/css/70-responsive.css faab7ea6b07cdb69cbba3b9db74cc995ce12a7ab097fdc053227ddab72b23cdb 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
9ef20a805e1382ef6602ed9dc57ff1674aec613e00738d66de0452ce6314bfad src/admin/web/dashboard-builtin-presets.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
@@ -268,7 +269,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
aea8f6f33a43e62701c4729758cd92d110380fb5b668f385cc4206aaec5e1bfa src/admin/web/index.html d52d09d35ef4e48d65a0031eaca078781c805579cb685246572220677c9b6f9c 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
@@ -358,13 +359,13 @@ 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
996c95b7e677ac630bc4d6613bfbad464a2d689cf30b138b5553ba6a077b4a48 src/cache/rules.rs a97558fb3f91d3b1d986004ea31b183d8cfb85f73cb212a3e1e6b9441a3d423a src/cache/rules.rs
76af193fa84aba7ebfdde4db3eb58c0abe44f94525497c0677237460e1a79248 src/cache/rules_tests.rs e994977368ffd5cf399cc03f5cf18af450f3734072cc98ef2e3d24eae43bf2f5 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
a1132b980833b1b4ce2bba9aa681ff255a0e2d61faaa65a316860da503ea1e27 src/cache/v022_cache_tests.rs a1132b980833b1b4ce2bba9aa681ff255a0e2d61faaa65a316860da503ea1e27 src/cache/v022_cache_tests.rs
4ba0a2e1c21a79cf68bf34cca1f2c2a3d7b20aef38f3b9f510743e60bc1d425f src/cache/varnish_compatible_tests.rs 7e6eceaa937bd3276d9533603424d9154092d7c2a6a85fc0d4431c5870b79db1 src/cache/varnish_compatible_tests.rs
3f56ef17d81b7dca532e5c66857119c7ee833788416e968dbbf464e562022be6 src/cache/vcl.rs 3f56ef17d81b7dca532e5c66857119c7ee833788416e968dbbf464e562022be6 src/cache/vcl.rs
1a2eb6684d9ea4a7e90970d936c75f7c8bbec46a4181fdf273be9bdac8eec847 src/compression/mod.rs 1a2eb6684d9ea4a7e90970d936c75f7c8bbec46a4181fdf273be9bdac8eec847 src/compression/mod.rs
8de82d9188c9c337690c6ec4afdad9fff20651c358e34602a93d8bb8c3d2489a src/compression/tests.rs 8de82d9188c9c337690c6ec4afdad9fff20651c358e34602a93d8bb8c3d2489a src/compression/tests.rs
@@ -375,8 +376,8 @@ fbea01fea1213d98aea812c1b78d5db289e09200b98ae514d742235cd3fa70e1 src/config/int
c0446a45e3bc8547dcce51579ea137e5c0e1e89f17d4dada950382909ee85745 src/config/model.rs c0446a45e3bc8547dcce51579ea137e5c0e1e89f17d4dada950382909ee85745 src/config/model.rs
75839458ddbc7480ec4492a95eeb67b617ba7d62f7b67e7a767a3453b74dbcbc src/config/route_policy_tests.rs 75839458ddbc7480ec4492a95eeb67b617ba7d62f7b67e7a767a3453b74dbcbc src/config/route_policy_tests.rs
067743d11f1747c4f46296e08174c4f03c3aea9f2d025f23eecda940e0c1fcb3 src/config/routing.rs 067743d11f1747c4f46296e08174c4f03c3aea9f2d025f23eecda940e0c1fcb3 src/config/routing.rs
f191b518f90c8cc70461ab1db1ab4616f5ce4604de2214d8943d1e76ceabd65f src/config/snapshot.rs 8ac3239f9537c38513e900f7e5c46aa50aa2d62872d2fd4f2cbd7ba5c8248d87 src/config/snapshot.rs
de7bb81b93662ce1dd78b7da4d38fb4b56568b269791090faeb2a3b83e5e285d src/config/tests.rs e79c79ffb6b8db04bf0e7581b217d3fd2cd88f23fc2b7e3874dca0eef19423bb src/config/tests.rs
f35de0ee1516ece6bbfd2b2a7db7d1e0f5048b0ec47cf2a3765dffb799abfd93 src/config/transport_tests.rs f35de0ee1516ece6bbfd2b2a7db7d1e0f5048b0ec47cf2a3765dffb799abfd93 src/config/transport_tests.rs
a09f361d70510d6226f4dd6785e649c3dc01ccafc70a4c8b0dcd098e224129b7 src/db.rs a09f361d70510d6226f4dd6785e649c3dc01ccafc70a4c8b0dcd098e224129b7 src/db.rs
c290d0cb02dfa5d2c60ecabac1cfb20c8884e3d14cca1944906c6d8e677f1784 src/db/api_tokens.rs c290d0cb02dfa5d2c60ecabac1cfb20c8884e3d14cca1944906c6d8e677f1784 src/db/api_tokens.rs
@@ -594,7 +595,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
e55a1b77d66f7a1b588b96c34a1d33351b9d10d296745215046a00904b35c4a0 tests/panel_refresh_contract.js 8835316772f3e93047babe4f6dbfa99d09a7034b79744055e541cf35e961c16a 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
+1 -1
View File
@@ -1,6 +1,6 @@
package main package main
var version = "0.38.0" // overridden by the package builder using -ldflags -X main.version var version = "0.38.1" // overridden by the package builder using -ldflags -X main.version
type config struct { type config struct {
Listen string Listen string
+28
View File
@@ -46,6 +46,34 @@ After **Unlock layout**, every block shows a compact toolbar: the **⠿** handle
**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.
### Built-in presets
**Dashboard presets** also offers twelve ready-made layouts (since 0.38.1). They are part of the application, cannot be changed or deleted and do not count towards the 16 saved presets. Loading one shows only its cards in a fixed order and width, hides all other cards, switches back to automatic arrangement and sets the card density and the history length. To keep your adjustments, load a preset, change it, then save it under your own name.
Laid out for a Full HD screen (1920×1080, 12-column grid, every row filled):
| Preset | Cards | History |
|---|---|---|
| Operations (NOC) | requests, active exchanges, bandwidth, errors, process memory, latency; traffic and connection charts; backend health, errors, probe RTT, unhealthy history; backend table | 5 min |
| Traffic and protocols | requests, requests/s, bandwidth, protocol mix, HTTP/2 and HTTP/3 share; protocol rates and traffic chart; HTTP/2, HTTP/3, TLS, WebSocket; connections | 5 min |
| Cache and compression | cache, outcomes, hit and miss rate, HOT memory, COLD storage; cache activity and diagnostics; compression and transformations; COLD queue, bandwidth, latency | 5 min |
| Backends and load balancing | health, healthy backends, capacity, queue, retries, rotations; requests, latency, errors, traffic, 5xx, timeouts; availability and latency charts; backend table | 5 min |
| Resources and process | process CPU, RSS, file descriptors, connections, memory, exchanges; CPU and memory charts; system load and memory breakdown; process and network diagnostics | 10 min |
| Errors and security | errors, error rate and share, rejected requests, TLS errors, certificate expiry; backend 5xx, errors, timeouts; traffic and latency charts | 5 min |
| Docker | agents, applications, host load, containers; Docker requests and host network; requests, errors, backend health, latency; backend table | 5 min |
| Web Server and PHP | status, kind, capacity, methods, error rate, PHP requests; requests, latency, traffic, failures, top services, status trend | 5 min |
| TCP/UDP streams | stream overview, sessions, stream backend health, stream traffic; active exchanges, bandwidth; connection charts | 5 min |
| Wall display | four large counters, a full-width traffic chart, backend health, latency, cache hit rate; normal density for reading from a distance | 10 min |
For phones (on screens up to about 700 px the small counters sit two per row and charts and tables take the full width):
| Preset | Cards | History |
|---|---|---|
| Phone: status | requests, errors, active exchanges, bandwidth, latency, cache hit rate; backend health; traffic chart | 1 min |
| Phone: on call | errors, request error rate, unhealthy backends, certificate expiry; backend errors; compact backend list | 1 min |
A preset only shows cards that have data on this installation; for example the Docker and Web Server presets stay mostly empty without Docker agents or Web services.
### SVG interface icons ### SVG interface icons
Under **Settings → Appearance → Interface**, enable **Show SVG interface icons** to add semantic line icons to the main navigation, action buttons, tabs and dialogs. The preference is stored per administrator as `interface_icons: true|false` in `/api/preferences` and is **off by default** for both new and upgraded accounts. Under **Settings → Appearance → Interface**, enable **Show SVG interface icons** to add semantic line icons to the main navigation, action buttons, tabs and dialogs. The preference is stored per administrator as `interface_icons: true|false` in `/api/preferences` and is **off by default** for both new and upgraded accounts.
+2 -2
View File
@@ -113,7 +113,7 @@ The cache is controlled globally (`cache`) and enabled per vhost (`vhosts[].cach
| `default_ttl_seconds` | 0 | Only responses that the backend marks cacheable (`Cache-Control`, `Expires`) are stored, unless a rule sets a TTL. | | `default_ttl_seconds` | 0 | Only responses that the backend marks cacheable (`Cache-Control`, `Expires`) are stored, unless a rule sets a TTL. |
| `max_ttl_seconds` | 86400 | Caps any TTL, also from rules. | | `max_ttl_seconds` | 86400 | Caps any TTL, also from rules. |
| `varnish_grace_seconds` | 60 | A just-expired object is served while it is refreshed in the background. | | `varnish_grace_seconds` | 60 | A just-expired object is served while it is refreshed in the background. |
| `bypass_prefixes` | `/api/`, `/admin/`, `/login` | Never cached, regardless of headers. | | `bypass_prefixes` | `/api`, `/admin`, `/login` | Never cached, regardless of headers. A prefix matches the path itself and everything below it (`/api` covers `/api` and `/api/…`, not `/apix`). |
| `static_ignore_cookies` | true | Static extensions (`static_extensions`) are cached even when the browser sends cookies. Turn off if your static files depend on the session. | | `static_ignore_cookies` | true | Static extensions (`static_extensions`) are cached even when the browser sends cookies. Turn off if your static files depend on the session. |
| `collapse_enabled` | true | Concurrent misses for the same URL wait for one backend request. | | `collapse_enabled` | true | Concurrent misses for the same URL wait for one backend request. |
| `stale_if_error_*` | timeouts, connection errors, 500/502/503/504 | Serve the last good copy when the backend fails. | | `stale_if_error_*` | timeouts, connection errors, 500/502/503/504 | Serve the last good copy when the backend fails. |
@@ -196,7 +196,7 @@ In a container, mount the file read-only (RustProxy never writes it) and keep `/
`GET /healthz` on `--health-listen` answers `200` while every vhost with backends has at least one healthy backend and `503` otherwise: `GET /healthz` on `--health-listen` answers `200` while every vhost with backends has at least one healthy backend and `503` otherwise:
```json ```json
{"status":"ok","mode":"headless","version":"0.38.0","revision":4,"uptime_seconds":120, {"status":"ok","mode":"headless","version":"0.38.1","revision":4,"uptime_seconds":120,
"last_reload":{"ok":true,"at_unix":1794743660,"error":null}, "last_reload":{"ok":true,"at_unix":1794743660,"error":null},
"vhosts_without_healthy_backends":[], "vhosts_without_healthy_backends":[],
"pools":[{"vhost":"app","healthy":3,"backends":3}]} "pools":[{"vhost":"app","healthy":3,"backends":3}]}
+3 -3
View File
@@ -53,8 +53,8 @@
"max_ttl_seconds": 86400, "max_ttl_seconds": 86400,
"varnish_grace_seconds": 60, "varnish_grace_seconds": 60,
"bypass_prefixes": [ "bypass_prefixes": [
"/api/", "/api",
"/admin/", "/admin",
"/login" "/login"
], ],
"static_ignore_cookies": true, "static_ignore_cookies": true,
@@ -356,4 +356,4 @@
] ]
} }
] ]
} }
+2 -2
View File
@@ -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.38.0` and the defaults this publishes: For example, with RustProxy version `0.38.1` and the defaults this publishes:
```text ```text
oci.example.net/network/rustproxy:0.38.0 oci.example.net/network/rustproxy:0.38.1
oci.example.net/network/rustproxy:latest oci.example.net/network/rustproxy:latest
oci.example.net/network/rustproxy:routeros oci.example.net/network/rustproxy:routeros
``` ```
+30
View File
@@ -3081,6 +3081,36 @@
"overviewLayoutAutoFitHint": "Re-flow this layout for the current screen width: cards keep a readable minimum width, holes at the end of a row are shared by the cards of that row and small steps at the bottom are closed. Saved widths and order do not change.", "overviewLayoutAutoFitHint": "Re-flow this layout for the current screen width: cards keep a readable minimum width, holes at the end of a row are shared by the cards of that row and small steps at the bottom are closed. Saved widths and order do not change.",
"overviewLayoutAutoFitWidened": "Shown {span} columns wide on this screen (Fit to screen); the saved width is unchanged.", "overviewLayoutAutoFitWidened": "Shown {span} columns wide on this screen (Fit to screen); the saved width is unchanged.",
"dashboardPresetsConflict": "Preset already exists or was removed. Refresh and try again.", "dashboardPresetsConflict": "Preset already exists or was removed. Refresh and try again.",
"dashboardBuiltinTitle": "Built-in presets",
"dashboardBuiltinHelp": "Ready-made layouts for common tasks. Loading one replaces the current arrangement; save it under your own name to keep changes.",
"dashboardPresetsOwnTitle": "My presets",
"dashboardBuiltinDesktop": "Full HD (1920×1080)",
"dashboardBuiltinMobile": "Phone",
"dashboardBuiltinLoaded": "Preset \"{name}\" loaded.",
"dashboardBuiltinOperations": "Operations (NOC)",
"dashboardBuiltinOperationsHelp": "Traffic, errors, latency and memory at a glance, live traffic and connections, backend health and the backend table.",
"dashboardBuiltinTraffic": "Traffic and protocols",
"dashboardBuiltinTrafficHelp": "Requests per second, bandwidth, HTTP/1.1–2–3 shares, TLS and WebSocket use, protocol rates and connections.",
"dashboardBuiltinCache": "Cache and compression",
"dashboardBuiltinCacheHelp": "Hit and miss rates, HOT and COLD memory and storage, cache diagnostics, compression and transformations.",
"dashboardBuiltinBackends": "Backends and load balancing",
"dashboardBuiltinBackendsHelp": "Health, capacity, queue, retries, rotations, per-backend requests, latency, errors, 5xx and timeouts, backend table.",
"dashboardBuiltinResources": "Resources and process",
"dashboardBuiltinResourcesHelp": "CPU, memory, file descriptors and connections of the process, system and memory breakdown, process and network diagnostics; 10-minute history.",
"dashboardBuiltinSecurity": "Errors and security",
"dashboardBuiltinSecurityHelp": "Error and rejection rates, TLS errors, certificate expiry, backend 5xx, errors and timeouts with traffic and latency.",
"dashboardBuiltinDocker": "Docker",
"dashboardBuiltinDockerHelp": "Docker agents, applications, host load and containers, Docker traffic and host network, backend health and table.",
"dashboardBuiltinWebServer": "Web Server and PHP",
"dashboardBuiltinWebServerHelp": "Built-in Web Server status, capacity, methods, error rate, PHP requests, latency, failures, traffic and top services.",
"dashboardBuiltinStreams": "TCP/UDP streams",
"dashboardBuiltinStreamsHelp": "Stream overview, sessions, stream backend health and traffic with connection charts.",
"dashboardBuiltinWall": "Wall display",
"dashboardBuiltinWallHelp": "Few large cards readable from a distance: requests, connections, bandwidth, errors, a full-width traffic chart; 10-minute history.",
"dashboardBuiltinMobileStatus": "Phone: status",
"dashboardBuiltinMobileStatusHelp": "Two small cards per row: requests, errors, connections, bandwidth, latency and cache hit rate, then backend health and the traffic chart.",
"dashboardBuiltinMobileOnCall": "Phone: on call",
"dashboardBuiltinMobileOnCallHelp": "Only what needs a reaction: error rates, unhealthy backends, certificate expiry, backend errors and a compact backend list.",
"overviewLayoutInlineDragging": "Dragging: drop the block on the dashed frame. Esc restores its previous position.", "overviewLayoutInlineDragging": "Dragging: drop the block on the dashed frame. Esc restores its previous position.",
"overviewLayoutInlineCompact": "Fill gaps", "overviewLayoutInlineCompact": "Fill gaps",
"overviewLayoutInlineCompactHint": "Move blocks into empty grid space once (you can still cancel before saving)", "overviewLayoutInlineCompactHint": "Move blocks into empty grid space once (you can still cancel before saving)",
+30
View File
@@ -3081,6 +3081,36 @@
"overviewLayoutAutoFitHint": "Dopasowuje układ do bieżącej szerokości ekranu: bloki zachowują czytelną minimalną szerokość, puste miejsce na końcu rzędu dzielą bloki z tego rzędu, a małe ząbki na dole są domykane. Zapisane szerokości i kolejność się nie zmieniają.", "overviewLayoutAutoFitHint": "Dopasowuje układ do bieżącej szerokości ekranu: bloki zachowują czytelną minimalną szerokość, puste miejsce na końcu rzędu dzielą bloki z tego rzędu, a małe ząbki na dole są domykane. Zapisane szerokości i kolejność się nie zmieniają.",
"overviewLayoutAutoFitWidened": "Na tym ekranie wyświetlany na {span} kolumnach (Dopasuj do ekranu); zapisana szerokość się nie zmienia.", "overviewLayoutAutoFitWidened": "Na tym ekranie wyświetlany na {span} kolumnach (Dopasuj do ekranu); zapisana szerokość się nie zmienia.",
"dashboardPresetsConflict": "Preset już istnieje lub został usunięty. Odśwież listę i spróbuj ponownie.", "dashboardPresetsConflict": "Preset już istnieje lub został usunięty. Odśwież listę i spróbuj ponownie.",
"dashboardBuiltinTitle": "Wbudowane presety",
"dashboardBuiltinHelp": "Gotowe układy do typowych zadań. Wczytanie zastępuje bieżący układ; zapisz go pod własną nazwą, aby zachować zmiany.",
"dashboardPresetsOwnTitle": "Moje presety",
"dashboardBuiltinDesktop": "Full HD (1920×1080)",
"dashboardBuiltinMobile": "Telefon",
"dashboardBuiltinLoaded": "Wczytano preset „{name}”.",
"dashboardBuiltinOperations": "Operacje (NOC)",
"dashboardBuiltinOperationsHelp": "Ruch, błędy, opóźnienie i pamięć w skrócie, ruch i połączenia na żywo, kondycja backendów i tabela backendów.",
"dashboardBuiltinTraffic": "Ruch i protokoły",
"dashboardBuiltinTrafficHelp": "Żądania na sekundę, przepustowość, udział HTTP/1.1–2–3, TLS i WebSocket, tempo protokołów i połączenia.",
"dashboardBuiltinCache": "Cache i kompresja",
"dashboardBuiltinCacheHelp": "Trafienia i chybienia, pamięć i dysk HOT/COLD, diagnostyka cache, kompresja i transformacje.",
"dashboardBuiltinBackends": "Backendy i balansowanie",
"dashboardBuiltinBackendsHelp": "Kondycja, pojemność, kolejka, ponowienia, rotacje, żądania, opóźnienia, błędy, 5xx i timeouty backendów, tabela backendów.",
"dashboardBuiltinResources": "Zasoby i proces",
"dashboardBuiltinResourcesHelp": "CPU, pamięć, deskryptory i połączenia procesu, wykres systemu i rozkład pamięci, diagnostyka procesu i sieci; historia 10 minut.",
"dashboardBuiltinSecurity": "Błędy i bezpieczeństwo",
"dashboardBuiltinSecurityHelp": "Odsetek błędów i odrzuceń, błędy TLS, wygasanie certyfikatów, 5xx, błędy i timeouty backendów oraz ruch i opóźnienia.",
"dashboardBuiltinDocker": "Docker",
"dashboardBuiltinDockerHelp": "Agenci Docker, aplikacje, obciążenie hosta i kontenery, ruch Docker i sieć hosta, kondycja i tabela backendów.",
"dashboardBuiltinWebServer": "Serwer WWW i PHP",
"dashboardBuiltinWebServerHelp": "Stan wbudowanego serwera WWW, pojemność, metody, błędy, żądania PHP, opóźnienia, awarie, ruch i najaktywniejsze usługi.",
"dashboardBuiltinStreams": "Strumienie TCP/UDP",
"dashboardBuiltinStreamsHelp": "Przegląd strumieni, sesje, kondycja backendów strumieni i ruch wraz z wykresami połączeń.",
"dashboardBuiltinWall": "Ekran ścienny",
"dashboardBuiltinWallHelp": "Kilka dużych kart czytelnych z daleka: żądania, połączenia, przepustowość, błędy i wykres ruchu na całą szerokość; historia 10 minut.",
"dashboardBuiltinMobileStatus": "Telefon: stan",
"dashboardBuiltinMobileStatusHelp": "Dwie małe karty w rzędzie: żądania, błędy, połączenia, przepustowość, opóźnienie i trafienia cache, a pod nimi kondycja backendów i wykres ruchu.",
"dashboardBuiltinMobileOnCall": "Telefon: dyżur",
"dashboardBuiltinMobileOnCallHelp": "Tylko to, co wymaga reakcji: odsetek błędów, niesprawne backendy, wygasanie certyfikatów, błędy backendów i zwięzła lista backendów.",
"overviewLayoutInlineDragging": "Przeciąganie: upuść blok w miejscu ramki. Esc przywraca poprzednią pozycję.", "overviewLayoutInlineDragging": "Przeciąganie: upuść blok w miejscu ramki. Esc przywraca poprzednią pozycję.",
"overviewLayoutInlineCompact": "Uzupełnij luki", "overviewLayoutInlineCompact": "Uzupełnij luki",
"overviewLayoutInlineCompactHint": "Dosuń bloki w puste miejsca siatki (jednorazowo, przed zapisaniem możesz to anulować)", "overviewLayoutInlineCompactHint": "Dosuń bloki w puste miejsca siatki (jednorazowo, przed zapisaniem możesz to anulować)",
+1 -1
View File
@@ -2,7 +2,7 @@
"openapi": "3.0.3", "openapi": "3.0.3",
"info": { "info": {
"title": "RustProxy Administration API", "title": "RustProxy Administration API",
"version": "0.38.0", "version": "0.38.1",
"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": [
+63
View File
@@ -430,3 +430,66 @@ fn docker_widget_agents_accept_only_docker_cards_and_valid_ids() {
.insert("docker_apps".into(), "bad id!".into()); .insert("docker_apps".into(), "bad id!".into());
assert!(validate_admin_preferences(&prefs).is_err()); assert!(validate_admin_preferences(&prefs).is_err());
} }
#[test]
fn builtin_dashboard_presets_are_valid_layouts_with_translations() {
#[derive(serde::Deserialize)]
#[serde(deny_unknown_fields)]
struct BuiltinPreset {
id: String,
form: String,
name_key: String,
description_key: String,
dashboard_density: String,
overview_samples: u16,
widgets: Vec<(String, u8)>,
}
let presets: Vec<BuiltinPreset> =
serde_json::from_str(include_str!("web/dashboard-builtin-presets.json")).unwrap();
assert!(presets.len() >= 10);
assert!(presets.iter().any(|preset| preset.form == "mobile"));
let mut ids = std::collections::HashSet::new();
let languages: Vec<serde_json::Value> = [
include_str!("../../langs/en_US.json"),
include_str!("../../langs/pl_pl.json"),
]
.into_iter()
.map(|pack| serde_json::from_str(pack).unwrap())
.collect();
for preset in &presets {
assert!(ids.insert(preset.id.as_str()), "{}", preset.id);
assert!(matches!(preset.form.as_str(), "desktop" | "mobile"));
for language in &languages {
for key in [&preset.name_key, &preset.description_key] {
assert!(
language["translations"][key.as_str()].is_string(),
"{} missing translation {key}",
preset.id
);
}
}
let visible: Vec<String> = preset.widgets.iter().map(|(id, _)| id.clone()).collect();
let unique: std::collections::HashSet<&String> = visible.iter().collect();
assert_eq!(unique.len(), visible.len(), "{}", preset.id);
let hidden: Vec<String> = DASHBOARD_WIDGETS
.iter()
.map(|widget| widget.id.clone())
.filter(|id| !visible.contains(id))
.collect();
let mut order = visible.clone();
order.extend(hidden.iter().cloned());
let layout = DashboardPresetLayout {
dashboard_widgets: order,
dashboard_hidden_widgets: hidden,
dashboard_widget_sizes: Some(preset.widgets.iter().cloned().collect()),
dashboard_widget_heights: None,
dashboard_density: preset.dashboard_density.clone(),
overview_samples: preset.overview_samples,
};
assert!(
validate_dashboard_preset_layout(&layout).is_ok(),
"invalid built-in preset {}",
preset.id
);
}
}
+3
View File
@@ -70,6 +70,9 @@ fn admin_app_javascript() -> &'static str {
include_str!("web/dashboard-widgets.json"), include_str!("web/dashboard-widgets.json"),
");", ");",
include_str!("web/app/preferences.js"), include_str!("web/app/preferences.js"),
"const ADMIN_DASHBOARD_BUILTIN_PRESETS = Object.freeze(",
include_str!("web/dashboard-builtin-presets.json"),
");",
include_str!("web/app/dashboard-presets.js"), include_str!("web/app/dashboard-presets.js"),
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"),
+46 -1
View File
@@ -1,6 +1,7 @@
window.rustProxyDashboardLayout = (() => { window.rustProxyDashboardLayout = (() => {
const dialog = $("overview-presets-dialog"); const dialog = $("overview-presets-dialog");
const list = $("overview-presets-list"); const list = $("overview-presets-list");
const builtinList = $("overview-presets-builtin");
const input = $("overview-presets-name"); const input = $("overview-presets-name");
const message = $("overview-presets-message"); const message = $("overview-presets-message");
const save = $("overview-presets-save"); const save = $("overview-presets-save");
@@ -30,7 +31,7 @@ window.rustProxyDashboardLayout = (() => {
} }
function lock(value) { function lock(value) {
busy = value; busy = value;
for (const control of [save, factory, close, input, ...list.querySelectorAll("button")]) for (const control of [save, factory, close, input, ...list.querySelectorAll("button"), ...(builtinList?.querySelectorAll("button") || [])])
if (control) control.disabled = value; if (control) control.disabled = value;
} }
async function run(fn) { async function run(fn) {
@@ -58,7 +59,49 @@ window.rustProxyDashboardLayout = (() => {
button.addEventListener("click", () => void run(fn)); button.addEventListener("click", () => void run(fn));
return button; return button;
} }
function builtinLayout(preset) {
const visible = preset.widgets.map(([id]) => id).filter(id => ADMIN_DASHBOARD_BY_ID.has(id));
const sizes = {};
for (const [id, span] of preset.widgets) if (ADMIN_DASHBOARD_BY_ID.has(id)) sizes[id] = span;
return {
dashboard_widgets: normalizeDashboardWidgets(visible),
dashboard_hidden_widgets: ADMIN_DASHBOARD_WIDGETS.filter(id => !visible.includes(id)),
dashboard_widget_sizes: sizes,
dashboard_widget_heights: null,
dashboard_widget_positions: null,
dashboard_auto_fit: true,
dashboard_density: preset.dashboard_density,
overview_samples: preset.overview_samples,
};
}
function renderBuiltin() {
if (!builtinList) return;
const groups = [["desktop", "dashboardBuiltinDesktop"], ["mobile", "dashboardBuiltinMobile"]].map(([form, key]) => {
const items = ADMIN_DASHBOARD_BUILTIN_PRESETS.filter(preset => preset.form === form);
if (!items.length) return null;
const group = el("div", undefined, "overview-presets-builtin-group");
group.append(el("h3", t(key)));
for (const preset of items) {
const row = el("div", undefined, "overview-presets-row overview-presets-builtin-row");
row.setAttribute("role", "listitem");
row.dataset.builtinPreset = preset.id;
const text = el("div", undefined, "overview-presets-builtin-text");
text.append(el("strong", t(preset.name_key)), el("span", t(preset.description_key), "fine"));
const actions = el("div", undefined, "overview-presets-actions");
actions.append(entryButton("dashboardPresetsLoad", "primary", async () => {
await apply(builtinLayout(preset));
dialog.close();
toast(translateName("dashboardBuiltinLoaded", t(preset.name_key)));
}, t(preset.name_key)));
row.append(text, actions);
group.append(row);
}
return group;
}).filter(Boolean);
builtinList.replaceChildren(...groups);
}
function render() { function render() {
renderBuiltin();
const elements = presets.map(preset => { const elements = presets.map(preset => {
const row = el("div", undefined, "overview-presets-row"); const row = el("div", undefined, "overview-presets-row");
row.setAttribute("role", "listitem"); row.setAttribute("role", "listitem");
@@ -100,6 +143,8 @@ window.rustProxyDashboardLayout = (() => {
dashboard_widget_sizes: layout.dashboard_widget_sizes === null ? null : { ...layout.dashboard_widget_sizes }, dashboard_widget_sizes: layout.dashboard_widget_sizes === null ? null : { ...layout.dashboard_widget_sizes },
dashboard_widget_heights: normalizeDashboardWidgetHeights(layout.dashboard_widget_heights), dashboard_widget_heights: normalizeDashboardWidgetHeights(layout.dashboard_widget_heights),
dashboard_density: layout.dashboard_density, dashboard_density: layout.dashboard_density,
...("dashboard_widget_positions" in layout ? { dashboard_widget_positions: layout.dashboard_widget_positions } : {}),
...("dashboard_auto_fit" in layout ? { dashboard_auto_fit: layout.dashboard_auto_fit } : {}),
}); });
window.rustProxyOverviewSamples.setLimit(layout.overview_samples, true); window.rustProxyOverviewSamples.setLimit(layout.overview_samples, true);
} }
+32
View File
@@ -2386,6 +2386,38 @@ html:is([data-corner-style=square], [data-corner-style=subtle], [data-corner-sty
background: var(--panel); background: var(--panel);
} }
.overview-presets-builtin {
display: grid;
gap: 8px;
}
.overview-presets-builtin h3,
.overview-presets-own-title,
.overview-presets-builtin-group h3 {
margin: 0;
font-size: 13px;
font-weight: 650;
}
.overview-presets-builtin-group {
display: grid;
gap: 6px;
}
.overview-presets-builtin-group h3 {
color: var(--muted);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.overview-presets-builtin-text {
display: grid;
gap: 2px;
min-width: 0;
flex: 1 1 260px;
}
.overview-presets-row strong { .overview-presets-row strong {
font-size: 13px; font-size: 13px;
overflow-wrap: anywhere; overflow-wrap: anywhere;
@@ -0,0 +1,646 @@
[
{
"id": "operations",
"form": "desktop",
"name_key": "dashboardBuiltinOperations",
"description_key": "dashboardBuiltinOperationsHelp",
"dashboard_density": "compact",
"overview_samples": 300,
"widgets": [
[
"requests",
2
],
[
"active",
2
],
[
"bandwidth",
2
],
[
"errors",
2
],
[
"memory",
2
],
[
"extra_response_latency",
2
],
[
"traffic_chart",
6
],
[
"connection_chart",
6
],
[
"backend_health",
3
],
[
"backend_errors",
3
],
[
"backend_latency",
3
],
[
"extra_backend_unhealthy",
3
],
[
"backend_table",
12
]
]
},
{
"id": "traffic",
"form": "desktop",
"name_key": "dashboardBuiltinTraffic",
"description_key": "dashboardBuiltinTrafficHelp",
"dashboard_density": "compact",
"overview_samples": 300,
"widgets": [
[
"requests",
2
],
[
"extra_total_rps",
2
],
[
"bandwidth",
2
],
[
"http_protocol",
2
],
[
"extra_h2_share",
2
],
[
"extra_h3_share",
2
],
[
"wide_protocol_rates",
6
],
[
"traffic_chart",
6
],
[
"http2",
3
],
[
"http3",
3
],
[
"tls",
3
],
[
"websocket_protocol",
3
],
[
"wide_connections",
6
],
[
"connection_chart",
6
]
]
},
{
"id": "cache",
"form": "desktop",
"name_key": "dashboardBuiltinCache",
"description_key": "dashboardBuiltinCacheHelp",
"dashboard_density": "compact",
"overview_samples": 300,
"widgets": [
[
"cache",
2
],
[
"cache_outcomes",
2
],
[
"extra_cache_hit_rate",
2
],
[
"extra_cache_miss_rate",
2
],
[
"extra_cache_memory",
2
],
[
"extra_cold_storage",
2
],
[
"wide_cache_activity",
6
],
[
"cache_diagnostics",
6
],
[
"wide_compression_activity",
6
],
[
"wide_transform_activity",
6
],
[
"extra_cold_queue_memory",
4
],
[
"bandwidth",
4
],
[
"extra_response_latency",
4
]
]
},
{
"id": "backends",
"form": "desktop",
"name_key": "dashboardBuiltinBackends",
"description_key": "dashboardBuiltinBackendsHelp",
"dashboard_density": "compact",
"overview_samples": 300,
"widgets": [
[
"backend_health",
2
],
[
"extra_backends_healthy",
2
],
[
"backend_capacity",
2
],
[
"backend_queue",
2
],
[
"backend_retries",
2
],
[
"backend_rotations",
2
],
[
"backend_requests",
4
],
[
"backend_latency",
4
],
[
"backend_errors",
4
],
[
"backend_traffic",
4
],
[
"backend_http5xx",
4
],
[
"backend_timeouts",
4
],
[
"wide_backend_health",
6
],
[
"wide_latency",
6
],
[
"backend_table",
12
]
]
},
{
"id": "resources",
"form": "desktop",
"name_key": "dashboardBuiltinResources",
"description_key": "dashboardBuiltinResourcesHelp",
"dashboard_density": "compact",
"overview_samples": 600,
"widgets": [
[
"extra_process_cpu",
2
],
[
"extra_process_rss",
2
],
[
"extra_process_fds",
2
],
[
"extra_open_connections",
2
],
[
"memory",
2
],
[
"extra_active_exchanges",
2
],
[
"wide_cpu",
6
],
[
"wide_memory",
6
],
[
"system_chart",
6
],
[
"memory_breakdown",
6
],
[
"process_diagnostics",
6
],
[
"network_diagnostics",
6
]
]
},
{
"id": "security",
"form": "desktop",
"name_key": "dashboardBuiltinSecurity",
"description_key": "dashboardBuiltinSecurityHelp",
"dashboard_density": "compact",
"overview_samples": 300,
"widgets": [
[
"errors",
2
],
[
"extra_request_error_rate",
2
],
[
"extra_error_share",
2
],
[
"extra_rejected_rate",
2
],
[
"extra_tls_error_rate",
2
],
[
"extra_cert_expiry",
2
],
[
"backend_http5xx",
4
],
[
"backend_errors",
4
],
[
"backend_timeouts",
4
],
[
"traffic_chart",
6
],
[
"wide_latency",
6
]
]
},
{
"id": "docker",
"form": "desktop",
"name_key": "dashboardBuiltinDocker",
"description_key": "dashboardBuiltinDockerHelp",
"dashboard_density": "compact",
"overview_samples": 300,
"widgets": [
[
"docker_agents",
3
],
[
"docker_apps",
3
],
[
"docker_host_load",
3
],
[
"docker_containers",
3
],
[
"docker_requests",
6
],
[
"docker_host_network",
6
],
[
"requests",
3
],
[
"errors",
3
],
[
"backend_health",
3
],
[
"extra_response_latency",
3
],
[
"backend_table",
12
]
]
},
{
"id": "webserver",
"form": "desktop",
"name_key": "dashboardBuiltinWebServer",
"description_key": "dashboardBuiltinWebServerHelp",
"dashboard_density": "compact",
"overview_samples": 300,
"widgets": [
[
"www_status",
2
],
[
"www_kind",
2
],
[
"www_capacity",
2
],
[
"www_methods",
2
],
[
"www_error_rate",
2
],
[
"www_php_requests",
2
],
[
"www_requests",
6
],
[
"www_latency",
6
],
[
"www_traffic",
6
],
[
"www_failures",
6
],
[
"www_top_services",
6
],
[
"www_status_trend",
6
]
]
},
{
"id": "streams",
"form": "desktop",
"name_key": "dashboardBuiltinStreams",
"description_key": "dashboardBuiltinStreamsHelp",
"dashboard_density": "compact",
"overview_samples": 300,
"widgets": [
[
"stream_overview",
4
],
[
"stream_sessions",
4
],
[
"stream_backend_health",
4
],
[
"stream_traffic",
6
],
[
"active",
3
],
[
"bandwidth",
3
],
[
"connection_chart",
6
],
[
"wide_connections",
6
]
]
},
{
"id": "wall",
"form": "desktop",
"name_key": "dashboardBuiltinWall",
"description_key": "dashboardBuiltinWallHelp",
"dashboard_density": "normal",
"overview_samples": 600,
"widgets": [
[
"requests",
3
],
[
"active",
3
],
[
"bandwidth",
3
],
[
"errors",
3
],
[
"traffic_chart",
12
],
[
"backend_health",
4
],
[
"extra_response_latency",
4
],
[
"extra_cache_hit_rate",
4
]
]
},
{
"id": "mobile_status",
"form": "mobile",
"name_key": "dashboardBuiltinMobileStatus",
"description_key": "dashboardBuiltinMobileStatusHelp",
"dashboard_density": "compact",
"overview_samples": 60,
"widgets": [
[
"requests",
2
],
[
"errors",
2
],
[
"active",
2
],
[
"bandwidth",
2
],
[
"extra_response_latency",
2
],
[
"extra_cache_hit_rate",
2
],
[
"backend_health",
12
],
[
"traffic_chart",
12
]
]
},
{
"id": "mobile_oncall",
"form": "mobile",
"name_key": "dashboardBuiltinMobileOnCall",
"description_key": "dashboardBuiltinMobileOnCallHelp",
"dashboard_density": "compact",
"overview_samples": 60,
"widgets": [
[
"errors",
2
],
[
"extra_request_error_rate",
2
],
[
"extra_backend_unhealthy",
2
],
[
"extra_cert_expiry",
2
],
[
"backend_errors",
12
],
[
"backend_tiny",
12
]
]
}
]
+6
View File
@@ -4212,6 +4212,12 @@
<div class="overview-presets-content"> <div class="overview-presets-content">
<p class="fine" data-i18n="dashboardPresetsHelp">Save named arrangements and restore them from any browser. <p class="fine" data-i18n="dashboardPresetsHelp">Save named arrangements and restore them from any browser.
Use Unlock layout on Overview to move, resize or hide cards before saving a preset.</p> Use Unlock layout on Overview to move, resize or hide cards before saving a preset.</p>
<section class="overview-presets-builtin" aria-labelledby="overview-presets-builtin-title">
<h3 id="overview-presets-builtin-title" data-i18n="dashboardBuiltinTitle">Built-in presets</h3>
<p class="fine" data-i18n="dashboardBuiltinHelp">Ready-made layouts for common tasks. Loading one replaces the current arrangement; save it under your own name to keep changes.</p>
<div class="overview-presets-list" id="overview-presets-builtin" role="list"></div>
</section>
<h3 class="overview-presets-own-title" data-i18n="dashboardPresetsOwnTitle">My presets</h3>
<div class="overview-presets-create"> <div class="overview-presets-create">
<label for="overview-presets-name" data-i18n="dashboardPresetsName">Preset name</label> <label for="overview-presets-name" data-i18n="dashboardPresetsName">Preset name</label>
<div class="overview-presets-create-controls"> <div class="overview-presets-create-controls">
+6 -1
View File
@@ -416,10 +416,15 @@ fn compile_condition(condition: &RuleCondition, stage: RuleStage) -> Result<Comp
.values .values
.iter() .iter()
.map(|value| { .map(|value| {
let value = if condition.field == ConditionField::Extension {
value.trim().trim_start_matches('.')
} else {
value.as_str()
};
if fold { if fold {
value.to_ascii_lowercase() value.to_ascii_lowercase()
} else { } else {
value.clone() value.to_owned()
} }
}) })
.collect(); .collect();
+20
View File
@@ -23,6 +23,26 @@ mod cache_rules_tests {
} }
} }
#[test]
fn extension_values_with_a_leading_dot_or_capitals_match() {
let global = vec![rule(
serde_json::json!({"id": "assets", "conditions": [{"field": "extension", "operator": "equals", "values": [".CSS", " .js"]}], "actions": [{"type": "pass"}]}),
)];
validate_rules(&global, true).unwrap();
let rules = CompiledRules::compile("shop", &[], &global, false).unwrap();
for path in ["/app.css", "/theme/app.CSS", "/bundle.js"] {
assert_eq!(
rules.evaluate_request(&request(path, None, &[]), false).pass.as_deref(),
Some("assets"),
"{path}"
);
}
assert!(rules
.evaluate_request(&request("/app.json", None, &[]), false)
.pass
.is_none());
}
#[test] #[test]
fn request_rules_pass_strip_cookies_query_and_hash() { fn request_rules_pass_strip_cookies_query_and_hash() {
let global = vec![ let global = vec![
+13
View File
@@ -189,6 +189,19 @@ mod varnish_compatible_tests {
), ),
RequestPolicy::Bypass("path_excluded") RequestPolicy::Bypass("path_excluded")
); );
settings.bypass_prefixes = vec!["/api/".into()];
for path in ["/api/", "/api/health"] {
assert_eq!(
request_policy(&Method::GET, &HeaderMap::new(), true, path, false, &settings),
RequestPolicy::Bypass("path_excluded"),
"{path}"
);
}
assert_ne!(
request_policy(&Method::GET, &HeaderMap::new(), true, "/apix", false, &settings),
RequestPolicy::Bypass("path_excluded")
);
settings.bypass_prefixes = vec!["/private".into()];
assert_eq!( assert_eq!(
request_policy( request_policy(
&Method::POST, &Method::POST,
+1 -1
View File
@@ -401,7 +401,7 @@ pub fn prefix_matches(prefix: &str, path: &str) -> bool {
|| path == prefix || path == prefix
|| path || path
.strip_prefix(prefix) .strip_prefix(prefix)
.is_some_and(|tail| tail.starts_with('/')) .is_some_and(|tail| tail.starts_with('/') || prefix.ends_with('/'))
} }
pub(crate) fn valid_id(id: &str) -> bool { pub(crate) fn valid_id(id: &str) -> bool {
!id.is_empty() !id.is_empty()
+4
View File
@@ -689,6 +689,10 @@ mod tests {
assert!(prefix_matches("/api", "/api")); assert!(prefix_matches("/api", "/api"));
assert!(prefix_matches("/api", "/api/users")); assert!(prefix_matches("/api", "/api/users"));
assert!(!prefix_matches("/api", "/apix")); assert!(!prefix_matches("/api", "/apix"));
assert!(prefix_matches("/api/", "/api/"));
assert!(prefix_matches("/api/", "/api/users"));
assert!(!prefix_matches("/api/", "/api"));
assert!(!prefix_matches("/api/", "/apix"));
assert!(prefix_matches("/", "/anything")); assert!(prefix_matches("/", "/anything"));
} }
#[test] #[test]
+1 -1
View File
@@ -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.38.0"); assert.equal(openapi.info.version, "0.38.1");
console.log("Panel refresh/API contract checks: OK"); console.log("Panel refresh/API contract checks: OK");