From 9b033fb0f0a6eba2359ffc3f38f8178a0b644c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lumi=C3=A8re=20=C3=89lev=C3=A9?= <88174309+PoneyClairDeLune@users.noreply.github.com> Date: Wed, 28 Jun 2023 17:59:26 +0000 Subject: [PATCH] Added INSTALL_VER to Xray and Sing Box installers --- install/singbox.sh | 2 +- install/xray.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/install/singbox.sh b/install/singbox.sh index ace3f9b..1769a1e 100644 --- a/install/singbox.sh +++ b/install/singbox.sh @@ -2,7 +2,7 @@ appName="Sing Box" debArch=$(uname -m) transArch=$debArch -targetVer="1.2.6" +targetVer=${INSTALL_VER:-1.3.0} case $debArch in "x86_64" | "amd64") transArch="amd64" diff --git a/install/xray.sh b/install/xray.sh index 4fbfe96..775413e 100644 --- a/install/xray.sh +++ b/install/xray.sh @@ -26,7 +26,11 @@ if [ -e "./xray.zip" ] ; then cp ./xray.zip $PREFIX/opt/xray/ else echo "Downloading xray..." - curl -sLo $PREFIX/opt/xray/xray.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-$transArch.zip + if [ "$INSTALL_VER" != "" ] ; then + curl -sLo $PREFIX/opt/xray/xray.zip https://github.com/XTLS/Xray-core/releases/download/v${INSTALL_VER}/Xray-linux-$transArch.zip + else + curl -sLo $PREFIX/opt/xray/xray.zip https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-$transArch.zip + fi fi echo "Extracting archive..." cd $PREFIX/opt/xray/