Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 386 support #55

Merged
merged 29 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9e25891
fix
Misaka-blog May 4, 2023
18d62ba
Bump google.golang.org/grpc from 1.54.0 to 1.55.0 (#40)
dependabot[bot] May 5, 2023
c9ac111
add
Misaka-blog May 5, 2023
5dbe351
Merge branch 'dev' of https://github.com/sing-web/x-ui into dev
Misaka-blog May 5, 2023
6a44fc4
warp
Misaka-blog May 5, 2023
bd71a67
fix
Misaka-blog May 5, 2023
0901b36
up
Misaka-blog May 5, 2023
a4efeb3
fix
Misaka-blog May 5, 2023
1dc0c23
Bump github.com/shirou/gopsutil/v3 from 3.23.3 to 3.23.4 (#43)
dependabot[bot] May 6, 2023
6a856d4
merge
Misaka-blog May 6, 2023
b9f4ac1
fix
Misaka-blog May 6, 2023
1c8967d
Merge branch 'main' into dev
Misaka-blog May 8, 2023
48b55b4
project info
Misaka-blog May 8, 2023
f1b0908
optimize
Misaka-blog May 8, 2023
87d7927
Bump gorm.io/gorm from 1.25.0 to 1.25.1 (#45)
dependabot[bot] May 9, 2023
dfff298
Show x-ui log on panel
Misaka-blog May 9, 2023
2eab63d
Merge branch 'main' into dev
Misaka-blog May 9, 2023
ded2812
add
Misaka-blog May 10, 2023
610a918
Merge branch 'main' into dev
Misaka-blog May 10, 2023
92ef609
Merge branch 'main' into dev
Misaka-blog May 12, 2023
c16af5b
change docker source
Misaka-blog May 12, 2023
8e6b26e
fix
Misaka-blog May 12, 2023
2e58ce0
show xray config
Misaka-blog May 12, 2023
c853898
Fix ciphersuites bug
Misaka-blog May 12, 2023
7b71b15
Merge branch 'main' into dev
Misaka-blog May 12, 2023
1de1214
fix
Misaka-blog May 15, 2023
b8ac1c4
modify
Misaka-blog May 15, 2023
f3c230b
Merge branch 'main' into dev
Misaka-blog May 15, 2023
2f45bae
Add 386 support
Misaka-blog May 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,50 @@ jobs:
release_name: ${{ github.ref }}
draft: false
prerelease: false
linux386build:
name: build x-ui 386 version
needs: release
runs-on: ubuntu-latest
container: docker.io/ubuntu:18.04
steps:
- uses: actions/[email protected]
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: stable
- name: build linux 386 version
run: |
apt-get update
apt install -y sudo curl wget unzip ca-certificates build-essential
CGO_ENABLED=1 GOOS=linux GOARCH=386 go build -o xui-release -v main.go
mkdir x-ui
cp xui-release x-ui/xui-release
cp x-ui.service x-ui/x-ui.service
cp x-ui.sh x-ui/x-ui.sh
cd x-ui
mv xui-release x-ui
mkdir bin
cd bin
wget https://github.com/XTLS/Xray-core/releases/latest/download/Xray-linux-32.zip
unzip Xray-linux-32.zip
rm -f Xray-linux-32.zip
mv xray xray-linux-386
rm -f geoip.dat geosite.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
cd ..
cd ..
- name: package
run: tar -zcvf x-ui-linux-386.tar.gz x-ui
- name: upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: x-ui-linux-386.tar.gz
asset_name: x-ui-linux-386.tar.gz
asset_content_type: application/gzip

linuxamd64build:
name: build x-ui amd64 version
Expand Down
9 changes: 3 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ fi

arch=$(arch)

if [[ $arch == "x86_64" || $arch == "x64" || $arch == "amd64" ]]; then
if [[ $arch == "i386" || $arch == "i686" ]]; then
arch="386"
elif [[ $arch == "x86_64" || $arch == "x64" || $arch == "amd64" ]]; then
arch="amd64"
elif [[ $arch == "aarch64" || $arch == "arm64" ]]; then
arch="arm64"
Expand All @@ -44,11 +46,6 @@ fi

echo "Arch: ${arch}"

if [ $(getconf WORD_BIT) != '32' ] && [ $(getconf LONG_BIT) != '64' ]; then
echo "This software does not support 32-bit system (x86), please use 64-bit system (x86_64), if the detection is wrong, please contact the author"
exit -1
fi

os_version=""

# os version
Expand Down
4 changes: 3 additions & 1 deletion install_CN.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ fi

arch=$(arch)

if [[ $arch == "x86_64" || $arch == "x64" || $arch == "amd64" ]]; then
if [[ $arch == "i386" || $arch == "i686" ]]; then
arch="386"
elif [[ $arch == "x86_64" || $arch == "x64" || $arch == "amd64" ]]; then
arch="amd64"
elif [[ $arch == "aarch64" || $arch == "arm64" ]]; then
arch="arm64"
Expand Down
2 changes: 2 additions & 0 deletions web/service/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ func (s *ServerService) downloadXRay(version string) (string, error) {
}

switch arch {
case "386":
arch = "32"
case "amd64":
arch = "64"
case "arm64":
Expand Down