v0.38.6
This commit is contained in:
1 parent
6fe2aa137b
commit
a977cf78a5
18 files changed
+182
-19
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
# RustProxy source and documentation maintenance
|
# RustProxy source and documentation maintenance
|
||||||
|
|
||||||
Current source version: **0.38.5**. The Cargo package and binary are named `rust-proxy`.
|
Current source version: **0.38.6**. 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,16 @@
|
|||||||
|
|
||||||
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.6 — chart crosshair and editor layout
|
||||||
|
|
||||||
|
Panel-only release: no configuration, API or proxy behavior changes.
|
||||||
|
|
||||||
|
- **Chart crosshair:** with **Settings → Appearance → Show X/Y scales on charts** on, pointing at a chart (or touching it) shows dashed guide lines through the pointer with the Y value in the chart's unit and the X sample number; charts with one scale per series show each series' value. It follows the interface scale and corner style and is hidden when axes are off.
|
||||||
|
- **Switches never share a row with fields:** in the vhost, stream, redirect and Web Service editors a switch that enables fields now takes its own row and a switch after fields starts a new row, so the fields below line up (for example HSTS, security headers, per-client IP rate limit, response identity and diagnostics, WebSocket, retries, keep-alive, passive health, .htaccess). **Override global TLS policy** has its own row above the TLS versions.
|
||||||
|
- **Aligned fields:** fields in one row of an editor or settings form now start their inputs and drop-downs on the same line even when one caption wraps to more lines (for example Tinyauth URL / public login URL, passive health thresholds, Prometheus address / path); multi-line text areas take the whole row. Stacked switches no longer leave large gaps between them, most visible on phones.
|
||||||
|
- **Server-Timing metric names:** the option for the pre-0.38.2 names is now labelled **Legacy (proxy, origin, cache)**; the stored value `legacy` is unchanged.
|
||||||
|
- **Risk settings as switches:** **Force an incompatible certificate**, **Allow private origin IP** (backends and authentication providers) and **Allow local RustProxy listener as backend** are switches like the other settings, also in the Docker app editor. One-off confirmations before an action (ACME terms, production issuance, cache cleanup option) stay checkboxes.
|
||||||
|
|
||||||
## 0.38.5 — instant panel
|
## 0.38.5 — instant panel
|
||||||
|
|
||||||
Panel-only release: no configuration, API or proxy behavior changes. Measured on a replay of a production installation with 50 Docker apps (same data before and after): page elements 116 000 → 20 000, tab switches typically 110–310 ms → 12–50 ms, opening **Docker vhosts** about 1.6 s of blocked page → under 100 ms, work per live update 50–135 ms → 10–45 ms.
|
Panel-only release: no configuration, API or proxy behavior changes. Measured on a replay of a production installation with 50 Docker apps (same data before and after): page elements 116 000 → 20 000, tab switches typically 110–310 ms → 12–50 ms, opening **Docker vhosts** about 1.6 s of blocked page → under 100 ms, work per live update 50–135 ms → 10–45 ms.
|
||||||
|
|||||||
Generated
+1
-1
@@ -1943,7 +1943,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rust-proxy"
|
name = "rust-proxy"
|
||||||
version = "0.38.5"
|
version = "0.38.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rust-proxy"
|
name = "rust-proxy"
|
||||||
version = "0.38.5"
|
version = "0.38.6"
|
||||||
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"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
var version = "0.38.5" // overridden by the package builder using -ldflags -X main.version
|
var version = "0.38.6" // overridden by the package builder using -ldflags -X main.version
|
||||||
|
|
||||||
type config struct {
|
type config struct {
|
||||||
Listen string
|
Listen string
|
||||||
|
|||||||
+1
-1
@@ -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.5","revision":4,"uptime_seconds":120,
|
{"status":"ok","mode":"headless","version":"0.38.6","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}]}
|
||||||
|
|||||||
@@ -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.5` and the defaults this publishes:
|
For example, with RustProxy version `0.38.6` and the defaults this publishes:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
oci.example.net/network/rustproxy:0.38.5
|
oci.example.net/network/rustproxy:0.38.6
|
||||||
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
@@ -983,7 +983,7 @@
|
|||||||
"vhTimingHeaderNames": "Server-Timing metric names",
|
"vhTimingHeaderNames": "Server-Timing metric names",
|
||||||
"vhTimingHeaderNamesStandard": "Reverse proxy (proxy, upstream, proxy-cache)",
|
"vhTimingHeaderNamesStandard": "Reverse proxy (proxy, upstream, proxy-cache)",
|
||||||
"vhTimingHeaderNamesCdn": "CDN edge (edge, origin, cdn-cache)",
|
"vhTimingHeaderNamesCdn": "CDN edge (edge, origin, cdn-cache)",
|
||||||
"vhTimingHeaderNamesLegacy": "Before 0.38.2 (proxy, origin, cache)",
|
"vhTimingHeaderNamesLegacy": "Legacy (proxy, origin, cache)",
|
||||||
"vhTimingAllowOrigin": "Timing-Allow-Origin (origins that may read the timings, or *)",
|
"vhTimingAllowOrigin": "Timing-Allow-Origin (origins that may read the timings, or *)",
|
||||||
"vhRateEnabled": "Enable per-client IP rate limit",
|
"vhRateEnabled": "Enable per-client IP rate limit",
|
||||||
"vhRateRequests": "Requests per window",
|
"vhRateRequests": "Requests per window",
|
||||||
|
|||||||
+1
-1
@@ -983,7 +983,7 @@
|
|||||||
"vhTimingHeaderNames": "Nazwy metryk Server-Timing",
|
"vhTimingHeaderNames": "Nazwy metryk Server-Timing",
|
||||||
"vhTimingHeaderNamesStandard": "Reverse proxy (proxy, upstream, proxy-cache)",
|
"vhTimingHeaderNamesStandard": "Reverse proxy (proxy, upstream, proxy-cache)",
|
||||||
"vhTimingHeaderNamesCdn": "Brzeg CDN (edge, origin, cdn-cache)",
|
"vhTimingHeaderNamesCdn": "Brzeg CDN (edge, origin, cdn-cache)",
|
||||||
"vhTimingHeaderNamesLegacy": "Sprzed 0.38.2 (proxy, origin, cache)",
|
"vhTimingHeaderNamesLegacy": "Tryb zgodności (proxy, origin, cache)",
|
||||||
"vhTimingAllowOrigin": "Timing-Allow-Origin (originy, które mogą czytać czasy, albo *)",
|
"vhTimingAllowOrigin": "Timing-Allow-Origin (originy, które mogą czytać czasy, albo *)",
|
||||||
"vhRateEnabled": "Włącz limit żądań per IP klienta",
|
"vhRateEnabled": "Włącz limit żądań per IP klienta",
|
||||||
"vhRateRequests": "Żądania na okno",
|
"vhRateRequests": "Żądania na okno",
|
||||||
|
|||||||
@@ -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.5",
|
"version": "0.38.6",
|
||||||
"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": [
|
||||||
|
|||||||
@@ -50,6 +50,45 @@ window.rustProxyChartScale = (() => {
|
|||||||
}
|
}
|
||||||
return `${format(n)}${unit === "percent" ? "%" : unit === "ms" ? " ms" : unit === "rate" ? "/s" : ""}`;
|
return `${format(n)}${unit === "percent" ? "%" : unit === "ms" ? " ms" : unit === "rate" ? "/s" : ""}`;
|
||||||
}
|
}
|
||||||
|
// Crosshair: with axes enabled, dashed guide lines follow the pointer and
|
||||||
|
// label the Y value and X sample under it. Values come from the same
|
||||||
|
// axis data the overlay uses, so they match the drawn scale.
|
||||||
|
function crosshairValues(svg, event) {
|
||||||
|
const data = svg.rustProxyAxisData, box = svg.getBoundingClientRect();
|
||||||
|
if (!data || !box.width || !box.height) return null;
|
||||||
|
const fx = Math.min(1, Math.max(0, (event.clientX - box.left) / box.width));
|
||||||
|
const fy = Math.min(1, Math.max(0, (event.clientY - box.top) / box.height));
|
||||||
|
const span = data.bottom - data.top || 1, ratio = Math.max(0, (data.bottom - fy) / span);
|
||||||
|
const sample = data.count > 1 ? Math.round(fx * (data.count - 1)) + 1 : data.count;
|
||||||
|
const scales = Array.isArray(data.seriesScales) && data.seriesScales.length ? data.seriesScales : null;
|
||||||
|
const y = scales ? scales.map(([name, peak]) => `${name}: ${axisValue(peak * ratio, data.unit)}`).join(" · ") : `Y ${axisValue(data.peak * ratio, data.unit)}`;
|
||||||
|
return { box, fx, fy, y, x: data.count ? `X ${sample}/${data.count}` : "X –" };
|
||||||
|
}
|
||||||
|
function attachCrosshair(host, svg) {
|
||||||
|
const cross = document.createElement("div"); cross.className = "rp-chart-crosshair"; cross.hidden = true; cross.setAttribute("aria-hidden", "true");
|
||||||
|
const vertical = document.createElement("i"), horizontal = document.createElement("i"), yLabel = document.createElement("span"), xLabel = document.createElement("span");
|
||||||
|
vertical.className = "rp-chart-crosshair-v"; horizontal.className = "rp-chart-crosshair-h"; yLabel.className = "rp-chart-crosshair-y"; xLabel.className = "rp-chart-crosshair-x";
|
||||||
|
cross.append(vertical, horizontal, yLabel, xLabel); host.append(cross);
|
||||||
|
let frame = 0, last = null;
|
||||||
|
const draw = () => {
|
||||||
|
frame = 0; if (!last || !host.isConnected) return;
|
||||||
|
const values = crosshairValues(svg, last); if (!values) { cross.hidden = true; return; }
|
||||||
|
// Client rectangles include the interface-scale transform; the
|
||||||
|
// overlay is positioned in the host's own (unscaled) pixels.
|
||||||
|
const hostBox = host.getBoundingClientRect(), scale = host.offsetWidth ? hostBox.width / host.offsetWidth : 1;
|
||||||
|
const left = (values.box.left - hostBox.left) / scale, top = (values.box.top - hostBox.top) / scale, width = values.box.width / scale, height = values.box.height / scale;
|
||||||
|
const x = left + values.fx * width, y = top + values.fy * height;
|
||||||
|
cross.style.setProperty("--rp-cross-left", `${left}px`); cross.style.setProperty("--rp-cross-top", `${top}px`);
|
||||||
|
cross.style.setProperty("--rp-cross-width", `${width}px`); cross.style.setProperty("--rp-cross-height", `${height}px`);
|
||||||
|
cross.style.setProperty("--rp-cross-x", `${x}px`); cross.style.setProperty("--rp-cross-y", `${y}px`);
|
||||||
|
cross.classList.toggle("is-right", values.fx > .6); cross.classList.toggle("is-low", values.fy > .7);
|
||||||
|
yLabel.textContent = values.y; xLabel.textContent = values.x; cross.hidden = false;
|
||||||
|
};
|
||||||
|
const move = event => { if (event.target.closest?.(".rp-chart-axis-x, .rp-chart-axis-series")) { cross.hidden = true; return; } last = event; if (!frame) frame = requestAnimationFrame(draw); };
|
||||||
|
const leave = () => { last = null; cross.hidden = true; };
|
||||||
|
host.addEventListener("pointermove", move); host.addEventListener("pointerdown", move);
|
||||||
|
host.addEventListener("pointerleave", leave); host.addEventListener("pointercancel", leave);
|
||||||
|
}
|
||||||
function setAxisText(node, value) {
|
function setAxisText(node, value) {
|
||||||
if (node.textContent !== value) node.textContent = value;
|
if (node.textContent !== value) node.textContent = value;
|
||||||
}
|
}
|
||||||
@@ -81,6 +120,7 @@ window.rustProxyChartScale = (() => {
|
|||||||
x.append(tick);
|
x.append(tick);
|
||||||
}
|
}
|
||||||
host.append(overlay, perSeries, x);
|
host.append(overlay, perSeries, x);
|
||||||
|
attachCrosshair(host, svg);
|
||||||
}
|
}
|
||||||
const { peak: maximum, unit, count, top, bottom, clipped, seriesScales } = svg.rustProxyAxisData;
|
const { peak: maximum, unit, count, top, bottom, clipped, seriesScales } = svg.rustProxyAxisData;
|
||||||
const compact = svg.closest(".stat-chart") !== null;
|
const compact = svg.closest(".stat-chart") !== null;
|
||||||
|
|||||||
@@ -494,6 +494,13 @@ button.is-saving {
|
|||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The 13px top margin lines a single toggle up with labelled fields above
|
||||||
|
it; stacked toggles only need a small step, and toggles laid out in rows
|
||||||
|
or editor grids use the container gap instead. */
|
||||||
|
.check+.check {
|
||||||
|
margin-top: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.form-actions {
|
.form-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -169,6 +169,71 @@ html[data-theme=cream] :is(.card, .stat, dialog) {
|
|||||||
gap: 2px;
|
gap: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 2;
|
||||||
|
font: 9px/1.15 var(--mono);
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair[hidden] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair-v,
|
||||||
|
.rp-chart-crosshair-h {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
border: 0 dashed color-mix(in srgb, var(--text) 55%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair-v {
|
||||||
|
top: var(--rp-cross-top);
|
||||||
|
left: var(--rp-cross-x);
|
||||||
|
height: var(--rp-cross-height);
|
||||||
|
border-left-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair-h {
|
||||||
|
top: var(--rp-cross-y);
|
||||||
|
left: var(--rp-cross-left);
|
||||||
|
width: var(--rp-cross-width);
|
||||||
|
border-top-width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair-y,
|
||||||
|
.rp-chart-crosshair-x {
|
||||||
|
position: absolute;
|
||||||
|
padding: 1px 4px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
border-radius: min(3px, var(--rp-radius-control, 3px));
|
||||||
|
background: var(--panel);
|
||||||
|
color: var(--text);
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair-y {
|
||||||
|
top: var(--rp-cross-y);
|
||||||
|
left: calc(var(--rp-cross-left) + 3px);
|
||||||
|
transform: translateY(-120%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair.is-low .rp-chart-crosshair-y {
|
||||||
|
transform: translateY(20%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair-x {
|
||||||
|
top: calc(var(--rp-cross-top) + var(--rp-cross-height) - 2px);
|
||||||
|
left: var(--rp-cross-x);
|
||||||
|
transform: translate(6px, -100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rp-chart-crosshair.is-right .rp-chart-crosshair-x {
|
||||||
|
transform: translate(calc(-100% - 6px), -100%);
|
||||||
|
}
|
||||||
|
|
||||||
.rp-chart-axis-series {
|
.rp-chart-axis-series {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|||||||
@@ -80,6 +80,47 @@
|
|||||||
gap: 7px;
|
gap: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Switches never share a row with ordinary fields: a field after a switch
|
||||||
|
and a switch after a field each start a new row. Consecutive switches
|
||||||
|
still sit side by side (for example TLS 1.2 / TLS 1.3). */
|
||||||
|
.vh-grid>.check+:not(.check),
|
||||||
|
.vh-grid>:not(.check)+.check {
|
||||||
|
grid-column-start: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-grid>.check,
|
||||||
|
.vh-backend-switches>.check {
|
||||||
|
margin-top: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-grid>:not(.check)+.check {
|
||||||
|
margin-top: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fields in one row line up: each field spans a caption row and a control
|
||||||
|
row of the editor grid, and a plain caption + control field uses those
|
||||||
|
rows as a subgrid, so a caption that wraps to more lines makes the whole
|
||||||
|
caption row taller and every control in the row still starts on the same
|
||||||
|
line. Multi-line text areas take the whole row instead of a narrow column. */
|
||||||
|
:is(.vh-grid>.vh-field, .cache-rules-tester-grid>.cache-rule-field, .field-grid>label:not([class])) {
|
||||||
|
grid-row: span 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.vh-grid>.vh-field, .cache-rules-tester-grid>.cache-rule-field, .field-grid>label:not([class])):has(>:nth-child(2):last-child) {
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: subgrid;
|
||||||
|
row-gap: 4px;
|
||||||
|
align-content: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
:is(.vh-grid>.vh-field, .cache-rules-tester-grid>.cache-rule-field, .field-grid>label:not([class])):has(>:nth-child(2):last-child)>:first-child {
|
||||||
|
align-self: end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vh-grid>.vh-field:has(>textarea) {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
}
|
||||||
|
|
||||||
.vh-field input,
|
.vh-field input,
|
||||||
.vh-field select {
|
.vh-field select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -1030,7 +1030,7 @@
|
|||||||
const transformEnabled = input("", "checkbox", "docker-transform-enabled switch"); transformEnabled.checked = assignment?.transform_enabled === true; const transformField = checkboxField("dockerTransform", transformEnabled);
|
const transformEnabled = input("", "checkbox", "docker-transform-enabled switch"); transformEnabled.checked = assignment?.transform_enabled === true; const transformField = checkboxField("dockerTransform", transformEnabled);
|
||||||
const compressionEnabled = input("", "checkbox", "docker-compression-enabled switch"); compressionEnabled.checked = assignment?.compression_enabled !== false; const compressionField = checkboxField("dockerCompression", compressionEnabled); compressionField.title = t("dockerCompressionHelp");
|
const compressionEnabled = input("", "checkbox", "docker-compression-enabled switch"); compressionEnabled.checked = assignment?.compression_enabled !== false; const compressionField = checkboxField("dockerCompression", compressionEnabled); compressionField.title = t("dockerCompressionHelp");
|
||||||
const switches = el("div", undefined, "docker-switch-row"); switches.append(preserveLabel, forceSslField, websocketField, cacheField, compressionField, transformField);
|
const switches = el("div", undefined, "docker-switch-row"); switches.append(preserveLabel, forceSslField, websocketField, cacheField, compressionField, transformField);
|
||||||
const certMismatch = input("", "checkbox", "docker-cert-mismatch"); certMismatch.checked = assignment?.allow_certificate_mismatch === true;
|
const certMismatch = input("", "checkbox", "docker-cert-mismatch switch"); certMismatch.checked = assignment?.allow_certificate_mismatch === true;
|
||||||
certMismatch.disabled = !agentCertificates(agent).length;
|
certMismatch.disabled = !agentCertificates(agent).length;
|
||||||
if (certMismatch.disabled) certMismatch.checked = false;
|
if (certMismatch.disabled) certMismatch.checked = false;
|
||||||
const mismatchLabel = el("label", undefined, "check");
|
const mismatchLabel = el("label", undefined, "check");
|
||||||
|
|||||||
@@ -217,13 +217,13 @@ function memberRow(parent, value = { id: `origin-${parent.children.length + 1}`,
|
|||||||
for (const [name, key, checked] of [["member-enabled", "vhEnabled", value.enabled !== false], ["member-pool", "locationPoolEligible", value.pool_eligible !== false], ["member-backup", "vhBackup", value.backup], ["member-drain", "vhDrain", value.drain], ["member-health-enabled", "backendHealthEnabled", value.health_check_enabled !== false]]) controls[name] = field(routing, name, key, checked, "checkbox");
|
for (const [name, key, checked] of [["member-enabled", "vhEnabled", value.enabled !== false], ["member-pool", "locationPoolEligible", value.pool_eligible !== false], ["member-backup", "vhBackup", value.backup], ["member-drain", "vhDrain", value.drain], ["member-health-enabled", "backendHealthEnabled", value.health_check_enabled !== false]]) controls[name] = field(routing, name, key, checked, "checkbox");
|
||||||
const connection = el("div", undefined, "vh-wide vh-backend-switches vh-backend-connection"); main.append(connection);
|
const connection = el("div", undefined, "vh-wide vh-backend-switches vh-backend-connection"); main.append(connection);
|
||||||
for (const name of ["member-enabled", "member-pool", "member-backup", "member-drain", "member-health-enabled"]) controls[name].classList.add("switch");
|
for (const name of ["member-enabled", "member-pool", "member-backup", "member-drain", "member-health-enabled"]) controls[name].classList.add("switch");
|
||||||
controls["member-private"] = field(connection, "member-private", "vhPrivate", value.allow_private, "checkbox");
|
controls["member-private"] = field(connection, "member-private", "vhPrivate", value.allow_private, "checkbox", { switch: true });
|
||||||
const preserve = field(connection, "member-host", "vhPreserveHost", value.preserve_host === true, "checkbox", { switch: true });
|
const preserve = field(connection, "member-host", "vhPreserveHost", value.preserve_host === true, "checkbox", { switch: true });
|
||||||
|
|
||||||
const advanced = el("details", undefined, "vh-wide vh-backend-advanced"), extra = el("div", undefined, "vh-grid"); advanced.append(text("summary", "advanced"), extra);
|
const advanced = el("details", undefined, "vh-wide vh-backend-advanced"), extra = el("div", undefined, "vh-grid"); advanced.append(text("summary", "advanced"), extra);
|
||||||
field(extra, "member-allowlist", "vhAddressAllowlist", (value.address_allowlist || []).join("\n"), "textarea", { rows: 2, maxLength: 8192 });
|
field(extra, "member-allowlist", "vhAddressAllowlist", (value.address_allowlist || []).join("\n"), "textarea", { rows: 2, maxLength: 8192 });
|
||||||
const riskGate = el("div", undefined, "vh-wide vh-local-risk-gate"); extra.append(riskGate);
|
const riskGate = el("div", undefined, "vh-wide vh-local-risk-gate"); extra.append(riskGate);
|
||||||
const localRisk = field(riskGate, "member-local-risk", "vhLocalListenerRisk", value.accept_local_listener_risk === true, "checkbox");
|
const localRisk = field(riskGate, "member-local-risk", "vhLocalListenerRisk", value.accept_local_listener_risk === true, "checkbox", { switch: true });
|
||||||
localRisk.addEventListener("change", async () => { if (localRisk.checked && !(await appConfirm(t("vhLocalListenerRiskConfirm"), { danger: true }))) localRisk.checked = false; });
|
localRisk.addEventListener("change", async () => { if (localRisk.checked && !(await appConfirm(t("vhLocalListenerRiskConfirm"), { danger: true }))) localRisk.checked = false; });
|
||||||
note(riskGate, "vhLocalListenerRiskHelp");
|
note(riskGate, "vhLocalListenerRiskHelp");
|
||||||
field(extra, "member-tls-name", "vhTlsServerName", value.tls_server_name || "", "text", { maxLength: 253, placeholder: "backend.example.internal" });
|
field(extra, "member-tls-name", "vhTlsServerName", value.tls_server_name || "", "text", { maxLength: 253, placeholder: "backend.example.internal" });
|
||||||
|
|||||||
@@ -354,14 +354,14 @@ function load(value = defaults(), migrationIds = [], show = true) {
|
|||||||
vhostAutoCertificate = window.rustProxyAutoCertificate.attach(selector, { auto: !editing, anchor: certificateRow, hosts: () => { try { return readHosts(); } catch { return []; } }, certificates: () => [...(envelope?.config.tls?.certificates || []), ...stagedCertificates] }); vhostAutoCertificate.refresh();
|
vhostAutoCertificate = window.rustProxyAutoCertificate.attach(selector, { auto: !editing, anchor: certificateRow, hosts: () => { try { return readHosts(); } catch { return []; } }, certificates: () => [...(envelope?.config.tls?.certificates || []), ...stagedCertificates] }); vhostAutoCertificate.refresh();
|
||||||
certificateRow.append(button("certManage", async () => { if (!(await closeEditor())) return; setPanel("tls"); }));
|
certificateRow.append(button("certManage", async () => { if (!(await closeEditor())) return; setPanel("tls"); }));
|
||||||
note(g, "certSelectHint");
|
note(g, "certSelectHint");
|
||||||
const mismatch = field(g, "allow-certificate-mismatch", "vhCertificateMismatchForce", value.allow_certificate_mismatch === true, "checkbox");
|
const mismatch = field(g, "allow-certificate-mismatch", "vhCertificateMismatchForce", value.allow_certificate_mismatch === true, "checkbox", { switch: true });
|
||||||
const mismatchHint = note(g, "vhCertificateMismatchWarning");
|
const mismatchHint = note(g, "vhCertificateMismatchWarning");
|
||||||
const syncMismatch = () => { mismatch.disabled = !selector.value; if (!selector.value) mismatch.checked = false; mismatchHint.hidden = !mismatch.checked; };
|
const syncMismatch = () => { mismatch.disabled = !selector.value; if (!selector.value) mismatch.checked = false; mismatchHint.hidden = !mismatch.checked; };
|
||||||
selector.addEventListener("change", syncMismatch); mismatch.addEventListener("change", syncMismatch); syncMismatch();
|
selector.addEventListener("change", syncMismatch); mismatch.addEventListener("change", syncMismatch); syncMismatch();
|
||||||
g = group("vhSslSettings");
|
g = group("vhSslSettings");
|
||||||
const inheritedTlsPolicy = envelope?.config.tls?.policy || { tls12: true, tls13: true, cipher_suites: [] };
|
const inheritedTlsPolicy = envelope?.config.tls?.policy || { tls12: true, tls13: true, cipher_suites: [] };
|
||||||
const tlsPolicy = value.tls_policy || inheritedTlsPolicy;
|
const tlsPolicy = value.tls_policy || inheritedTlsPolicy;
|
||||||
const customTlsPolicy = field(g, "tls-policy-custom", "vhTlsOverride", value.tls_policy != null, "checkbox", { switch: true });
|
const customTlsPolicy = field(g, "tls-policy-custom", "vhTlsOverride", value.tls_policy != null, "checkbox", { switch: true }); customTlsPolicy.closest("label")?.classList.add("vh-wide");
|
||||||
const tls12 = field(g, "tls-policy-12", "tls12", tlsPolicy.tls12 !== false, "checkbox", { switch: true });
|
const tls12 = field(g, "tls-policy-12", "tls12", tlsPolicy.tls12 !== false, "checkbox", { switch: true });
|
||||||
const tls13 = field(g, "tls-policy-13", "tls13", tlsPolicy.tls13 !== false, "checkbox", { switch: true });
|
const tls13 = field(g, "tls-policy-13", "tls13", tlsPolicy.tls13 !== false, "checkbox", { switch: true });
|
||||||
const tlsCiphers = field(g, "tls-policy-ciphers", "tlsCiphers", (tlsPolicy.cipher_suites || []).join("\n"), "textarea", { rows: 7, maxLength: 8192 });
|
const tlsCiphers = field(g, "tls-policy-ciphers", "tlsCiphers", (tlsPolicy.cipher_suites || []).join("\n"), "textarea", { rows: 7, maxLength: 8192 });
|
||||||
@@ -381,7 +381,7 @@ function load(value = defaults(), migrationIds = [], show = true) {
|
|||||||
const loginUrl = field(taPrimary, "auth-login", "taLogin", auth.login_url || "", "url", { maxLength: 2048 });
|
const loginUrl = field(taPrimary, "auth-login", "taLogin", auth.login_url || "", "url", { maxLength: 2048 });
|
||||||
authUrl.placeholder = "http://10.87.7.99:3000"; loginUrl.placeholder = "https://auth.example.com/login";
|
authUrl.placeholder = "http://10.87.7.99:3000"; loginUrl.placeholder = "https://auth.example.com/login";
|
||||||
const taOptions = el("div", undefined, "vh-wide auth-provider-options"); taPrimary.append(taOptions);
|
const taOptions = el("div", undefined, "vh-wide auth-provider-options"); taPrimary.append(taOptions);
|
||||||
field(taOptions, "auth-private", "vhPrivate", auth.allow_private, "checkbox");
|
field(taOptions, "auth-private", "vhPrivate", auth.allow_private, "checkbox", { switch: true });
|
||||||
field(taOptions, "auth-redirect-forbidden", "taRedirectForbidden", auth.redirect_forbidden !== false, "checkbox", { switch: true });
|
field(taOptions, "auth-redirect-forbidden", "taRedirectForbidden", auth.redirect_forbidden !== false, "checkbox", { switch: true });
|
||||||
note(taBody, "taHelp");
|
note(taBody, "taHelp");
|
||||||
|
|
||||||
@@ -408,7 +408,7 @@ function load(value = defaults(), migrationIds = [], show = true) {
|
|||||||
login.placeholder = "https://auth.example.com";
|
login.placeholder = "https://auth.example.com";
|
||||||
}
|
}
|
||||||
const options = el("div", undefined, "vh-wide auth-provider-options"); primary.append(options);
|
const options = el("div", undefined, "vh-wide auth-provider-options"); primary.append(options);
|
||||||
field(options, `${id}-private`, "vhPrivate", current.allow_private, "checkbox");
|
field(options, `${id}-private`, "vhPrivate", current.allow_private, "checkbox", { switch: true });
|
||||||
field(options, `${id}-redirect-forbidden`, "taRedirectForbidden", current.redirect_forbidden === true, "checkbox", { switch: true });
|
field(options, `${id}-redirect-forbidden`, "taRedirectForbidden", current.redirect_forbidden === true, "checkbox", { switch: true });
|
||||||
note(body, id === "authelia" ? "autheliaHelp" : "authentikHelp");
|
note(body, id === "authelia" ? "autheliaHelp" : "authentikHelp");
|
||||||
const advanced = el("details", undefined, "vh-wide auth-advanced"); advanced.append(text("summary", "forwardAuthAdvanced"));
|
const advanced = el("details", undefined, "vh-wide auth-advanced"); advanced.append(text("summary", "forwardAuthAdvanced"));
|
||||||
@@ -441,7 +441,7 @@ function load(value = defaults(), migrationIds = [], show = true) {
|
|||||||
oidcSession.autocomplete = "new-password";
|
oidcSession.autocomplete = "new-password";
|
||||||
const oidcScopes = field(oidcPrimary, "oidc-scopes", "oidcScopes", oidc.scopes || "openid profile email", "text", { maxLength: 1024 });
|
const oidcScopes = field(oidcPrimary, "oidc-scopes", "oidcScopes", oidc.scopes || "openid profile email", "text", { maxLength: 1024 });
|
||||||
const oidcOptions = el("div", undefined, "vh-wide auth-provider-options"); oidcPrimary.append(oidcOptions);
|
const oidcOptions = el("div", undefined, "vh-wide auth-provider-options"); oidcPrimary.append(oidcOptions);
|
||||||
field(oidcOptions, "oidc-private", "vhPrivate", oidc.allow_private === true, "checkbox");
|
field(oidcOptions, "oidc-private", "vhPrivate", oidc.allow_private === true, "checkbox", { switch: true });
|
||||||
note(oidcBody, "oidcHelp");
|
note(oidcBody, "oidcHelp");
|
||||||
const oidcAdvanced = el("details", undefined, "vh-wide auth-advanced"); oidcAdvanced.append(text("summary", "forwardAuthAdvanced"));
|
const oidcAdvanced = el("details", undefined, "vh-wide auth-advanced"); oidcAdvanced.append(text("summary", "forwardAuthAdvanced"));
|
||||||
const oidcAdvancedGrid = el("div", undefined, "vh-grid"); oidcAdvanced.append(oidcAdvancedGrid); oidcBody.append(oidcAdvanced);
|
const oidcAdvancedGrid = el("div", undefined, "vh-grid"); oidcAdvanced.append(oidcAdvancedGrid); oidcBody.append(oidcAdvanced);
|
||||||
|
|||||||
@@ -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.5");
|
assert.equal(openapi.info.version, "0.38.6");
|
||||||
console.log("Panel refresh/API contract checks: OK");
|
console.log("Panel refresh/API contract checks: OK");
|
||||||
Reference in new issue
Block a user