From a6426a138e8e6e02e7f275d4fbd1afb80dabad65 Mon Sep 17 00:00:00 2001 From: Nyr Date: Thu, 21 May 2020 15:04:54 +0200 Subject: [PATCH] Improve client configuration annexation The old approach did break BoringTun due to a bug (in BoringTun). --- wireguard-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index 36dec90..272e445 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -588,8 +588,8 @@ else echo new_client_dns new_client_setup - # Append the configuration to the WireGuard interface - wg addconf wg0 <(wg-quick strip wg0) + # Append new client configuration to the WireGuard interface + wg addconf wg0 <(sed -n "/^# BEGIN_PEER $client/,/^# END_PEER $client/p" /etc/wireguard/wg0.conf) echo qrencode -t UTF8 < ~/"$client.conf" echo -e '\xE2\x86\x91 That is a QR code containing your client configuration.'