{% load i18n rivet_static %}

{% translate "Set up in the WireGuard app" %}

{% if not setup.via_server %}

{% blocktranslate trimmed %}The server does not offer the phone connection yet (FORGEIEC_RIVET_PHONES_PUBLIC_KEY is not set). These values connect the phone directly to the gateway as before.{% endblocktranslate %}

{% endif %}

{% blocktranslate trimmed %}The key pair is generated on the phone. The private key stays on the phone; the portal only knows the public key. These values stay available here.{% endblocktranslate %}

{% if rekey_url %}

{% translate "Set up with a QR code" %}

{% blocktranslate trimmed %}The browser generates the key pair. Only the public key is sent to the portal; the private key stays in this page and goes into the QR code. In the WireGuard app tap “+” → “Scan from QR code”.{% endblocktranslate %}

{% csrf_token %}

{% translate "Set up manually" %}

{% endif %}
  1. {% translate "Install the WireGuard app (App Store or Google Play)." %}
  2. {% translate "In the app tap “+” → “Create from scratch” and enter a name under “Name”, e.g. “Rivet”." %}
  3. {% translate "Generate the key pair: Android: tap the icon at the end of the “Private key” field (“Generate new private key”), iOS: tap “Generate keypair”. The “Public key” shown by the app must be the one stored here:" %}
    {{ phone.public_key }}
  4. {% if setup.dns %}{% translate "Under “Interface” enter “Addresses”, “DNS servers” and “MTU” from the table below." %}{% else %}{% translate "Under “Interface” enter “Addresses” and “MTU” from the table below." %}{% endif %}
  5. {% translate "Tap “Add peer” and enter “Public key”, “Endpoint”, “Allowed IPs” and “Persistent keepalive” from the table below." %}
  6. {% translate "Tap “Save” (Android: disk icon at the top) and switch the tunnel on with the switch next to its name." %}
{% if setup.dns %}{% endif %}
{% translate "Interface" context "WireGuard app" %}
{% translate "Addresses" context "WireGuard app" %}{{ setup.address }}
{% translate "MTU" context "WireGuard app" %}{{ setup.mtu }}
{% translate "DNS servers" context "WireGuard app" %}{{ setup.dns }}
{% blocktranslate trimmed with server=setup.dns_server domain=setup.search_domain %}DNS server {{ server }}, search domain {{ domain }}{% endblocktranslate %}
{% translate "Peer" context "WireGuard app" %}
{% translate "Public key" context "WireGuard app" %}{{ setup.peer_public_key }}
{% translate "Endpoint" context "WireGuard app" %}{{ setup.endpoint }}
{% translate "Allowed IPs" context "WireGuard app" %}{{ setup.allowed_ips }}
{% translate "Persistent keepalive" context "WireGuard app" %}{{ setup.keepalive }}
{% if setup.via_server %}

{% translate "Reachable with the tunnel switched on" %}

{% if setup.reachable %}{% else %}

{% translate "No forwards are released for this phone yet." %}

{% endif %}

{% translate "Connection via the server:" %} {% if phone_server %}{% if phone_server.seen %}{% blocktranslate trimmed with when=phone_server.seen|date:"SHORT_DATETIME_FORMAT" rx=phone_server.rx_bytes|filesizeformat tx=phone_server.tx_bytes|filesizeformat %}last handshake {{ when }} · received {{ rx }} · sent {{ tx }}{% endblocktranslate %}{% else %}{% translate "never connected" %}{% endif %} {% else %}{% translate "unknown" %}{% endif %}

{% endif %}
{% translate "Configuration as text (template)" %}

{% translate "Replace the placeholder in the line “PrivateKey” with the private key from the WireGuard app before using the template." %}

{{ config_template }}

{% translate "Download template (.conf)" %}

{% if rekey_url %} {% endif %}