Each allowed_domains entry can now carry its own backend {host, port}.
That lets one proxy on port 25565 serve multiple MC servers, picking
the upstream from the domain the client typed.
- proxy/main.py: ProxyState.backend_for(domain) → tuple|None,
honors per-domain backend first, falls back to top-level backend.
handle_client uses backend_for(); blocked / disabled domains
return None (and still get a Login Disconnect on join attempts).
- api/routes/{config,domains}.py: DomainBackend model + optional
backend field on create/patch. PATCH supports clear_backend=true
to drop a per-domain override and revert to default.
- frontend/Domains.jsx: full rewrite — new-domain form has host/port
inputs, table shows each row's effective backend, inline edit +
reset button per row.
- frontend/Settings.jsx: backend section relabeled "기본 백엔드 (fallback)"
- README updated with multi-server example config.
333 lines
6.3 KiB
CSS
333 lines
6.3 KiB
CSS
:root {
|
|
color-scheme: dark light;
|
|
--bg: #0f1115;
|
|
--panel: #161a22;
|
|
--panel-2: #1d2230;
|
|
--border: #2a2f3a;
|
|
--text: #e6e8eb;
|
|
--muted: #8a93a6;
|
|
--accent: #4f8cff;
|
|
--ok: #3fb950;
|
|
--warn: #f0883e;
|
|
--danger: #f85149;
|
|
}
|
|
@media (prefers-color-scheme: light) {
|
|
:root {
|
|
--bg: #f5f6f8;
|
|
--panel: #ffffff;
|
|
--panel-2: #f0f2f5;
|
|
--border: #d8dde6;
|
|
--text: #1d2230;
|
|
--muted: #5b6478;
|
|
}
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
margin: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
code {
|
|
font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
|
|
background: var(--panel-2);
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.layout {
|
|
display: grid;
|
|
grid-template-columns: 220px 1fr;
|
|
min-height: 100vh;
|
|
}
|
|
.sidebar {
|
|
background: var(--panel);
|
|
border-right: 1px solid var(--border);
|
|
padding: 24px 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.logo {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
margin-bottom: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.dot {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
background: var(--accent);
|
|
box-shadow: 0 0 8px var(--accent);
|
|
}
|
|
.sidebar nav {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
flex: 1;
|
|
}
|
|
.sidebar nav a {
|
|
color: var(--muted);
|
|
text-decoration: none;
|
|
padding: 10px 12px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
}
|
|
.sidebar nav a.active {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
.sidebar nav a:hover {
|
|
background: var(--panel-2);
|
|
color: var(--text);
|
|
}
|
|
.sidebar-footer {
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
padding: 8px 12px;
|
|
}
|
|
|
|
.content {
|
|
padding: 32px 40px;
|
|
max-width: 1200px;
|
|
}
|
|
h1 {
|
|
margin: 0 0 24px;
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
}
|
|
h2 {
|
|
margin: 0 0 16px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 16px;
|
|
}
|
|
.card {
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 20px;
|
|
}
|
|
.card-title {
|
|
color: var(--muted);
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
font-weight: 600;
|
|
}
|
|
.card-value {
|
|
font-size: 26px;
|
|
font-weight: 700;
|
|
margin-top: 8px;
|
|
}
|
|
.card-value.ok { color: var(--ok); }
|
|
.card-value.warn { color: var(--warn); }
|
|
.card-value.small { font-size: 16px; font-weight: 600; }
|
|
|
|
button {
|
|
background: var(--accent);
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 14px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
}
|
|
button:hover { filter: brightness(1.1); }
|
|
button.danger { background: var(--danger); }
|
|
button.ghost {
|
|
background: transparent;
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
}
|
|
button.ghost:hover { background: var(--panel-2); filter: none; }
|
|
button.mt { margin-top: 12px; }
|
|
input:disabled { opacity: 0.7; cursor: not-allowed; }
|
|
|
|
input,
|
|
select,
|
|
textarea {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
padding: 8px 10px;
|
|
font-size: 14px;
|
|
font-family: inherit;
|
|
}
|
|
textarea {
|
|
width: 100%;
|
|
max-width: 520px;
|
|
resize: vertical;
|
|
margin-top: 4px;
|
|
}
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-bottom: 16px;
|
|
align-items: center;
|
|
}
|
|
.form-row input { flex: 1; }
|
|
.form-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 12px;
|
|
margin-bottom: 12px;
|
|
}
|
|
.form-grid label {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
color: var(--muted);
|
|
font-size: 12px;
|
|
}
|
|
.form-grid input { width: 100%; }
|
|
.inline-edit { display: flex; gap: 6px; }
|
|
.inline-edit input { padding: 4px 8px; font-size: 13px; }
|
|
|
|
.table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
}
|
|
.table th,
|
|
.table td {
|
|
padding: 10px 14px;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 14px;
|
|
vertical-align: middle;
|
|
}
|
|
.table th {
|
|
background: var(--panel-2);
|
|
color: var(--muted);
|
|
font-weight: 600;
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
.table tr:last-child td { border-bottom: none; }
|
|
|
|
.toolbar {
|
|
display: flex;
|
|
gap: 16px;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.muted { color: var(--muted); font-size: 13px; }
|
|
.ok { color: var(--ok); font-size: 13px; }
|
|
|
|
.error {
|
|
background: rgba(248, 81, 73, 0.1);
|
|
border: 1px solid var(--danger);
|
|
color: var(--danger);
|
|
padding: 12px 14px;
|
|
border-radius: 6px;
|
|
margin-bottom: 16px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.switch {
|
|
display: inline-block;
|
|
width: 36px;
|
|
height: 20px;
|
|
position: relative;
|
|
}
|
|
.switch input { opacity: 0; width: 0; height: 0; }
|
|
.switch span {
|
|
position: absolute;
|
|
cursor: pointer;
|
|
inset: 0;
|
|
background: var(--border);
|
|
border-radius: 20px;
|
|
transition: 0.2s;
|
|
}
|
|
.switch span:before {
|
|
content: "";
|
|
position: absolute;
|
|
height: 16px;
|
|
width: 16px;
|
|
left: 2px;
|
|
bottom: 2px;
|
|
background: white;
|
|
border-radius: 50%;
|
|
transition: 0.2s;
|
|
}
|
|
.switch input:checked + span { background: var(--ok); }
|
|
.switch input:checked + span:before { transform: translateX(16px); }
|
|
|
|
section.card { margin-bottom: 16px; }
|
|
section.card label {
|
|
display: block;
|
|
margin-bottom: 12px;
|
|
font-size: 13px;
|
|
color: var(--muted);
|
|
}
|
|
section.card label input {
|
|
display: block;
|
|
margin-top: 4px;
|
|
width: 100%;
|
|
max-width: 320px;
|
|
color: var(--text);
|
|
}
|
|
section.card label.inline {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
color: var(--text);
|
|
font-size: 14px;
|
|
}
|
|
section.card label.inline input { width: auto; margin-top: 0; }
|
|
label.inline {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 14px;
|
|
}
|
|
label.inline input { margin: 0; }
|
|
|
|
.actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.pill {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
.pill-allowed { background: rgba(63, 185, 80, 0.15); color: var(--ok); }
|
|
.pill-blocked { background: rgba(248, 81, 73, 0.15); color: var(--danger); }
|
|
.pill-error { background: rgba(240, 136, 62, 0.15); color: var(--warn); }
|