From 5aa0de636f32fd674b77a2b3dd64d97b51680707 Mon Sep 17 00:00:00 2001
From: 4s3ti <4s3ti@protonmail.com>
Date: Mon, 31 May 2021 21:01:46 +0200
Subject: [PATCH 1/4] IRC From freenode to libera.chat
Changed info about IRC Chanel,
Chanel moved from freenode to libera.chat
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4faf479..b122bb6 100644
--- a/README.md
+++ b/README.md
@@ -108,7 +108,7 @@ Please be respectful and be aware that this is maintained with our free time!
for community support or general questions.
Feel free to post on our subreddit
-You can also join #pivpn on freenode in IRC
+You can also join #pivpn on [libera.chat](https://libera.chat) IRC network
For code related issues, code contributions, feature requests, feel free to open an issue here at github.
We will classify the issues the best we can to keep things sorted.
From 88a701c16a62b002daf291fb0822c5e5f720c58a Mon Sep 17 00:00:00 2001
From: DerDanilo
Date: Sun, 6 Jun 2021 01:10:43 +0200
Subject: [PATCH 2/4] add PERSISTENTKEEPALIVE support
---
auto_install/install.sh | 7 +++++++
examples/unattended_wireguard_example.conf | 4 ++++
scripts/wireguard/makeCONF.sh | 4 ++++
3 files changed, 15 insertions(+)
diff --git a/auto_install/install.sh b/auto_install/install.sh
index 6ba1625..e2168ef 100755
--- a/auto_install/install.sh
+++ b/auto_install/install.sh
@@ -1129,6 +1129,13 @@ installPiVPN(){
echo "pivpnPROTO=${pivpnPROTO}" >> ${tempsetupVarsFile}
echo "pivpnMTU=${pivpnMTU}" >> ${tempsetupVarsFile}
+ # Write PERSISTENTKEEPALIVE if provided via unattended file
+ # May also be added manually to /etc/pivpn/wireguard/setupVars.conf
+ # post installation to be used for client profile generation
+ if [ "$pivpnPERSISTENTKEEPALIVE" ]; then
+ echo "pivpnPERSISTENTKEEPALIVE=${pivpnPERSISTENTKEEPALIVE}" >> ${tempsetupVarsFile}
+ fi
+
fi
{
diff --git a/examples/unattended_wireguard_example.conf b/examples/unattended_wireguard_example.conf
index c8e354e..2ce5b8e 100644
--- a/examples/unattended_wireguard_example.conf
+++ b/examples/unattended_wireguard_example.conf
@@ -9,4 +9,8 @@ pivpnPORT=51820
pivpnDNS1=9.9.9.9
pivpnDNS2=149.112.112.112
pivpnHOST=pivpn.example.com
+# Optional, but might be useful
+# Can also be added to setupVars post setup
+# to be used during client profile generation
+pivpnPERSISTENTKEEPALIVE=21
UNATTUPG=1
diff --git a/scripts/wireguard/makeCONF.sh b/scripts/wireguard/makeCONF.sh
index 17b55c7..82bcd01 100755
--- a/scripts/wireguard/makeCONF.sh
+++ b/scripts/wireguard/makeCONF.sh
@@ -120,6 +120,10 @@ PublicKey = $(cat keys/server_pub)
PresharedKey = $(cat "keys/${CLIENT_NAME}_psk")
Endpoint = ${pivpnHOST}:${pivpnPORT}
AllowedIPs = ${ALLOWED_IPS}" >> "configs/${CLIENT_NAME}.conf"
+
+if [ -n "${pivpnPERSISTENTKEEPALIVE}" ]; then
+ echo "PersistentKeepalive = ${pivpnPERSISTENTKEEPALIVE}" >> "configs/${CLIENT_NAME}.conf"
+fi
echo "::: Client config generated"
echo "### begin ${CLIENT_NAME} ###
From fd15e62b4e8a5af1ae0d37b43ad405868191c314 Mon Sep 17 00:00:00 2001
From: DerDanilo
Date: Mon, 7 Jun 2021 23:31:29 +0200
Subject: [PATCH 3/4] remove inline comment
---
examples/unattended_wireguard_example.conf | 3 ---
1 file changed, 3 deletions(-)
diff --git a/examples/unattended_wireguard_example.conf b/examples/unattended_wireguard_example.conf
index 2ce5b8e..fbdebbd 100644
--- a/examples/unattended_wireguard_example.conf
+++ b/examples/unattended_wireguard_example.conf
@@ -9,8 +9,5 @@ pivpnPORT=51820
pivpnDNS1=9.9.9.9
pivpnDNS2=149.112.112.112
pivpnHOST=pivpn.example.com
-# Optional, but might be useful
-# Can also be added to setupVars post setup
-# to be used during client profile generation
pivpnPERSISTENTKEEPALIVE=21
UNATTUPG=1
From 6efd6a47d7728f178819a599f3e4123eee7ecafd Mon Sep 17 00:00:00 2001
From: DerDanilo
Date: Mon, 21 Jun 2021 22:37:34 +0200
Subject: [PATCH 4/4] change persistentkeepalive to official suggestion
---
examples/unattended_wireguard_example.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/unattended_wireguard_example.conf b/examples/unattended_wireguard_example.conf
index fbdebbd..1316313 100644
--- a/examples/unattended_wireguard_example.conf
+++ b/examples/unattended_wireguard_example.conf
@@ -9,5 +9,5 @@ pivpnPORT=51820
pivpnDNS1=9.9.9.9
pivpnDNS2=149.112.112.112
pivpnHOST=pivpn.example.com
-pivpnPERSISTENTKEEPALIVE=21
+pivpnPERSISTENTKEEPALIVE=25
UNATTUPG=1