Generate and deploy real WG/AWG configs to VPS over SSH
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -23,7 +23,12 @@
|
||||
<div class="panel-head"><strong>QR‑код</strong></div>
|
||||
<div class="panel-body">
|
||||
<img class="qr" src="/admin/clients/{{ client.id }}/qr" alt="QR config" />
|
||||
<p class="muted" style="margin-top:0.8rem">Отсканируйте в клиенте WireGuard / AmneziaWG.</p>
|
||||
<p class="muted" style="margin-top:0.8rem">
|
||||
Готовый рабочий конфиг: скачайте `.conf` или отсканируйте QR в WireGuard / AmneziaWG.
|
||||
{% if not client.server.vpn_installed %}
|
||||
<br><strong>Сначала нажмите «Установить VPN на сервер» в разделе Серверы</strong> — иначе пиры не будут на VPS.
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if client.notes %}
|
||||
<p><strong>Заметка:</strong> {{ client.notes }}</p>
|
||||
{% endif %}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
<div class="flash">Сервер удалён</div>
|
||||
{% elif flash == 'ssh_ok' %}
|
||||
<div class="flash">SSH проверка успешна</div>
|
||||
{% elif flash == 'vpn_installed' %}
|
||||
<div class="flash">VPN установлен на VPS — можно создавать клиентов и скачивать .conf</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -85,13 +87,17 @@
|
||||
{{ s.name }}
|
||||
<span class="badge badge-proto">{{ s.protocol }}</span>
|
||||
{% if s.ssh_reachable %}<span class="badge badge-ok">SSH ok</span>{% else %}<span class="badge badge-off">SSH ?</span>{% endif %}
|
||||
{% if s.vpn_installed %}<span class="badge badge-ok">VPN installed</span>{% else %}<span class="badge badge-off">VPN not installed</span>{% endif %}
|
||||
</strong>
|
||||
<div class="actions">
|
||||
<form method="post" action="/admin/servers/{{ s.id }}/check-ssh" class="inline-form">
|
||||
<button class="btn btn-sm btn-ghost" type="submit">Проверить SSH</button>
|
||||
</form>
|
||||
<form method="post" action="/admin/servers/{{ s.id }}/install-vpn" class="inline-form" onsubmit="return confirm('Установить Docker + VPN контейнер на VPS? Это займёт 1–3 минуты.')">
|
||||
<button class="btn btn-sm btn-accent" type="submit">{% if s.vpn_installed %}Переустановить VPN{% else %}Установить VPN на сервер{% endif %}</button>
|
||||
</form>
|
||||
<form method="post" action="/admin/servers/{{ s.id }}/sync" class="inline-form">
|
||||
<button class="btn btn-sm btn-ghost" type="submit">Синхр. conf</button>
|
||||
<button class="btn btn-sm btn-ghost" type="submit">Синхр. conf → VPS</button>
|
||||
</form>
|
||||
<form method="post" action="/admin/servers/{{ s.id }}/delete" class="inline-form" onsubmit="return confirm('Удалить сервер и всех клиентов?')">
|
||||
<button class="btn btn-sm btn-danger" type="submit">Удалить</button>
|
||||
|
||||
Reference in New Issue
Block a user