Skip to content

Commit

Permalink
Add 386 support (#55)
Browse files Browse the repository at this point in the history
* fix

* Bump google.golang.org/grpc from 1.54.0 to 1.55.0 (#40)

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.54.0 to 1.55.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.54.0...v1.55.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add

* warp

* fix

* fix

* Bump github.com/shirou/gopsutil/v3 from 3.23.3 to 3.23.4 (#43)

Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.23.3 to 3.23.4.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](shirou/gopsutil@v3.23.3...v3.23.4)

---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix

* project info

* optimize

* Bump gorm.io/gorm from 1.25.0 to 1.25.1 (#45)

Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.0 to 1.25.1.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](go-gorm/gorm@v1.25.0...v1.25.1)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Show x-ui log on panel

* add

* change docker source

* fix

* show xray config

* Fix ciphersuites bug

* fix

* modify

* Add 386 support

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
Misaka-blog and dependabot[bot] committed May 15, 2023
1 parent cbb8216 commit 095782e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 7 deletions.
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

0 comments on commit 095782e

Please sign in to comment.