From 3b24405cdd72194c9b05d7ea7645dbafef0a7f8e Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Sat, 16 Mar 2024 11:52:16 -0500 Subject: [PATCH] New Libreswan version - Support upgrading to Libreswan 4.14. --- extras/vpnupgrade_alpine.sh | 6 +++--- extras/vpnupgrade_amzn.sh | 6 +++--- extras/vpnupgrade_centos.sh | 6 +++--- extras/vpnupgrade_ubuntu.sh | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/extras/vpnupgrade_alpine.sh b/extras/vpnupgrade_alpine.sh index 04e5c90..e2ae32b 100755 --- a/extras/vpnupgrade_alpine.sh +++ b/extras/vpnupgrade_alpine.sh @@ -69,7 +69,7 @@ EOF } get_swan_ver() { - swan_ver_cur=4.12 + swan_ver_cur=4.14 base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" swan_ver_url="$base_url/upg-v1-$os_type-$os_ver-swanver" swan_ver_latest=$(wget -t 2 -T 10 -qO- "$swan_ver_url" | head -n 1) @@ -80,8 +80,8 @@ get_swan_ver() { } check_swan_ver() { - if [ "$SWAN_VER" = "4.8" ]; then - exiterr "Libreswan version 4.8 is not supported." + if [ "$SWAN_VER" = "4.8" ] || [ "$SWAN_VER" = "4.13" ]; then + exiterr "Libreswan version $SWAN_VER is not supported." fi if ! printf '%s\n%s' "4.5" "$SWAN_VER" | sort -C -V \ || ! printf '%s\n%s' "$SWAN_VER" "$swan_ver_cur" | sort -C -V; then diff --git a/extras/vpnupgrade_amzn.sh b/extras/vpnupgrade_amzn.sh index a2e09cc..1aecea3 100755 --- a/extras/vpnupgrade_amzn.sh +++ b/extras/vpnupgrade_amzn.sh @@ -52,7 +52,7 @@ EOF } get_swan_ver() { - swan_ver_cur=4.12 + swan_ver_cur=4.14 base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" swan_ver_url="$base_url/upg-v1-amzn-2-swanver" swan_ver_latest=$(wget -t 2 -T 10 -qO- "$swan_ver_url" | head -n 1) @@ -63,8 +63,8 @@ get_swan_ver() { } check_swan_ver() { - if [ "$SWAN_VER" = "4.8" ]; then - exiterr "Libreswan version 4.8 is not supported." + if [ "$SWAN_VER" = "4.8" ] || [ "$SWAN_VER" = "4.13" ]; then + exiterr "Libreswan version $SWAN_VER is not supported." fi if [ "$SWAN_VER" != "3.32" ] \ && { ! printf '%s\n%s' "4.1" "$SWAN_VER" | sort -C -V \ diff --git a/extras/vpnupgrade_centos.sh b/extras/vpnupgrade_centos.sh index f7bade2..489f49c 100755 --- a/extras/vpnupgrade_centos.sh +++ b/extras/vpnupgrade_centos.sh @@ -85,7 +85,7 @@ EOF } get_swan_ver() { - swan_ver_cur=4.12 + swan_ver_cur=4.14 base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" swan_ver_url="$base_url/upg-v1-$os_type-$os_ver-swanver" swan_ver_latest=$(wget -t 2 -T 10 -qO- "$swan_ver_url" | head -n 1) @@ -96,8 +96,8 @@ get_swan_ver() { } check_swan_ver() { - if [ "$SWAN_VER" = "4.8" ]; then - exiterr "Libreswan version 4.8 is not supported." + if [ "$SWAN_VER" = "4.8" ] || [ "$SWAN_VER" = "4.13" ]; then + exiterr "Libreswan version $SWAN_VER is not supported." fi if [ "$SWAN_VER" != "3.32" ] \ && { ! printf '%s\n%s' "4.1" "$SWAN_VER" | sort -C -V \ diff --git a/extras/vpnupgrade_ubuntu.sh b/extras/vpnupgrade_ubuntu.sh index 80c31c6..b53c6f7 100755 --- a/extras/vpnupgrade_ubuntu.sh +++ b/extras/vpnupgrade_ubuntu.sh @@ -84,7 +84,7 @@ EOF } get_swan_ver() { - swan_ver_cur=4.12 + swan_ver_cur=4.14 base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" swan_ver_url="$base_url/upg-v1-$os_type-$os_ver-swanver" swan_ver_latest=$(wget -t 2 -T 10 -qO- "$swan_ver_url" | head -n 1) @@ -95,8 +95,8 @@ get_swan_ver() { } check_swan_ver() { - if [ "$SWAN_VER" = "4.8" ]; then - exiterr "Libreswan version 4.8 is not supported." + if [ "$SWAN_VER" = "4.8" ] || [ "$SWAN_VER" = "4.13" ]; then + exiterr "Libreswan version $SWAN_VER is not supported." fi if [ "$SWAN_VER" = "3.32" ] && [ "$os_ver" = "11" ]; then exiterr "Libreswan 3.32 is not supported on Debian 11."