From f1074b99b3a4e4997ba5d3172354af55cbd68fd1 Mon Sep 17 00:00:00 2001 From: rezor92 Date: Tue, 17 Nov 2020 09:05:20 +0100 Subject: [PATCH] Hide DNS in client configuration if not set --- wg_dashboard_backend/templates/peer.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wg_dashboard_backend/templates/peer.j2 b/wg_dashboard_backend/templates/peer.j2 index b78a305..a4b9b42 100644 --- a/wg_dashboard_backend/templates/peer.j2 +++ b/wg_dashboard_backend/templates/peer.j2 @@ -1,7 +1,9 @@ [Interface] Address = {{ data.peer.address }}/{{ data.server.subnet }}{%- if is_ipv6 -%},{{ data.peer.v6_address }}/{{ data.server.v6_subnet }}{%- endif %} PrivateKey = {{ data.peer.private_key }} +{% if data.peer.dns %} DNS = {{ data.peer.dns }} +{% endif %} [Peer] PublicKey = {{ data.server.public_key }}