904582e7fa
- CSRF protection on all POST forms (session token) - ensure_schema() moved to module-level, removed from before_request - gunicorn now binds to 127.0.0.1 only, runs as unprivileged user wgadmin - nginx reverse proxy with HTTPS (Let's Encrypt, wg.4mont.ru) - HTTP → HTTPS redirect before Basic Auth prompt - Auth moved to nginx level (auth_basic), wg-peerctl called via sudo - ufw firewall: only 22/80/443/51820 open - fail2ban: SSH + nginx (5 attempts → 1h ban) - Add Enable/Disable toggle buttons in peer table - Add .conf file download route - Light theme: white background, blue accent, subtle shadows - Modern sidebar layout, styled badges, responsive forms Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
1009 B
HTML
40 lines
1009 B
HTML
{% extends 'base.html' %}
|
|
{% block content %}
|
|
<div class="page-header">
|
|
<h2>Скрипты и пути</h2>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>Команды</h3>
|
|
<div class="script-list">
|
|
{% for key, cmd in commands.items() %}
|
|
<div class="script-item">
|
|
<div class="script-label">{{ key }}</div>
|
|
<div class="script-cmd-wrap">
|
|
<pre class="script-cmd">{{ cmd }}</pre>
|
|
<button class="btn btn-sm copy-btn" onclick="copyText(this, '{{ cmd | replace("'", "\\'") }}')">Копировать</button>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>Важные пути</h3>
|
|
<ul class="path-list">
|
|
{% for path in paths %}
|
|
<li class="mono-sm">{{ path }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
|
|
<script>
|
|
function copyText(btn, text) {
|
|
navigator.clipboard.writeText(text).then(() => {
|
|
btn.textContent = 'Скопировано!';
|
|
setTimeout(() => btn.textContent = 'Копировать', 2000);
|
|
});
|
|
}
|
|
</script>
|
|
{% endblock %}
|