1
0
mirror of synced 2024-11-29 08:06:04 +03:00

New Libreswan version

- Support upgrading to Libreswan 4.14.
This commit is contained in:
hwdsl2 2024-03-16 11:52:16 -05:00
parent 7ee03da7d0
commit 3b24405cdd
4 changed files with 12 additions and 12 deletions

View File

@ -69,7 +69,7 @@ EOF
} }
get_swan_ver() { 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" 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_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) 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() { check_swan_ver() {
if [ "$SWAN_VER" = "4.8" ]; then if [ "$SWAN_VER" = "4.8" ] || [ "$SWAN_VER" = "4.13" ]; then
exiterr "Libreswan version 4.8 is not supported." exiterr "Libreswan version $SWAN_VER is not supported."
fi fi
if ! printf '%s\n%s' "4.5" "$SWAN_VER" | sort -C -V \ 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 || ! printf '%s\n%s' "$SWAN_VER" "$swan_ver_cur" | sort -C -V; then

View File

@ -52,7 +52,7 @@ EOF
} }
get_swan_ver() { 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" 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_url="$base_url/upg-v1-amzn-2-swanver"
swan_ver_latest=$(wget -t 2 -T 10 -qO- "$swan_ver_url" | head -n 1) 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() { check_swan_ver() {
if [ "$SWAN_VER" = "4.8" ]; then if [ "$SWAN_VER" = "4.8" ] || [ "$SWAN_VER" = "4.13" ]; then
exiterr "Libreswan version 4.8 is not supported." exiterr "Libreswan version $SWAN_VER is not supported."
fi fi
if [ "$SWAN_VER" != "3.32" ] \ if [ "$SWAN_VER" != "3.32" ] \
&& { ! printf '%s\n%s' "4.1" "$SWAN_VER" | sort -C -V \ && { ! printf '%s\n%s' "4.1" "$SWAN_VER" | sort -C -V \

View File

@ -85,7 +85,7 @@ EOF
} }
get_swan_ver() { 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" 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_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) 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() { check_swan_ver() {
if [ "$SWAN_VER" = "4.8" ]; then if [ "$SWAN_VER" = "4.8" ] || [ "$SWAN_VER" = "4.13" ]; then
exiterr "Libreswan version 4.8 is not supported." exiterr "Libreswan version $SWAN_VER is not supported."
fi fi
if [ "$SWAN_VER" != "3.32" ] \ if [ "$SWAN_VER" != "3.32" ] \
&& { ! printf '%s\n%s' "4.1" "$SWAN_VER" | sort -C -V \ && { ! printf '%s\n%s' "4.1" "$SWAN_VER" | sort -C -V \

View File

@ -84,7 +84,7 @@ EOF
} }
get_swan_ver() { 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" 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_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) 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() { check_swan_ver() {
if [ "$SWAN_VER" = "4.8" ]; then if [ "$SWAN_VER" = "4.8" ] || [ "$SWAN_VER" = "4.13" ]; then
exiterr "Libreswan version 4.8 is not supported." exiterr "Libreswan version $SWAN_VER is not supported."
fi fi
if [ "$SWAN_VER" = "3.32" ] && [ "$os_ver" = "11" ]; then if [ "$SWAN_VER" = "3.32" ] && [ "$os_ver" = "11" ]; then
exiterr "Libreswan 3.32 is not supported on Debian 11." exiterr "Libreswan 3.32 is not supported on Debian 11."