Initial commit: SSL proxy / firewall appliance

Flask WebUI behind nginx reverse proxy with zone-based firewall, DHCP,
WireGuard, and ACME certificate management.
This commit is contained in:
2026-05-07 22:24:24 +00:00
commit e2f56b8cc8
56 changed files with 10013 additions and 0 deletions
+486
View File
@@ -0,0 +1,486 @@
:root {
--bg-primary: #1a1a2e;
--bg-secondary: #16213e;
--bg-card: #0f3460;
--bg-input: #1a1a2e;
--accent: #00b4d8;
--accent-hover: #0096c7;
--text: #e0e0e0;
--text-muted: #888;
--danger: #e63946;
--success: #2ecc71;
--warning: #f39c12;
--border: #2a2a4a;
--sidebar-width: 280px;
}
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: system-ui, -apple-system, sans-serif;
background: var(--bg-primary);
color: var(--text);
line-height: 1.6;
min-height: 100vh;
}
/* Layout */
.layout {
display: flex;
min-height: 100vh;
}
.sidebar {
width: var(--sidebar-width);
background: #0f0f23;
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 100;
transition: transform 0.3s ease;
overflow-y: auto;
}
.sidebar .logo {
font-size: 1.5rem;
font-weight: 700;
padding: 1.5rem;
color: var(--accent);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
gap: 0.75rem;
}
.sidebar nav {
padding: 1rem 0;
flex: 1;
}
.sidebar nav a {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1.5rem;
color: var(--text-muted);
text-decoration: none;
font-size: 0.95rem;
transition: all 0.2s;
border-left: 3px solid transparent;
}
.sidebar nav a:hover {
background: rgba(0, 180, 216, 0.08);
color: var(--text);
}
.sidebar nav a.active {
background: rgba(0, 180, 216, 0.12);
color: var(--accent);
border-left-color: var(--accent);
}
.main {
flex: 1;
margin-left: var(--sidebar-width);
padding: 2rem;
min-width: 0;
}
/* Cards */
.card {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
margin-bottom: 1.5rem;
}
.card-header {
padding: 1rem 1.25rem;
border-bottom: 1px solid var(--border);
font-weight: 600;
font-size: 1.05rem;
}
.card-body {
padding: 1.25rem;
}
/* Tables */
.table {
width: 100%;
border-collapse: collapse;
}
.table th {
text-align: left;
padding: 0.75rem 1rem;
font-weight: 600;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
border-bottom: 2px solid var(--border);
background: rgba(0, 0, 0, 0.15);
position: sticky;
top: 0;
}
.table td {
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border);
font-size: 0.95rem;
}
.table tr:nth-child(even) {
background: rgba(0, 0, 0, 0.1);
}
.table tbody tr:hover {
background: rgba(0, 180, 216, 0.06);
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.6rem 1.2rem;
font-size: 0.9rem;
font-weight: 500;
font-family: inherit;
border: 1px solid transparent;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
text-decoration: none;
line-height: 1.4;
}
.btn:active {
transform: scale(0.97);
}
.btn-primary {
background: var(--accent);
color: #fff;
}
.btn-primary:hover {
background: var(--accent-hover);
}
.btn-danger {
background: var(--danger);
color: #fff;
}
.btn-danger:hover {
background: #c0392b;
}
.btn-success {
background: var(--success);
color: #fff;
}
.btn-success:hover {
background: #27ae60;
}
.btn-outline {
background: transparent;
border-color: var(--border);
color: var(--text);
}
.btn-outline:hover {
border-color: var(--accent);
color: var(--accent);
background: rgba(0, 180, 216, 0.08);
}
.btn-sm {
padding: 0.35rem 0.75rem;
font-size: 0.8rem;
}
/* Forms */
.form-group {
margin-bottom: 1.25rem;
}
.form-group label {
display: block;
margin-bottom: 0.4rem;
font-size: 0.9rem;
font-weight: 500;
color: var(--text-muted);
}
.form-group input,
.form-group select,
.form-group textarea {
width: 100%;
padding: 0.6rem 0.85rem;
font-size: 0.95rem;
font-family: inherit;
color: var(--text);
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: 6px;
transition: border-color 0.2s;
outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}
.form-group textarea {
resize: vertical;
min-height: 80px;
}
/* Badges */
.badge {
display: inline-block;
padding: 0.2rem 0.65rem;
font-size: 0.78rem;
font-weight: 600;
border-radius: 20px;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.badge-success {
background: rgba(46, 204, 113, 0.15);
color: var(--success);
}
.badge-warning {
background: rgba(243, 156, 18, 0.15);
color: var(--warning);
}
.badge-danger {
background: rgba(230, 57, 70, 0.15);
color: var(--danger);
}
/* Toasts */
.toast {
position: fixed;
bottom: 1.5rem;
right: 1.5rem;
z-index: 9999;
display: flex;
flex-direction: column;
gap: 0.5rem;
max-width: 360px;
}
.toast-message {
padding: 0.75rem 1rem;
border-radius: 8px;
font-size: 0.9rem;
font-weight: 500;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
animation: toastSlideIn 0.3s ease forwards;
display: flex;
align-items: center;
gap: 0.6rem;
}
.toast-message.toast-success {
background: var(--success);
color: #fff;
}
.toast-message.toast-error {
background: var(--danger);
color: #fff;
}
.toast-message.toast-warning {
background: var(--warning);
color: #fff;
}
.toast-message.toast-info {
background: var(--accent);
color: #fff;
}
@keyframes toastSlideIn {
from {
opacity: 0;
transform: translateX(40px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* Modal */
.modal {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 500;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s, visibility 0.2s;
}
.modal.show {
opacity: 1;
visibility: visible;
}
.modal-content {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 10px;
padding: 1.5rem;
width: 90%;
max-width: 480px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
transform: scale(0.95);
transition: transform 0.2s;
}
.modal.show .modal-content {
transform: scale(1);
}
/* Toggle Switch */
.toggle-switch {
position: relative;
display: inline-block;
width: 44px;
height: 24px;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
.toggle-switch .slider {
position: absolute;
cursor: pointer;
inset: 0;
background: var(--border);
border-radius: 24px;
transition: 0.2s;
}
.toggle-switch .slider::before {
content: "";
position: absolute;
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background: #fff;
border-radius: 50%;
transition: 0.2s;
}
.toggle-switch input:checked + .slider {
background: var(--accent);
}
.toggle-switch input:checked + .slider::before {
transform: translateX(20px);
}
/* Grid */
.grid {
display: grid;
gap: 1.25rem;
}
.grid-2 {
grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
grid-template-columns: repeat(3, 1fr);
}
/* Text Colors */
.text-success {
color: var(--success);
}
.text-warning {
color: var(--warning);
}
.text-danger {
color: var(--danger);
}
/* Flex Utilities */
.flex {
display: flex;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
/* Spacing */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
/* Responsive */
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
}
.sidebar.open {
transform: translateX(0);
}
.main {
margin-left: 0;
padding: 1rem;
}
.grid-2,
.grid-3 {
grid-template-columns: 1fr;
}
}