mirror of
https://github.com/andrey271192/kaskad_web_vpn.git
synced 2026-09-20 11:55:35 +00:00
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:
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user