From 8945629515364b4b7b056b9f564f905df75b917c Mon Sep 17 00:00:00 2001 From: a131878 <42891231+a131878@users.noreply.github.com> Date: Thu, 17 Jul 2025 18:56:58 +0800 Subject: [PATCH] Add files via upload --- xray/xray.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xray/xray.sh b/xray/xray.sh index c920824..f73ba15 100644 --- a/xray/xray.sh +++ b/xray/xray.sh @@ -231,10 +231,10 @@ Config() { ;; esac done - #echo -n "Install UPX compress version?[n]: " - #read xray_UPX + echo -n "Install UPX compress version?[n]: " + read xray_UPX fi - #echo "$xray_UPX"|grep -qi '^y' && xray_UPX="upx" || xray_UPX="" + echo "$xray_UPX"|grep -qi '^y' && xray_UPX="upx" || xray_UPX="" } GetAbi() { @@ -267,9 +267,8 @@ InstallFile() { mkdir -p "${xray_install_directory:=/usr/local/xray}" || Error "Create xray install directory failed." cd "$xray_install_directory" || Error "Create cns install directory failed." #install xray - github_repo="https://gh.0507.dpdns.org/https://github.com/a131878/cns/releases/download/xray" - $download_tool_cmd xray "$github_repo/xray-linux-${machine}" || Error "xray download failed." - $download_tool_cmd xray.init https://gh.0507.dpdns.org/https://github.com/a131878/cns/refs/heads/main/xray/xray.init || Error "xray.init download failed." + $download_tool_cmd xray http://xray.540186.xyz/dxy/xray/${xray_UPX}/linux_${machine}${softfloat} || Error "xray download failed." + $download_tool_cmd xray.init http://xray.540186.xyz/dxy/xray/xray.init || Error "xray.init download failed." [ -f '/etc/rc.common' ] && rcCommon='/etc/rc.common' sed -i "s~#!/bin/sh~#!$SHELL $rcCommon~" xray.init sed -i "s~\[xray_install_directory\]~$xray_install_directory~g" xray.init @@ -278,7 +277,7 @@ InstallFile() { ln -s "$xray_install_directory/xray.init" /etc/init.d/xray chmod -R +rwx "$xray_install_directory" /etc/init.d/xray if which systemctl &>/dev/null && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then - $download_tool_cmd /lib/systemd/system/xray.service https://gh.0507.dpdns.org/https://github.com/a131878/cns/refs/heads/main/xray/xray.service || Error "xray.service download failed." + $download_tool_cmd /lib/systemd/system/xray.service http://xray.540186.xyz/dxy/xray/xray.service || Error "xray.service download failed." chmod +rwx /lib/systemd/system/xray.service sed -i "s~\[xray_install_directory\]~$xray_install_directory~g" /lib/systemd/system/xray.service systemctl daemon-reload