feat: first-run /setup password + PRO-style iptables

compat DNAT/INPUT/FORWARD/MASQUERADE; optional chain mode; auth_store hash; static absolute URLs; install skips env password by default; README.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Андрей Бобырев
2026-05-14 20:52:35 +03:00
parent a579612c9a
commit 43daf188c2
10 changed files with 565 additions and 107 deletions

View File

@@ -143,9 +143,21 @@
}
function loadAll() {
return Promise.all([loadSystem(), loadServices(), loadClients()]).catch(function (e) {
console.warn(e);
});
return fetch("/api/meta", cred)
.then(function (r) {
return r.json();
})
.then(function (m) {
if (m.needs_setup) {
window.location.assign("/setup");
return Promise.reject(new Error("setup"));
}
return Promise.all([loadSystem(), loadServices(), loadClients()]);
})
.catch(function (e) {
if (e && e.message === "setup") return;
console.warn(e);
});
}
var overlay = document.getElementById("modal-overlay");

View File

@@ -212,6 +212,15 @@ a {
margin: 0;
}
.setup-error {
border: 1px solid rgba(248, 113, 113, 0.45);
background: rgba(248, 113, 113, 0.08);
border-radius: 10px;
padding: 0.65rem 0.85rem;
color: #fecaca;
font-size: 0.88rem;
}
.modal-overlay[hidden] {
display: none !important;
}