{{-- ========================================================== Summary --}}

{{ $device->name }}

{{ $peer?->looksConnected() ? 'Connected' : $device->status->label() }}

{{ $device->platform->label() }} ยท added {{ $device->created_at->format('j M Y') }}

All devices
@if ($peer)
@php $details = [ ['Location', $peer->server?->location?->display_name ?? 'Unknown'], ['Assigned VPN IP', $peer->assigned_ip ?? 'โ€”', true], ['Data used', format_bytes($peer->totalBytes())], ['Last handshake', $peer->last_handshake_at?->diffForHumans() ?? 'never'], ]; @endphp @foreach ($details as $detail)
{{ $detail[0] }}
{{ $detail[1] }}
@endforeach
@endif
{{-- =================================================== Configuration --}} @if ($device->isRevoked()) This device was revoked{{ $device->revoked_at ? ' '.$device->revoked_at->diffForHumans() : '' }} and can no longer connect. Add a new device to replace it. @elseif (! $peer) This device has no configuration. Generate one below to start connecting. @elseif (! $config) The private key for this device is no longer stored, so the configuration cannot be shown again. Generate a new one below โ€” the old one will stop working. @else @if (session('fresh_private_key')) Import it into your WireGuard client. It contains your device's private key, so treat it like a password โ€” anyone who has it can connect as this device. @endif @if ($canDownload) Download .conf @endif @if ($qrCode)
{!! $qrCode !!}

Scan with the WireGuard app on your {{ $device->platform->label() }} device.

@endif
Configuration Copy
{{-- Blurred until hovered or focused. The key is on screen in a browser window that may be shared or shoulder-surfed. --}}
{{ $config }}

Hover to reveal. Contains your private key.

@endif {{-- ====================================================== Regenerate --}} @unless ($device->isRevoked())
@csrf

Use this if the configuration was exposed, or to connect through a different location. The current configuration stops working as soon as the new one is issued.

Regenerate
{{-- ========================================================== Revoke --}}

Permanently disconnects this device and frees its slot immediately, so you can register a replacement straight away. This cannot be undone.

@csrf @method('DELETE') Revoke device
@endunless