v0.38.4
This commit is contained in:
1 parent
185d5da6f9
commit
2d0d0f12c7
10 files changed
+69
-69
No files matched your search
@@ -315,7 +315,7 @@ window.rustProxyCacheRules = (() => {
|
||||
stage.addEventListener("change", () => { rule.stage = stage.value; rule.actions = rule.actions.filter(a => ACTIONS[rule.stage].includes(a.type)); if (!rule.actions.length) rule.actions = [{ type: ACTIONS[rule.stage][0] }]; rule.conditions = rule.conditions.filter(c => FIELDS[c.field].stages.includes(rule.stage)); render(); changed(); });
|
||||
const match = select([["all", t("cacheRuleMatchAll")], ["any", t("cacheRuleMatchAny")]], rule.match, t("cacheRuleMatch"));
|
||||
match.addEventListener("change", () => { rule.match = match.value; changed(); syncPreview(); });
|
||||
const stop = el("input"); stop.type = "checkbox"; stop.checked = rule.stop; stop.addEventListener("change", () => { rule.stop = stop.checked; changed(); });
|
||||
const stop = el("input", undefined, "switch"); stop.type = "checkbox"; stop.checked = rule.stop; stop.addEventListener("change", () => { rule.stop = stop.checked; changed(); });
|
||||
const labeled = (key, control, help) => { const label = el("label", undefined, "cache-rule-field"); label.append(el("span", t(key)), control); if (help) label.append(el("small", t(help), "fine")); return label; };
|
||||
const stopLabel = el("label", undefined, "check cache-rule-stop"); stopLabel.append(stop, el("span", t("cacheRuleStop")));
|
||||
grid.append(labeled("cacheRuleName", name), labeled("cacheRuleId", id), labeled("cacheRuleStage", stage, `cacheRuleStageHelp${rule.stage[0].toUpperCase()}${rule.stage.slice(1)}`), labeled("cacheRuleMatch", match), stopLabel);
|
||||
@@ -386,7 +386,7 @@ window.rustProxyCacheRules = (() => {
|
||||
switch (action.type) {
|
||||
case "strip_cookies": params.append(listInput("keep", t("cacheRuleKeepCookies"))); break;
|
||||
case "strip_query": {
|
||||
const keepOnly = el("label", undefined, "check"), box = el("input"); box.type = "checkbox"; box.checked = !!action.keep_only; keepOnly.append(box, el("span", t("cacheRuleKeepOnly")));
|
||||
const keepOnly = el("label", undefined, "check"), box = el("input", undefined, "switch"); box.type = "checkbox"; box.checked = !!action.keep_only; keepOnly.append(box, el("span", t("cacheRuleKeepOnly")));
|
||||
box.addEventListener("change", () => { action.keep_only = box.checked; changed(); });
|
||||
params.append(listInput("params", t("cacheRuleQueryParams")), keepOnly); break;
|
||||
}
|
||||
|
||||
@@ -532,8 +532,8 @@
|
||||
labeled("dockerAlertDisk", num("docker-alert-disk", value.disk_percent, 50, 100)),
|
||||
labeled("dockerAlertMemory", num("docker-alert-memory", value.memory_percent, 50, 100)),
|
||||
labeled("dockerAlertLoad", num("docker-alert-load", value.load_per_cpu, 0.1, 64, 0.1)),
|
||||
checkboxField("dockerAlertServiceMissing", check("docker-alert-missing", value.service_missing !== false)),
|
||||
checkboxField("dockerAlertUnhealthy", check("docker-alert-unhealthy", value.container_unhealthy !== false)));
|
||||
checkboxField("dockerAlertServiceMissing", check("docker-alert-missing switch", value.service_missing !== false)),
|
||||
checkboxField("dockerAlertUnhealthy", check("docker-alert-unhealthy switch", value.container_unhealthy !== false)));
|
||||
box.append(grid); holder.replaceChildren(box);
|
||||
}
|
||||
function collectAlertSettings() {
|
||||
@@ -676,11 +676,11 @@
|
||||
summary.append(el("span", t("dockerPassiveHealth")), el("small", t("dockerPassiveHealthSummary"), "fine")); details.append(summary);
|
||||
const grid = el("div", undefined, "field-grid docker-health-grid");
|
||||
const enabled = input("", "checkbox", "docker-passive-enabled switch"); enabled.checked = passive.enabled === true;
|
||||
const connect = input("", "checkbox", "docker-passive-connect"); connect.checked = passive.count_connect_errors !== false;
|
||||
const timeouts = input("", "checkbox", "docker-passive-timeouts"); timeouts.checked = passive.count_timeouts !== false;
|
||||
const io = input("", "checkbox", "docker-passive-io"); io.checked = passive.count_io_errors !== false;
|
||||
const http5xx = input("", "checkbox", "docker-passive-5xx"); http5xx.checked = passive.count_http_5xx !== false;
|
||||
const slow = input("", "checkbox", "docker-passive-slow"); slow.checked = passive.count_slow_responses === true;
|
||||
const connect = input("", "checkbox", "docker-passive-connect switch"); connect.checked = passive.count_connect_errors !== false;
|
||||
const timeouts = input("", "checkbox", "docker-passive-timeouts switch"); timeouts.checked = passive.count_timeouts !== false;
|
||||
const io = input("", "checkbox", "docker-passive-io switch"); io.checked = passive.count_io_errors !== false;
|
||||
const http5xx = input("", "checkbox", "docker-passive-5xx switch"); http5xx.checked = passive.count_http_5xx !== false;
|
||||
const slow = input("", "checkbox", "docker-passive-slow switch"); slow.checked = passive.count_slow_responses === true;
|
||||
const fall = numberInput(passive.fall, "docker-passive-fall", 1, 20, true), rise = numberInput(passive.rise, "docker-passive-rise", 1, 20, true);
|
||||
const optional = [connect, timeouts, io, http5xx, slow, fall, rise];
|
||||
const optionalFields = [checkboxField("vhPassiveConnect", connect), checkboxField("vhPassiveTimeouts", timeouts), checkboxField("vhPassiveIo", io), checkboxField("vhPassive5xx", http5xx), checkboxField("vhPassiveSlow", slow), labeled("vhPassiveFall", fall), labeled("vhPassiveRise", rise)];
|
||||
|
||||
+44
-44
@@ -2152,7 +2152,7 @@
|
||||
data-i18n="switchControls">Show on/off settings as
|
||||
switches</b><small data-i18n="switchControlsHelp">Draws settings
|
||||
that turn a feature or section on or off as switches instead of
|
||||
checkboxes. Option lists keep checkboxes.</small></span></label>
|
||||
checkboxes. Column pickers, bulk selection and risk confirmations keep checkboxes.</small></span></label>
|
||||
<label><span data-i18n="cornerStyle">Corner rounding</span><select
|
||||
id="ui-corner-style">
|
||||
<option data-i18n="cornerStyleDefault" value="default">Original
|
||||
@@ -2708,12 +2708,12 @@
|
||||
type="checkbox" /><span>X-Request-ID</span></label>
|
||||
</div>
|
||||
<h3 class="subheading" data-i18n="compression">Streaming compression</h3>
|
||||
<div class="switch-grid"><label class="check"><input id="compress-gzip"
|
||||
type="checkbox" /><span>gzip</span></label><label class="check"><input
|
||||
<div class="switch-grid"><label class="check"><input class="switch" id="compress-gzip"
|
||||
type="checkbox" /><span>gzip</span></label><label class="check"><input class="switch"
|
||||
id="compress-br" type="checkbox" /><span>Brotli
|
||||
(br)</span></label><label class="check"><input id="compress-zstd"
|
||||
(br)</span></label><label class="check"><input class="switch" id="compress-zstd"
|
||||
type="checkbox" /><span>Zstandard
|
||||
(zstd)</span></label><label class="check"><input id="compress-deflate"
|
||||
(zstd)</span></label><label class="check"><input class="switch" id="compress-deflate"
|
||||
type="checkbox" /><span>deflate</span></label></div>
|
||||
<label data-i18n="compressionMin" for="compress-min">Minimum response size
|
||||
(bytes)</label><input id="compress-min" max="1048576" min="32" required=""
|
||||
@@ -2894,13 +2894,13 @@
|
||||
</div>
|
||||
<h3 class="subheading" data-i18n="cacheStaleErrorTitle">Stale-if-error policy</h3>
|
||||
<div class="switch-grid">
|
||||
<label class="check"><input id="cache-sie-timeout" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="cache-sie-timeout" type="checkbox" /><span
|
||||
data-i18n="cacheSieTimeout">Timeout</span></label>
|
||||
<label class="check"><input id="cache-sie-connection" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="cache-sie-connection" type="checkbox" /><span
|
||||
data-i18n="cacheSieConnection">Connection failure</span></label>
|
||||
<label class="check"><input id="cache-sie-dns" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="cache-sie-dns" type="checkbox" /><span
|
||||
data-i18n="cacheSieDns">DNS failure</span></label>
|
||||
<label class="check"><input id="cache-sie-tls" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="cache-sie-tls" type="checkbox" /><span
|
||||
data-i18n="cacheSieTls">TLS failure</span></label>
|
||||
</div>
|
||||
<label data-i18n="cacheSieStatuses" for="cache-sie-statuses">HTTP 5xx statuses
|
||||
@@ -2947,16 +2947,16 @@
|
||||
<p class="fine" data-i18n="cacheColdHelp">Idle and LRU hot objects are demoted to
|
||||
disk. A cold hit is read asynchronously and promoted back to RAM. Metadata is
|
||||
readable JSON; bodies are stored as raw .body files.</p>
|
||||
<label class="check"><input id="cache-cold-on-idle" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="cache-cold-on-idle" type="checkbox" /><span
|
||||
data-i18n="cacheColdOnIdle">Move old/idle objects to cold
|
||||
storage</span></label>
|
||||
<label class="check"><input id="cache-cold-on-age" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="cache-cold-on-age" type="checkbox" /><span
|
||||
data-i18n="cacheColdOnAge">Move objects after their maximum hot-tier
|
||||
age</span></label>
|
||||
<label class="check"><input id="cache-cold-on-lru" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="cache-cold-on-lru" type="checkbox" /><span
|
||||
data-i18n="cacheColdOnLru">Move hot LRU evictions to cold
|
||||
storage</span></label>
|
||||
<label class="check"><input id="cache-cold-on-shutdown" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="cache-cold-on-shutdown" type="checkbox" /><span
|
||||
data-i18n="cacheColdOnShutdown">Flush hot cache to cold storage during
|
||||
graceful shutdown</span></label>
|
||||
<div class="field-grid">
|
||||
@@ -3004,13 +3004,13 @@
|
||||
extensions. Response privacy rules still apply.</p>
|
||||
<h3 class="subheading cache-header-settings-heading"
|
||||
data-i18n="cacheHeadersSection">Cache response headers</h3>
|
||||
<div class="switch-grid"><label class="check"><input id="cache-status-header"
|
||||
<div class="switch-grid"><label class="check"><input class="switch" id="cache-status-header"
|
||||
type="checkbox" /><span>X-Cache: HIT / MISS /
|
||||
BYPASS</span></label><label class="check"><input id="cache-hits-header"
|
||||
BYPASS</span></label><label class="check"><input class="switch" id="cache-hits-header"
|
||||
type="checkbox" /><span>X-Cache-Hits</span></label><label
|
||||
class="check"><input id="cache-rfc-header"
|
||||
class="check"><input class="switch" id="cache-rfc-header"
|
||||
type="checkbox" /><span>Cache-Status (RFC 9211)</span></label><label
|
||||
class="check"><input id="cache-resident-age-header"
|
||||
class="check"><input class="switch" id="cache-resident-age-header"
|
||||
type="checkbox" /><span>X-Cache-Resident-Age</span></label></div>
|
||||
<label class="check"><input class="switch" id="cache-only-hits" type="checkbox" /><span
|
||||
data-i18n="cacheOnlyHits">Show RustProxy cache diagnostics only on HIT
|
||||
@@ -3115,15 +3115,15 @@
|
||||
<h3 class="subheading transform-operations-title" data-i18n="transformOperationsTitle">
|
||||
Content transformations</h3>
|
||||
<div class="switch-grid transform-operations-grid">
|
||||
<label class="check"><input id="transform-javascript" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="transform-javascript" type="checkbox" /><span
|
||||
data-i18n="transformJavascript">JavaScript minification</span></label>
|
||||
<label class="check"><input id="transform-css" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="transform-css" type="checkbox" /><span
|
||||
data-i18n="transformCss">CSS minification</span></label>
|
||||
<label class="check"><input id="transform-html" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="transform-html" type="checkbox" /><span
|
||||
data-i18n="transformHtml">HTML minification</span></label>
|
||||
<label class="check"><input id="transform-svg" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="transform-svg" type="checkbox" /><span
|
||||
data-i18n="transformSvg">SVG optimization</span></label>
|
||||
<label class="check"><input id="transform-json" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="transform-json" type="checkbox" /><span
|
||||
data-i18n="transformJson">JSON compaction</span></label>
|
||||
</div>
|
||||
<label data-i18n="transformExtensions" for="transform-extensions">Allowed file
|
||||
@@ -3410,21 +3410,21 @@
|
||||
<section class="settings-section">
|
||||
<h3 class="subheading" data-i18n="prometheusCollectors"></h3>
|
||||
<div class="switch-grid">
|
||||
<label class="check"><input checked="" id="prom-system" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" checked="" id="prom-system" type="checkbox" /><span
|
||||
data-i18n="systemDiagnostics"></span></label>
|
||||
<label class="check"><input checked="" id="prom-vhosts" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" checked="" id="prom-vhosts" type="checkbox" /><span
|
||||
data-i18n="vhosts"></span></label>
|
||||
<label class="check"><input checked="" id="prom-traffic" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" checked="" id="prom-traffic" type="checkbox" /><span
|
||||
data-i18n="traffic"></span></label>
|
||||
<label class="check"><input checked="" id="prom-backends"
|
||||
<label class="check"><input class="switch" checked="" id="prom-backends"
|
||||
type="checkbox" /><span data-i18n="vhBackendPool"></span></label>
|
||||
<label class="check"><input checked="" id="prom-docker-vhosts"
|
||||
<label class="check"><input class="switch" checked="" id="prom-docker-vhosts"
|
||||
type="checkbox" /><span data-i18n="docker-vhosts"></span></label>
|
||||
<label class="check"><input checked="" id="prom-domains" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" checked="" id="prom-domains" type="checkbox" /><span
|
||||
data-i18n="cacheDomains"></span></label>
|
||||
<label class="check"><input checked="" id="prom-streams" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" checked="" id="prom-streams" type="checkbox" /><span
|
||||
data-i18n="streams"></span></label>
|
||||
<label class="check"><input checked="" id="prom-logging" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" checked="" id="prom-logging" type="checkbox" /><span
|
||||
data-i18n="logging"></span></label>
|
||||
</div>
|
||||
</section>
|
||||
@@ -3461,7 +3461,7 @@
|
||||
</section>
|
||||
<section class="settings-section alerts-settings-group">
|
||||
<h3 class="subheading" data-i18n="alertSettingsCertificates">Certificates</h3>
|
||||
<label class="check"><input id="alerts-certificate-expiry" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="alerts-certificate-expiry" type="checkbox" /><span
|
||||
data-i18n="alertSettingsCertificateExpiry">Expired or expiring certificates</span></label>
|
||||
<div class="field-grid">
|
||||
<label><span data-i18n="alertSettingsWarningDays">Warning (days before expiry)</span><input
|
||||
@@ -3470,15 +3470,15 @@
|
||||
id="alerts-certificate-error" max="89" min="0" type="number" /></label>
|
||||
</div>
|
||||
<div class="switch-grid">
|
||||
<label class="check"><input id="alerts-certificate-renewal" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="alerts-certificate-renewal" type="checkbox" /><span
|
||||
data-i18n="alertSettingsRenewal">Failed ACME renewals</span></label>
|
||||
<label class="check"><input id="alerts-acme-runtime" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="alerts-acme-runtime" type="checkbox" /><span
|
||||
data-i18n="alertSettingsAcmeRuntime">ACME environment not ready</span></label>
|
||||
</div>
|
||||
</section>
|
||||
<section class="settings-section alerts-settings-group">
|
||||
<h3 class="subheading" data-i18n="alertSettingsResources">Resources</h3>
|
||||
<label class="check"><input id="alerts-file-descriptors" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="alerts-file-descriptors" type="checkbox" /><span
|
||||
data-i18n="alertSettingsFileDescriptors">File descriptors of RustProxy</span></label>
|
||||
<div class="field-grid">
|
||||
<label><span data-i18n="alertSettingsWarningPercent">Warning (% of limit)</span><input
|
||||
@@ -3490,11 +3490,11 @@
|
||||
<section class="settings-section alerts-settings-group">
|
||||
<h3 class="subheading" data-i18n="alertSettingsConfiguration">Configuration and updates</h3>
|
||||
<div class="switch-grid">
|
||||
<label class="check"><input id="alerts-geoip" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="alerts-geoip" type="checkbox" /><span
|
||||
data-i18n="alertSettingsGeoip">Country rules without a GeoIP database</span></label>
|
||||
<label class="check"><input id="alerts-prometheus" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="alerts-prometheus" type="checkbox" /><span
|
||||
data-i18n="alertSettingsPrometheus">Prometheus exporter open without token</span></label>
|
||||
<label class="check"><input id="alerts-update" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="alerts-update" type="checkbox" /><span
|
||||
data-i18n="alertSettingsUpdate">New RustProxy version (information)</span></label>
|
||||
</div>
|
||||
<p class="fine"><span data-i18n="alertSettingsDockerHint">Docker alerts are configured in</span>
|
||||
@@ -3554,11 +3554,11 @@
|
||||
absolute 7–30 day lifetime.</p>
|
||||
<h3 class="subheading" data-i18n="panelCompressionTitle">Panel content compression</h3>
|
||||
<div class="switch-grid">
|
||||
<label class="check"><input id="admin-compression-zstd" type="checkbox"
|
||||
<label class="check"><input class="switch" id="admin-compression-zstd" type="checkbox"
|
||||
checked /><span>Zstd</span></label>
|
||||
<label class="check"><input id="admin-compression-br" type="checkbox"
|
||||
<label class="check"><input class="switch" id="admin-compression-br" type="checkbox"
|
||||
checked /><span>Brotli (br)</span></label>
|
||||
<label class="check"><input id="admin-compression-gzip" type="checkbox"
|
||||
<label class="check"><input class="switch" id="admin-compression-gzip" type="checkbox"
|
||||
checked /><span>gzip</span></label>
|
||||
</div>
|
||||
<p class="fine" data-i18n="panelCompressionHelp">The browser negotiates the best
|
||||
@@ -3914,8 +3914,8 @@
|
||||
</div>
|
||||
<p class="fine" data-i18n="tlsPolicyHelp">Global defaults for TLS frontends. Per-vhost
|
||||
overrides can narrow versions/ciphers. HTTP/3 requires TLS 1.3.</p>
|
||||
<div class="switch-grid"><label class="check"><input id="tls-policy-12"
|
||||
type="checkbox" /><span>TLS 1.2</span></label><label class="check"><input
|
||||
<div class="switch-grid"><label class="check"><input class="switch" id="tls-policy-12"
|
||||
type="checkbox" /><span>TLS 1.2</span></label><label class="check"><input class="switch"
|
||||
id="tls-policy-13" type="checkbox" /><span>TLS 1.3</span></label></div>
|
||||
<label><span data-i18n="tlsCiphers">Cipher suites (one per line; empty = rustls
|
||||
defaults)</span><textarea id="tls-policy-ciphers" rows="8"
|
||||
@@ -4631,9 +4631,9 @@
|
||||
<div class="vh-grid">
|
||||
<label class="check"><input class="switch" id="web-service-precompressed" type="checkbox" /><span
|
||||
data-i18n="webServicePrecompressed">Serve precompressed sidecars</span></label>
|
||||
<label class="check"><input id="web-service-precompressed-br" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="web-service-precompressed-br" type="checkbox" /><span
|
||||
data-i18n="webServicePrecompressedBr">Brotli (.br)</span></label>
|
||||
<label class="check"><input id="web-service-precompressed-gzip" type="checkbox" /><span
|
||||
<label class="check"><input class="switch" id="web-service-precompressed-gzip" type="checkbox" /><span
|
||||
data-i18n="webServicePrecompressedGzip">Gzip (.gz)</span></label>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -271,12 +271,12 @@
|
||||
}
|
||||
const notify = () => watchers.forEach(run => run());
|
||||
for (const endpoint of items) {
|
||||
const checked = selected.includes(endpoint.id) || autoIds.has(endpoint.id); const input = field(box, `bind-${endpoint.id.replace(/[^A-Za-z0-9_-]/g, "-")}`, "listenerEndpoint", checked, "checkbox");
|
||||
const checked = selected.includes(endpoint.id) || autoIds.has(endpoint.id); const input = field(box, `bind-${endpoint.id.replace(/[^A-Za-z0-9_-]/g, "-")}`, "listenerEndpoint", checked, "checkbox", { switch: true });
|
||||
const binding = endpoint.binding || {}, protocols = [binding.tls ? "HTTPS" : "HTTP"]; if (binding.tls && binding.http2 !== false) protocols.push("H2"); if (!binding.tls && binding.h2c) protocols.push("H2C"); if (binding.tls && (!Object.hasOwn(binding, "http3") || binding.http3 !== null)) protocols.push("H3");
|
||||
const addresses = [endpoint.binding?.address, ...(endpoint.additional_addresses || [])].filter(Boolean).join(", ");
|
||||
input.nextElementSibling.textContent = `${endpoint.name || endpoint.id} / ${protocols.join("+")} ${addresses} / ${t(endpoint.scope === "public" ? "listenerPublic" : "listenerInternal")}${endpoint.enabled === false ? ` / ${t("vhDisabled")}` : ""}`; delete input.nextElementSibling.dataset.i18n; choices.set(endpoint.id, input); listeners.set(endpoint.id, endpoint); input.addEventListener("change", notify);
|
||||
}
|
||||
for (const id of selected) if (!items.some(e => e.id === id)) { const input = field(box, `bind-${id}`, "listenerMissing", true, "checkbox"); input.nextElementSibling.textContent = `${t("listenerMissing")}: ${id}`; choices.set(id, input); input.addEventListener("change", notify); }
|
||||
for (const id of selected) if (!items.some(e => e.id === id)) { const input = field(box, `bind-${id}`, "listenerMissing", true, "checkbox", { switch: true }); input.nextElementSibling.textContent = `${t("listenerMissing")}: ${id}`; choices.set(id, input); input.addEventListener("change", notify); }
|
||||
const read = () => [...choices].filter(([, input]) => input.checked).map(([id]) => id);
|
||||
const capabilities = () => { const selectedIds = new Set(read()); let http2 = false, http3 = false; for (const [id, endpoint] of listeners) { if (!selectedIds.has(id) || endpoint.enabled === false) continue; const binding = endpoint.binding || {}; http2 ||= !!((binding.tls && binding.http2 !== false) || (!binding.tls && binding.h2c)); http3 ||= !!(binding.tls && (!Object.hasOwn(binding, "http3") || binding.http3 !== null)); } return { http2, http3 }; };
|
||||
return { read, capabilities, onChange(run) { watchers.push(run); run(); } };
|
||||
|
||||
@@ -69,7 +69,7 @@ window.rustProxyTlsConfigurator = (() => {
|
||||
cell.append(el("strong", label), el("span", enabled ? t("tlsVersionOn") : t("tlsVersionOff"), `pill ${enabled ? "live" : ""}`.trim()));
|
||||
group.append(cell); body.append(group);
|
||||
for (const name of names.filter(item => meta(item).tls13 === version)) {
|
||||
const info = meta(name), row = el("tr"), check = el("input"); check.type = "checkbox"; check.checked = active.has(name); check.disabled = !enabled; check.dataset.suite = name;
|
||||
const info = meta(name), row = el("tr"), check = el("input", undefined, "switch"); check.type = "checkbox"; check.checked = active.has(name); check.disabled = !enabled; check.dataset.suite = name;
|
||||
check.setAttribute("aria-label", name);
|
||||
const first = el("td"); first.append(check);
|
||||
const nameCell = el("td"); nameCell.append(el("code", name));
|
||||
|
||||
@@ -252,11 +252,11 @@ function load(value = defaults(), migrationIds = [], show = true) {
|
||||
const passiveEnabled = field(g, "passive-enabled", "vhPassiveEnabled", passive.enabled === true, "checkbox", { switch: true });
|
||||
note(g, "vhPassiveHelp");
|
||||
const passiveFields = [
|
||||
field(g, "passive-connect", "vhPassiveConnect", passive.count_connect_errors !== false, "checkbox"),
|
||||
field(g, "passive-timeouts", "vhPassiveTimeouts", passive.count_timeouts !== false, "checkbox"),
|
||||
field(g, "passive-io", "vhPassiveIo", passive.count_io_errors !== false, "checkbox"),
|
||||
field(g, "passive-5xx", "vhPassive5xx", passive.count_http_5xx !== false, "checkbox"),
|
||||
field(g, "passive-slow", "vhPassiveSlow", passive.count_slow_responses === true, "checkbox"),
|
||||
field(g, "passive-connect", "vhPassiveConnect", passive.count_connect_errors !== false, "checkbox", { switch: true }),
|
||||
field(g, "passive-timeouts", "vhPassiveTimeouts", passive.count_timeouts !== false, "checkbox", { switch: true }),
|
||||
field(g, "passive-io", "vhPassiveIo", passive.count_io_errors !== false, "checkbox", { switch: true }),
|
||||
field(g, "passive-5xx", "vhPassive5xx", passive.count_http_5xx !== false, "checkbox", { switch: true }),
|
||||
field(g, "passive-slow", "vhPassiveSlow", passive.count_slow_responses === true, "checkbox", { switch: true }),
|
||||
field(g, "passive-fall", "vhPassiveFall", passive.fall ?? "", "number", { min: 1, max: 20 }),
|
||||
field(g, "passive-rise", "vhPassiveRise", passive.rise ?? "", "number", { min: 1, max: 20 })
|
||||
];
|
||||
@@ -362,8 +362,8 @@ function load(value = defaults(), migrationIds = [], show = true) {
|
||||
const inheritedTlsPolicy = envelope?.config.tls?.policy || { tls12: true, tls13: true, cipher_suites: [] };
|
||||
const tlsPolicy = value.tls_policy || inheritedTlsPolicy;
|
||||
const customTlsPolicy = field(g, "tls-policy-custom", "vhTlsOverride", value.tls_policy != null, "checkbox", { switch: true });
|
||||
const tls12 = field(g, "tls-policy-12", "tls12", tlsPolicy.tls12 !== false, "checkbox");
|
||||
const tls13 = field(g, "tls-policy-13", "tls13", tlsPolicy.tls13 !== false, "checkbox");
|
||||
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 tlsCiphers = field(g, "tls-policy-ciphers", "tlsCiphers", (tlsPolicy.cipher_suites || []).join("\n"), "textarea", { rows: 7, maxLength: 8192 });
|
||||
const tlsPqc = field(g, "tls-policy-pqc", "tlsPqcLabel", tlsPolicy.post_quantum === true, "checkbox", { switch: true });
|
||||
const syncTlsPolicy = () => { for (const input of [tls12, tls13, tlsCiphers, tlsPqc]) input.disabled = !customTlsPolicy.checked; };
|
||||
@@ -409,7 +409,7 @@ function load(value = defaults(), migrationIds = [], show = true) {
|
||||
}
|
||||
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}-redirect-forbidden`, "taRedirectForbidden", current.redirect_forbidden === true, "checkbox");
|
||||
field(options, `${id}-redirect-forbidden`, "taRedirectForbidden", current.redirect_forbidden === true, "checkbox", { switch: true });
|
||||
note(body, id === "authelia" ? "autheliaHelp" : "authentikHelp");
|
||||
const advanced = el("details", undefined, "vh-wide auth-advanced"); advanced.append(text("summary", "forwardAuthAdvanced"));
|
||||
const details = el("div", undefined, "vh-grid"); advanced.append(details); body.append(advanced);
|
||||
@@ -486,7 +486,7 @@ function load(value = defaults(), migrationIds = [], show = true) {
|
||||
const serverValue = field(g, "server-value", "serverValue", server?.value || "RustProxy", "text", { maxLength: 256 });
|
||||
const syncServer = () => { serverValue.disabled = serverMode.value !== "custom"; serverValue.required = !serverValue.disabled; }; serverMode.addEventListener("change", syncServer); syncServer();
|
||||
const inheritDiagnostics = field(g, "diag-inherit", "diagInherit", !diagnostics, "checkbox", { switch: true }), diagInputs = [];
|
||||
for (const [name, key] of [["request_id", "diagRequestId"]]) diagInputs.push(field(g, `diag-${name}`, key, diagnostics?.[name] ?? envelope?.config.diagnostic_headers?.[name], "checkbox"));
|
||||
for (const [name, key] of [["request_id", "diagRequestId"]]) diagInputs.push(field(g, `diag-${name}`, key, diagnostics?.[name] ?? envelope?.config.diagnostic_headers?.[name], "checkbox", { switch: true }));
|
||||
const syncDiag = () => { for (const input of diagInputs) input.disabled = inheritDiagnostics.checked; }; inheritDiagnostics.addEventListener("change", syncDiag); syncDiag(); note(g, "diagHelp");
|
||||
g = group("vhCompression"); const compression = value.compression || {};
|
||||
const compressionTri = (parent, name, key, current) => field(parent, name, key, current === true ? "on" : current === false ? "off" : "", "select", { values: [["", "inherit"], ["on", "enabled"], ["off", "notEnabled"]] });
|
||||
|
||||
Reference in new issue
Block a user