From c04d056be6008ecc70b4440913316624bb96bda9 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Sat, 29 Jan 2022 01:28:56 -0600 Subject: [PATCH] Cleanup --- vpnsetup_alpine.sh | 6 +++--- vpnsetup_amzn.sh | 6 +++--- vpnsetup_centos.sh | 6 +++--- vpnsetup_ubuntu.sh | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/vpnsetup_alpine.sh b/vpnsetup_alpine.sh index 59d7b05..f4f7c61 100755 --- a/vpnsetup_alpine.sh +++ b/vpnsetup_alpine.sh @@ -171,10 +171,10 @@ install_fail2ban() { } get_swan_ver() { - base_url="https://github.com/hwdsl2/vpn-extras/raw/main/ver/v1" - swan_ver_url="$base_url/$os_type/$os_ver/swanver" - swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) SWAN_VER=4.6 + base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" + swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver" + swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$'; then SWAN_VER="$swan_ver_latest" fi diff --git a/vpnsetup_amzn.sh b/vpnsetup_amzn.sh index 49f64ad..1ba9532 100755 --- a/vpnsetup_amzn.sh +++ b/vpnsetup_amzn.sh @@ -171,10 +171,10 @@ install_fail2ban() { } get_swan_ver() { - base_url="https://github.com/hwdsl2/vpn-extras/raw/main/ver/v1" - swan_ver_url="$base_url/amzn/2/swanver" - swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) SWAN_VER=4.6 + base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" + swan_ver_url="$base_url/v1-amzn-2-swanver" + swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$'; then SWAN_VER="$swan_ver_latest" fi diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index 95f3f5b..e328626 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -226,10 +226,10 @@ install_fail2ban() { } get_swan_ver() { - base_url="https://github.com/hwdsl2/vpn-extras/raw/main/ver/v1" - swan_ver_url="$base_url/$os_type/$os_ver/swanver" - swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) SWAN_VER=4.6 + base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" + swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver" + swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$'; then SWAN_VER="$swan_ver_latest" fi diff --git a/vpnsetup_ubuntu.sh b/vpnsetup_ubuntu.sh index 57c76e8..bc2f480 100755 --- a/vpnsetup_ubuntu.sh +++ b/vpnsetup_ubuntu.sh @@ -209,10 +209,10 @@ install_fail2ban() { } get_swan_ver() { - base_url="https://github.com/hwdsl2/vpn-extras/raw/main/ver/v1" - swan_ver_url="$base_url/$os_type/$os_ver/swanver" - swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) SWAN_VER=4.6 + base_url="https://github.com/hwdsl2/vpn-extras/releases/download/v1.0.0" + swan_ver_url="$base_url/v1-$os_type-$os_ver-swanver" + swan_ver_latest=$(wget -t 3 -T 15 -qO- "$swan_ver_url" | head -n 1) if printf '%s' "$swan_ver_latest" | grep -Eq '^([3-9]|[1-9][0-9]{1,2})(\.([0-9]|[1-9][0-9]{1,2})){1,2}$'; then SWAN_VER="$swan_ver_latest" fi