feat: add support for AWG2 QR code generation and vpn:// URL configuration

This commit is contained in:
infosave2007
2026-04-20 19:52:33 +03:00
parent 08e0a3499c
commit c29162ddb9
5 changed files with 221 additions and 17 deletions
+19 -1
View File
@@ -146,12 +146,30 @@
{% if client.qr_code %}
<div class="bg-white rounded shadow p-6 text-center">
<h3 class="font-bold mb-4">QR Code</h3>
<h3 class="font-bold mb-4">QR Code (Simple)</h3>
<img src="{{ client.qr_code }}" alt="QR Code" class="mx-auto" style="max-width: 300px; width: 100%; height: auto;">
<p class="text-sm text-gray-600 mt-2">Scan with Amnezia VPN app</p>
</div>
{% endif %}
{% if is_awg2 and qr_code_vpn_url %}
<div class="bg-white rounded shadow p-6 text-center mt-6">
<h3 class="font-bold mb-4">QR Code (vpn:// URL)</h3>
<img src="{{ qr_code_vpn_url }}" alt="QR Code VPN URL" class="mx-auto" style="max-width: 300px; width: 100%; height: auto;">
<p class="text-sm text-gray-600 mt-2">Scan with Amnezia VPN app</p>
</div>
{% endif %}
{% if is_awg2 and vpn_url_config %}
<div class="bg-white rounded shadow p-6 mt-6">
<h3 class="font-bold mb-4">VPN URL Configuration</h3>
<div class="bg-gray-100 p-4 rounded text-left overflow-x-auto">
<code class="text-sm break-all">{{ vpn_url_config }}</code>
</div>
<p class="text-sm text-gray-600 mt-2">Copy this vpn:// URL to import configuration</p>
</div>
{% endif %}
{% if protocol_output and client.show_text_content %}
<div class="bg-white rounded shadow p-6 mt-6">
<h3 class="font-bold mb-4">{{ t('clients.connection_instructions') }}</h3>