Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquydang <81231812+quydang04@users.noreply.github.com>2024-01-20 12:32:35 +0300
committerGitHub <noreply@github.com>2024-01-20 12:32:35 +0300
commit74ba6d7825741fe7965c91e5ccd8ae6d0436fe59 (patch)
tree01d1cb09bb870b2522b3d1aee4d16f805a9f1c17
parent7fd4015f174e4c529612dfeee534fb1f2842ba7d (diff)
Add support for ARMv5 and x86 (#1642)
-rw-r--r--.github/workflows/docker.yml4
-rw-r--r--.github/workflows/release.yml31
-rwxr-xr-xDockerInit.sh10
-rw-r--r--install.sh8
-rw-r--r--web/translation/translate.vi_VN.toml4
5 files changed, 48 insertions, 9 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index b2dc0ca4..6afe8618 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -1,4 +1,4 @@
-name: Release 3X-UI dockerhub
+name: Release 3X-UI for Docker
on:
push:
tags:
@@ -36,6 +36,6 @@ jobs:
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
- platforms: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6
+ platforms: linux/amd64, linux/arm64/v8, linux/arm/v7, linux/arm/v6, linux/386, linux/arm/v5
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 91a7e093..62bc6e7c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -15,6 +15,8 @@ jobs:
- arm64
- armv7
- armv6
+ - 386
+ - armv5
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
@@ -30,8 +32,14 @@ jobs:
sudo apt-get update
if [ "${{ matrix.platform }}" == "arm64" ]; then
sudo apt install gcc-aarch64-linux-gnu
- elif [ "${{ matrix.platform }}" == "armv7" ] || [ "${{ matrix.platform }}" == "armv6" ]; then
+ elif [ "${{ matrix.platform }}" == "armv7" ]; then
+ sudo apt install gcc-arm-linux-gnueabihf
+ elif [ "${{ matrix.platform }}" == "armv6" ]; then
sudo apt install gcc-arm-linux-gnueabihf
+ elif [ "${{ matrix.platform }}" == "386" ]; then
+ sudo apt install gcc-i686-linux-gnu
+ elif [ "${{ matrix.platform }}" == "armv5" ]; then
+ sudo apt install gcc-arm-linux-gnueabi
fi
- name: Build x-ui
@@ -42,10 +50,21 @@ jobs:
if [ "${{ matrix.platform }}" == "arm64" ]; then
export GOARCH=arm64
export CC=aarch64-linux-gnu-gcc
- elif [ "${{ matrix.platform }}" == "armv7" ] || [ "${{ matrix.platform }}" == "armv6" ]; then
+ elif [ "${{ matrix.platform }}" == "armv7" ]; then
export GOARCH=arm
export GOARM=7
export CC=arm-linux-gnueabihf-gcc
+ elif [ "${{ matrix.platform }}" == "armv6" ]; then
+ export GOARCH=arm
+ export GOARM=6
+ export CC=arm-linux-gnueabihf-gcc
+ elif [ "${{ matrix.platform }}" == "386" ]; then
+ export GOARCH=386
+ export CC=i686-linux-gnu-gcc
+ elif [ "${{ matrix.platform }}" == "armv5" ]; then
+ export GOARCH=arm
+ export GOARM=5
+ export CC=arm-linux-gnueabi-gcc
fi
go build -o xui-release -v main.go
@@ -75,6 +94,14 @@ jobs:
wget ${Xray_URL}Xray-linux-arm32-v6.zip
unzip Xray-linux-arm32-v6.zip
rm -f Xray-linux-arm32-v6.zip
+ elif [ "${{ matrix.platform }}" == "386" ]; then
+ wget ${Xray_URL}Xray-linux-32.zip
+ unzip Xray-linux-32.zip
+ rm -f Xray-linux-32.zip
+ elif [ "${{ matrix.platform }}" == "armv5" ]; then
+ wget ${Xray_URL}Xray-linux-arm32-v5.zip
+ unzip Xray-linux-arm32-v5.zip
+ rm -f Xray-linux-arm32-v5.zip
fi
rm -f geoip.dat geosite.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
diff --git a/DockerInit.sh b/DockerInit.sh
index c62dc77e..bbfcb04e 100755
--- a/DockerInit.sh
+++ b/DockerInit.sh
@@ -5,6 +5,10 @@ case $1 in
ARCH="64"
FNAME="amd64"
;;
+ i386)
+ ARCH="32"
+ FNAME="i386"
+ ;;
armv8 | arm64 | aarch64)
ARCH="arm64-v8a"
FNAME="arm64"
@@ -17,6 +21,10 @@ case $1 in
ARCH="arm32-v6"
FNAME="armv6"
;;
+ armv5)
+ ARCH="arm32-v5"
+ FNAME="armv5"
+ ;;
*)
ARCH="64"
FNAME="amd64"
@@ -29,7 +37,7 @@ cd build/bin
wget "https://github.com/XTLS/Xray-core/releases/download/v1.8.7/Xray-linux-${ARCH}.zip"
unzip "Xray-linux-${ARCH}.zip"
-rm -f "Xray-linux-${ARCH}.zip" geoip.dat geosite.dat geoip_IR.dat geosite_IR.dat geoip_VN.dat geosite_VN.dat
+rm -f "Xray-linux-${ARCH}.zip" geoip.dat geosite.dat
mv xray "xray-linux-${FNAME}"
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
diff --git a/install.sh b/install.sh
index 8d4a0c0c..8fd42ab8 100644
--- a/install.sh
+++ b/install.sh
@@ -26,12 +26,15 @@ echo "The OS release is: $release"
arch3xui() {
case "$(uname -m)" in
x86_64 | x64 | amd64) echo 'amd64' ;;
+ i*86 | x86) echo '386' ;;
armv8* | armv8 | arm64 | aarch64) echo 'arm64' ;;
armv7* | armv7 | arm) echo 'armv7' ;;
- armv6* | armv6 | arm) echo 'armv6' ;;
+ armv6* | armv6) echo 'armv6' ;;
+ armv5* | armv5) echo 'armv5' ;;
*) echo -e "${green}Unsupported CPU architecture! ${plain}" && rm -f install.sh && exit 1 ;;
esac
}
+
echo "arch: $(arch3xui)"
os_version=""
@@ -163,7 +166,8 @@ install_x-ui() {
chmod +x x-ui
# Check the system's architecture and rename the file accordingly
- if [[ $(arch3xui) == "armv6" || $(arch3xui) == "armv7" ]]; then
+ if [[ $(arch3xui) == "armv5" || $(arch3xui) == "armv6" || $(arch3xui) == "armv7" ]]; then
+
mv bin/xray-linux-$(arch3xui) bin/xray-linux-arm
chmod +x bin/xray-linux-arm
fi
diff --git a/web/translation/translate.vi_VN.toml b/web/translation/translate.vi_VN.toml
index d627254b..7491a70c 100644
--- a/web/translation/translate.vi_VN.toml
+++ b/web/translation/translate.vi_VN.toml
@@ -74,9 +74,9 @@
[pages.index]
"title" = "Trạng thái hệ thống"
-"memory" = "Bộ nhớ"
+"memory" = "Ram"
"hard" = "Dung lượng"
-"xrayStatus" = "Trạng thái"
+"xrayStatus" = "Trạng thái Xray"
"stopXray" = "Dừng lại"
"restartXray" = "Khởi động lại"
"xraySwitch" = "Phiên bản"