{% extends "app.html" %} {% comment %} # SPDX-License-Identifier: AGPL-3.0-or-later {% endcomment %} {% load bootstrap %} {% load i18n %} {% load extras %} {% block configuration %}

{% trans "As a Server" %}

{% url 'bind:index' as bind_url %} {% blocktrans trimmed %} {{ box_name }} acts a VPN server. Devices can connect to it and route traffic safely using {{ box_name }}'s internet connection no matter where they are. Bind app must be installed and enabled for this. {% endblocktrans %}

{% if server.public_key %}

{% trans "Clients allowed to connect to this server:" %}

{% if server.peers %} {% for peer in server.peers.values %} {% if peer.public_key %} {% endif %} {% endfor %} {% else %} {% endif %}
{% trans "Name" %} {% trans "Public Key" %} {% trans "Client IP addresses" %} {% trans "Last Connected Time" %}
{{ peer.name }} {{ peer.public_key }} {{ peer.allowed_ips|join:", " }} {{ peer.status.latest_handshake|default:'' }}
{% blocktrans trimmed %} No peers configured to connect to this {{ box_name }} yet. {% endblocktrans %}
{% csrf_token %}
{% icon 'plus' %} {% trans "Add Client with an Existing Key" %}
{% else %}

{% trans "WireGuard server not started yet." %}

{% csrf_token %}
{% endif %}

{% trans "As a Client" %}

{% blocktrans trimmed %} {{ box_name }} can connect to a VPN server and route it's traffic through the internet connection of a VPN provider. {% endblocktrans %}

{% blocktrans trimmed %} Servers that {{ box_name }} will connect to: {% endblocktrans %}

{% if client_peers %} {% for interface, server in client_peers.items %} {% for peer in server.peers.values %} {% if forloop.first %} {% endif %} {% endfor %} {% endfor %} {% else %} {% endif %}
{% trans "Endpoint" %} {% trans "Public Key" %} {% trans "Last Connected Time" %}
{{ peer.endpoint }} {{ peer.public_key }} {{ peer.status.latest_handshake|default:'' }}
{% blocktrans trimmed %} No connections to remote servers are configured yet. {% endblocktrans %}
{% icon 'plus' %} {% trans "Add Connection to Server" %}
{{ block.super }} {% endblock %}