From b6d1caf95d61ae68a0cb2b1ac55928b09cf74850 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 5 Jul 2026 20:08:10 +0200 Subject: [PATCH] fix(script): rename the Xray binary to xray-linux-arm32 on 32-bit ARM The panel maps GOARCH=arm to "arm32" and launches bin/xray-linux-arm32, but install.sh/update.sh renamed the release tarball's binary (xray-linux-armv5/v6/v7) to xray-linux-arm. On armv7 boxes every update downloaded a fresh Xray core into a name the panel never executes, so an old correctly-named binary kept running forever, and a brand-new install had no launchable Xray binary at all. Rename to arm32 to match the panel (mtg stays plain "arm", matching internal/mtproto), and drop the stale misnamed xray-linux-arm during updates like the existing amd64 cleanup. Closes #5788 --- install.sh | 8 +++++--- update.sh | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 1f204a725..e2a637d43 100644 --- a/install.sh +++ b/install.sh @@ -1493,10 +1493,12 @@ install_x-ui() { chmod +x x-ui chmod +x x-ui.sh - # Check the system's architecture and rename the file accordingly + # Check the system's architecture and rename the file accordingly. + # The panel binary maps GOARCH=arm to "arm32" (internal/xray/process.go), + # so the Xray binary must be named xray-linux-arm32; mtg keeps plain "arm". if [[ $(arch) == "armv5" || $(arch) == "armv6" || $(arch) == "armv7" ]]; then - mv bin/xray-linux-$(arch) bin/xray-linux-arm - chmod +x bin/xray-linux-arm + mv bin/xray-linux-$(arch) bin/xray-linux-arm32 + chmod +x bin/xray-linux-arm32 if [[ -f bin/mtg-linux-$(arch) ]]; then mv bin/mtg-linux-$(arch) bin/mtg-linux-arm chmod +x bin/mtg-linux-arm diff --git a/update.sh b/update.sh index cf992261a..f3efb8a0a 100755 --- a/update.sh +++ b/update.sh @@ -1023,6 +1023,7 @@ update_x-ui() { rm ${xui_folder}/x-ui.sh -f > /dev/null 2>&1 echo -e "${green}Removing old xray version...${plain}" rm ${xui_folder}/bin/xray-linux-amd64 -f > /dev/null 2>&1 + rm ${xui_folder}/bin/xray-linux-arm -f > /dev/null 2>&1 echo -e "${green}Removing old README and LICENSE file...${plain}" rm ${xui_folder}/bin/README.md -f > /dev/null 2>&1 rm ${xui_folder}/bin/LICENSE -f > /dev/null 2>&1 @@ -1044,10 +1045,12 @@ update_x-ui() { fi chmod +x x-ui > /dev/null 2>&1 - # Check the system's architecture and rename the file accordingly + # Check the system's architecture and rename the file accordingly. + # The panel binary maps GOARCH=arm to "arm32" (internal/xray/process.go), + # so the Xray binary must be named xray-linux-arm32; mtg keeps plain "arm". if [[ $(arch) == "armv5" || $(arch) == "armv6" || $(arch) == "armv7" ]]; then - mv bin/xray-linux-$(arch) bin/xray-linux-arm > /dev/null 2>&1 - chmod +x bin/xray-linux-arm > /dev/null 2>&1 + mv bin/xray-linux-$(arch) bin/xray-linux-arm32 > /dev/null 2>&1 + chmod +x bin/xray-linux-arm32 > /dev/null 2>&1 fi chmod +x x-ui bin/xray-linux-$(arch) > /dev/null 2>&1