- Portal page with all service links using *.gk2.secubox.in format - User guide with updated gk2 subdomain URLs - Guide link added to login page bottom - HAProxy vhost configured for portal.secubox.in - WAF routing enabled through mitmproxy Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
229 lines
12 KiB
HTML
229 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>SecuBox Portal</title>
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%); min-height: 100vh; color: #e0e0e0; }
|
|
.grid-bg { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px); background-size: 50px 50px; animation: gridMove 20s linear infinite; pointer-events: none; }
|
|
@keyframes gridMove { 0% { transform: translate(0,0); } 100% { transform: translate(50px,50px); } }
|
|
.container { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 2rem; }
|
|
.login-view { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; }
|
|
.login-card { background: rgba(26,26,46,0.9); border: 1px solid rgba(0,255,136,0.2); border-radius: 16px; padding: 3rem; width: 100%; max-width: 400px; backdrop-filter: blur(10px); }
|
|
.logo { text-align: center; margin-bottom: 2rem; }
|
|
.logo h1 { font-size: 2.5rem; background: linear-gradient(135deg, #00ff88, #00d4ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
|
|
.logo p { color: #888; margin-top: 0.5rem; }
|
|
.form-group { margin-bottom: 1.5rem; }
|
|
.form-group label { display: block; margin-bottom: 0.5rem; color: #aaa; font-size: 0.9rem; }
|
|
.form-group input { width: 100%; padding: 0.8rem 1rem; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; color: #fff; font-size: 1rem; }
|
|
.form-group input:focus { outline: none; border-color: #00ff88; }
|
|
.btn { width: 100%; padding: 1rem; background: linear-gradient(135deg, #00ff88, #00cc6a); border: none; border-radius: 8px; color: #000; font-size: 1rem; font-weight: 600; cursor: pointer; }
|
|
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,255,136,0.4); }
|
|
.btn:disabled { opacity: 0.6; }
|
|
.error-msg { background: rgba(255,68,68,0.2); border: 1px solid rgba(255,68,68,0.5); color: #ff6b6b; padding: 0.8rem; border-radius: 8px; margin-bottom: 1rem; display: none; text-align: center; }
|
|
.guide-link { margin-top: 1.5rem; text-align: center; }
|
|
.guide-link a { color: #00d4ff; text-decoration: none; font-size: 0.9rem; }
|
|
.guide-link a:hover { color: #00ff88; text-decoration: underline; }
|
|
.portal-view { display: none; }
|
|
.portal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 2rem; }
|
|
.portal-header h1 { font-size: 1.8rem; background: linear-gradient(135deg, #00ff88, #00d4ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
|
|
.user-info { display: flex; align-items: center; gap: 1rem; }
|
|
.user-badge { background: rgba(0,255,136,0.1); border: 1px solid rgba(0,255,136,0.3); padding: 0.5rem 1rem; border-radius: 20px; }
|
|
.logout-btn { background: rgba(255,68,68,0.2); border: 1px solid rgba(255,68,68,0.5); color: #ff6b6b; padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; }
|
|
.section-title { font-size: 1.1rem; color: #00ff88; margin: 1.5rem 0 1rem; }
|
|
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
|
|
.service-card { background: rgba(26,26,46,0.8); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 1.2rem; text-decoration: none; color: inherit; transition: all 0.3s; }
|
|
.service-card:hover { border-color: #00ff88; transform: translateY(-3px); }
|
|
.service-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
|
|
.service-name { font-weight: 600; color: #fff; margin-bottom: 0.3rem; }
|
|
.service-url { font-size: 0.75rem; color: #00d4ff; }
|
|
.footer { text-align: center; padding: 2rem 0; color: #555; font-size: 0.85rem; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="grid-bg"></div>
|
|
|
|
<div class="login-view" id="loginView">
|
|
<div class="login-card">
|
|
<div class="logo">
|
|
<h1>SecuBox</h1>
|
|
<p>SSO Portal</p>
|
|
</div>
|
|
<div class="error-msg" id="errorMsg"></div>
|
|
<form id="loginForm">
|
|
<div class="form-group">
|
|
<label>Utilisateur</label>
|
|
<input type="text" id="username" required autocomplete="username">
|
|
</div>
|
|
<div class="form-group">
|
|
<label>Mot de passe</label>
|
|
<input type="password" id="password" required autocomplete="current-password">
|
|
</div>
|
|
<button type="submit" class="btn" id="loginBtn">Connexion</button>
|
|
</form>
|
|
<div class="guide-link">
|
|
<a href="https://gk2.secubox.in/guide/" target="_blank">📖 Guide utilisateur</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="portal-view" id="portalView">
|
|
<div class="container">
|
|
<header class="portal-header">
|
|
<h1>SecuBox Services</h1>
|
|
<div class="user-info">
|
|
<span class="user-badge" id="userBadge"></span>
|
|
<button class="logout-btn" id="logoutBtn">Logout</button>
|
|
</div>
|
|
</header>
|
|
|
|
<h2 class="section-title">Communication</h2>
|
|
<div class="services-grid">
|
|
<a href="https://webmail.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">📧</div>
|
|
<div class="service-name">Webmail</div>
|
|
<div class="service-url">webmail.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://matrix.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">💬</div>
|
|
<div class="service-name">Matrix</div>
|
|
<div class="service-url">matrix.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://xmpp.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">🗨️</div>
|
|
<div class="service-name">Jabber</div>
|
|
<div class="service-url">xmpp.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://meet.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">📹</div>
|
|
<div class="service-name">Jitsi Meet</div>
|
|
<div class="service-url">meet.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://voip.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">📞</div>
|
|
<div class="service-name">VoIP</div>
|
|
<div class="service-url">voip.gk2.secubox.in</div>
|
|
</a>
|
|
</div>
|
|
|
|
<h2 class="section-title">Cloud et Media</h2>
|
|
<div class="services-grid">
|
|
<a href="https://cloud.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">☁️</div>
|
|
<div class="service-name">Nextcloud</div>
|
|
<div class="service-url">cloud.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://git.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">🔀</div>
|
|
<div class="service-name">Gitea</div>
|
|
<div class="service-url">git.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://tube.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">🎬</div>
|
|
<div class="service-name">PeerTube</div>
|
|
<div class="service-url">tube.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://jellyfin.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">🎵</div>
|
|
<div class="service-name">Jellyfin</div>
|
|
<div class="service-url">jellyfin.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://social.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">🐘</div>
|
|
<div class="service-name">GoToSocial</div>
|
|
<div class="service-url">social.gk2.secubox.in</div>
|
|
</a>
|
|
</div>
|
|
|
|
<h2 class="section-title">Administration</h2>
|
|
<div class="services-grid">
|
|
<a href="https://admin.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">⚙️</div>
|
|
<div class="service-name">Admin</div>
|
|
<div class="service-url">admin.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://vpn.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">🔐</div>
|
|
<div class="service-name">VPN</div>
|
|
<div class="service-url">vpn.gk2.secubox.in</div>
|
|
</a>
|
|
<a href="https://hub.gk2.secubox.in/" class="service-card" target="_blank">
|
|
<div class="service-icon">🏠</div>
|
|
<div class="service-name">Hub</div>
|
|
<div class="service-url">hub.gk2.secubox.in</div>
|
|
</a>
|
|
</div>
|
|
|
|
<footer class="footer">SecuBox - Secure Services Portal</footer>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
var RPC = "/ubus";
|
|
|
|
function login(u, p) {
|
|
return fetch(RPC, {
|
|
method: "POST",
|
|
headers: {"Content-Type": "application/json"},
|
|
body: JSON.stringify({jsonrpc:"2.0",id:1,method:"call",params:["00000000000000000000000000000000","session","login",{username:u,password:p}]})
|
|
})
|
|
.then(function(r) { return r.json(); })
|
|
.then(function(d) {
|
|
if (d.result && d.result[0] === 0) return d.result[1];
|
|
throw new Error("Auth failed");
|
|
});
|
|
}
|
|
|
|
function showView(v) {
|
|
document.getElementById("loginView").style.display = v === "login" ? "flex" : "none";
|
|
document.getElementById("portalView").style.display = v === "portal" ? "block" : "none";
|
|
}
|
|
|
|
function checkSession() {
|
|
var s = sessionStorage.getItem("sb_session");
|
|
var u = sessionStorage.getItem("sb_user");
|
|
if (s && u) {
|
|
document.getElementById("userBadge").textContent = u;
|
|
showView("portal");
|
|
} else {
|
|
showView("login");
|
|
}
|
|
}
|
|
|
|
document.getElementById("loginForm").onsubmit = function(e) {
|
|
e.preventDefault();
|
|
var u = document.getElementById("username").value;
|
|
var p = document.getElementById("password").value;
|
|
var btn = document.getElementById("loginBtn");
|
|
var err = document.getElementById("errorMsg");
|
|
|
|
btn.disabled = true;
|
|
btn.textContent = "Connexion...";
|
|
err.style.display = "none";
|
|
|
|
login(u, p).then(function(sess) {
|
|
sessionStorage.setItem("sb_session", sess.ubus_rpc_session);
|
|
sessionStorage.setItem("sb_user", u);
|
|
document.getElementById("userBadge").textContent = u;
|
|
showView("portal");
|
|
}).catch(function() {
|
|
err.textContent = "Identifiants incorrects";
|
|
err.style.display = "block";
|
|
}).finally(function() {
|
|
btn.disabled = false;
|
|
btn.textContent = "Connexion";
|
|
});
|
|
};
|
|
|
|
document.getElementById("logoutBtn").onclick = function() {
|
|
sessionStorage.clear();
|
|
showView("login");
|
|
};
|
|
|
|
checkSession();
|
|
</script>
|
|
</body>
|
|
</html>
|