Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b83cd04
Remove BSDs(f,o)
KobeArthurScofield Mar 18, 2026
0d2babe
Leftovers cleanup
KobeArthurScofield Mar 18, 2026
b447164
Change BSD(f,o) to source-only; Remove Linux on IBM Z
KobeArthurScofield Mar 19, 2026
831a577
Cleanups
KobeArthurScofield Mar 19, 2026
66324d5
Update notes for reproducible
KobeArthurScofield Mar 20, 2026
c072649
Additional notes for architecture deprecation
KobeArthurScofield Mar 21, 2026
79f2f2e
Add back s390x and set Windows ARM64 to v8.0
KobeArthurScofield Mar 21, 2026
3330285
Note change
KobeArthurScofield Mar 21, 2026
93b84f1
Fix missing friendly name
KobeArthurScofield Mar 21, 2026
9df6a74
Optimize build list & Add back building for temporarily dropped builds
KobeArthurScofield Mar 23, 2026
cfbf033
Fix wrong type
KobeArthurScofield Mar 23, 2026
2519956
Merge branch 'main' into rm-bsd
KobeArthurScofield Mar 23, 2026
dca4549
sxs
KobeArthurScofield Mar 23, 2026
2c01f28
Adjust supporting notes.
KobeArthurScofield Mar 23, 2026
005bf18
Drop legacy/obselete architectures in v27
KobeArthurScofield Mar 24, 2026
d763019
Drop x86 for back-seating; simplify building parameters
KobeArthurScofield Mar 25, 2026
c39d10b
Add GOARM64=v8.2 to Windows; Add GOAMD64 to Windows (v2) and macOS (v3)
KobeArthurScofield Apr 4, 2026
60857c8
Add back FreeBSD into regular CI; also several adjustments
KobeArthurScofield Apr 6, 2026
74973e7
Update README
KobeArthurScofield Apr 6, 2026
edce7ad
Only 64-bit for BSD
KobeArthurScofield Apr 7, 2026
f88e074
Merge branch 'main' into rm-bsd
KobeArthurScofield May 29, 2026
3ff5728
trim
KobeArthurScofield May 29, 2026
8e4089c
Set single run
KobeArthurScofield Jun 1, 2026
8759716
adjusting several details
KobeArthurScofield Jun 5, 2026
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
7 changes: 1 addition & 6 deletions .github/build/friendly-filenames.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"android-arm64": { "friendlyName": "android-arm64-v8a" },
"android-amd64": { "friendlyName": "android-amd64" },
"darwin-amd64": { "friendlyName": "macos-64" },
"darwin-arm64": { "friendlyName": "macos-arm64-v8a" },
"freebsd-386": { "friendlyName": "freebsd-32" },
"freebsd-amd64": { "friendlyName": "freebsd-64" },
"freebsd-arm64": { "friendlyName": "freebsd-arm64-v8a" },
"freebsd-arm7": { "friendlyName": "freebsd-arm32-v7a" },
"linux-386": { "friendlyName": "linux-32" },
"linux-amd64": { "friendlyName": "linux-64" },
"linux-arm5": { "friendlyName": "linux-arm32-v5" },
Expand All @@ -14,19 +13,15 @@
"linux-arm7": { "friendlyName": "linux-arm32-v7a" },
"linux-mips64le": { "friendlyName": "linux-mips64le" },
"linux-mips64": { "friendlyName": "linux-mips64" },
"linux-mipslesoftfloat": { "friendlyName": "linux-mips32le-softfloat" },
"linux-mipsle": { "friendlyName": "linux-mips32le" },
"linux-mipssoftfloat": { "friendlyName": "linux-mips32-softfloat" },
"linux-mips": { "friendlyName": "linux-mips32" },
"linux-ppc64le": { "friendlyName": "linux-ppc64le" },
"linux-ppc64": { "friendlyName": "linux-ppc64" },
"linux-riscv64": { "friendlyName": "linux-riscv64" },
"linux-loong64": { "friendlyName": "linux-loong64" },
"linux-s390x": { "friendlyName": "linux-s390x" },
"openbsd-386": { "friendlyName": "openbsd-32" },
"openbsd-amd64": { "friendlyName": "openbsd-64" },
"openbsd-arm64": { "friendlyName": "openbsd-arm64-v8a" },
"openbsd-arm7": { "friendlyName": "openbsd-arm32-v7a" },
"windows-386": { "friendlyName": "windows-32" },
"windows-amd64": { "friendlyName": "windows-64" },
"windows-arm64": { "friendlyName": "windows-arm64-v8a" }
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/extended-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Extended or Back-seated Nightly Build
# Secondary builds are built here.
# Failing maybe not meaning a blocking. This is a judgement call.

on:
workflow_dispatch:
push:
pull_request:
types: [opened, synchronize, reopened]

jobs:
delay-bubble:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- name: Sleep for 20 As A Bubble
run: sleep 20

build:
needs: delay-bubble
permissions:
contents: write
strategy:
matrix:
include:
- goos: openbsd
goarch: amd64
assetname: openbsd-64
- goos: openbsd
goarch: arm64
assetname: openbsd-arm64-v8a
fail-fast: false

runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
steps:
- name: Checkout codebase
uses: actions/checkout@v6

- name: Show workflow information
run: |
_NAME=${{ matrix.assetname }}
echo "GOOS: $GOOS, GOARCH: $GOARCH, RELEASE_NAME: $_NAME"
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
check-latest: true

- name: Get project dependencies
run: go mod download

- name: Build Xray
run: |
if [[ ${GOARCH} == 'arm' ]]; then
GOARM="7"
fi
# Building
mkdir -p build_assets
COMMID=$(git describe --always --dirty)
if [[ ${GOOS} == 'windows' ]]; then
echo 'Building Xray for Windows...'
go build -o build_assets/xray.exe -trimpath -buildvcs=false -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main
else
echo 'Building Xray...'
go build -o build_assets/xray -trimpath -buildvcs=false -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main
if [[ ${GOARCH} == 'mips' || ${GOARCH} == 'mipsle' ]]; then
GOMIPS=softfloat go build -o build_assets/xray_softfloat -trimpath -buildvcs=false -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main
fi
fi

- name: Copy README.md & LICENSE
run: |
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE

- name: Upload files to Artifacts
uses: actions/upload-artifact@v7
with:
name: Xray-${{ env.ASSET_NAME }}
path: |
./build_assets/*
2 changes: 2 additions & 0 deletions .github/workflows/release-win7.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Build and Release for Windows 7
# The furthest build might happen in August 2028 before a newer version of Go 1 releases.
# Multiple factors may affect this procedure.

on:
workflow_dispatch:
Expand Down
117 changes: 58 additions & 59 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,86 +78,66 @@ jobs:
contents: write
strategy:
matrix:
# Include amd64 on all platforms.
goos: [windows, freebsd, openbsd, linux, darwin]
goarch: [amd64, 386]
# Include x86-64 and ARM64 on all platforms.
goos: [windows, freebsd, linux, darwin, android]
goarch: [amd64, arm64]
patch-assetname: [""]
exclude:
# Exclude i386 on darwin
- goarch: 386
goos: darwin
# Building for OpenBSD has been suspended unless there are active
# contributors that uses OpenBSD actively.
# PRs for OpenBSD compatibility are welcome.
# Building for BSDs will be add back when there is active maintenance.
include:
# BEGIN MacOS ARM64
- goos: darwin
goarch: arm64
# END MacOS ARM64
# BEGIN Linux ARM 5 6 7
# BEGIN RISCV & LoongArch
- goos: linux
goarch: arm
goarm: 7
goarch: riscv64
- goos: linux
goarch: arm
goarm: 6
goarch: loong64
# END RISCV & LoongArch
# BEGIN PPC
- goos: linux
goarch: arm
goarm: 5
# END Linux ARM 5 6 7
# BEGIN Android ARM 8
- goos: android
goarch: arm64
# END Android ARM 8
# BEGIN Android AMD64
- goos: android
goarch: amd64
patch-assetname: android-amd64
# END Android AMD64
# Windows ARM
- goos: windows
goarch: arm64
# BEGIN Other architectures
# BEGIN riscv64 & ARM64 & LOONG64
goarch: ppc64
- goos: linux
goarch: arm64
goarch: ppc64le
# END PPC
# BEGIN S390X
- goos: linux
goarch: riscv64
goarch: s390x
# END S390X
# BEGIN x86
# Removing x86 32-bit on Linux will depending on upstream.
- goos: linux
goarch: loong64
# END riscv64 & ARM64 & LOONG64
goarch: 386
# Back-seating x86 32-bit on Windows (not win7) will be in v27.
- goos: windows
goarch: 386
# END x86
# BEGIN MIPS
# MIPS64 BE/LE will be removed in v27
- goos: linux
goarch: mips64
- goos: linux
goarch: mips64le
# MIPS32 BE/LE will be back-seated in v27.
# This is a long tail architecture due to router productions.
- goos: linux
goarch: mipsle
- goos: linux
goarch: mips
# END MIPS
# BEGIN PPC
# BEGIN Linux ARM
# ARMv7 is a long tail
- goos: linux
goarch: ppc64
- goos: linux
goarch: ppc64le
# END PPC
# BEGIN FreeBSD ARM
- goos: freebsd
goarch: arm64
- goos: freebsd
goarch: arm
goarm: 7
# END FreeBSD ARM
# BEGIN S390X
# ARMv6 will be removed in v27
- goos: linux
goarch: s390x
# END S390X
# END Other architectures
# BEGIN OPENBSD ARM
- goos: openbsd
goarch: arm64
- goos: openbsd
goarch: arm
goarm: 7
# END OPENBSD ARM
goarm: 6
# ARMv5 will be removed in v27
- goos: linux
goarch: arm
goarm: 5
# END Linux ARM
fail-fast: false

runs-on: ubuntu-latest
Expand Down Expand Up @@ -186,8 +166,8 @@ jobs:
- name: Show workflow information
run: |
_NAME=${{ matrix.patch-assetname }}
[ -n "$_NAME" ] || _NAME=$(jq ".[\"$GOOS-$GOARCH$GOARM$GOMIPS\"].friendlyName" -r < .github/build/friendly-filenames.json)
echo "GOOS: $GOOS, GOARCH: $GOARCH, GOARM: $GOARM, GOMIPS: $GOMIPS, RELEASE_NAME: $_NAME"
[ -n "$_NAME" ] || _NAME=$(jq ".[\"$GOOS-$GOARCH$GOARM\"].friendlyName" -r < .github/build/friendly-filenames.json)
echo "GOOS: $GOOS, GOARCH: $GOARCH, RELEASE_NAME: $_NAME"
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV

- name: Set up Go
Expand All @@ -201,6 +181,25 @@ jobs:

- name: Build Xray
run: |
# Special processing for x86-64 and ARM64
if [[ ${GOARCH} == 'amd64' ]]; then
if [[ ${GOOS} == 'windows' ]]; then
GOAMD64="v2"
elif [[ ${GOOS} == 'darwin' ]]; then
GOAMD64="v3"
fi
elif [[ ${GOARCH} == 'arm64' ]]; then
if [[ ${GOOS} == 'windows' ]]; then
GOARM64="v8.2"
elif [[ ${GOOS} == 'darwin' ]]; then
GOARM64="v8.4"
fi
fi
# Special processing for 32-bit ARM, after linux/arm v5/v6 removed
# if [[ ${GOARCH} == 'arm' ]]; then
# GOARM="7"
# fi
# Building
mkdir -p build_assets
COMMID=$(git describe --always --dirty)
if [[ ${GOOS} == 'windows' ]]; then
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,30 @@ Make sure that you are using the same Go version, and remember to set the git co
CGO_ENABLED=0 go build -o xray -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=REPLACE -s -w -buildid=" -v ./main
```

If you are compiling a Windows x86-64 target, add this environment variable before compiling:

```bash
GOAMD64=v2
```

If you are compiling a macOS x86-64 target, add this environment variable before compiling:

```bash
GOAMD64=v3
```

If you are compiling a Windows ARM64 target, add this environment variable before compiling:

```bash
GOARM64=v8.2
```

If you are compiling a macOS ARM64 target, add this environment variable before compiling:

```bash
GOARM64=v8.4
```

For Android:

```bash
Expand Down
4 changes: 2 additions & 2 deletions common/buf/readv_posix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows && !wasm && !illumos && !openbsd
// +build !windows,!wasm,!illumos,!openbsd
//go:build !windows && !openbsd
// +build !windows,!openbsd

package buf

Expand Down
4 changes: 2 additions & 2 deletions common/buf/readv_reader.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !wasm && !openbsd
// +build !wasm,!openbsd
//go:build !openbsd
// +build !openbsd

package buf

Expand Down
4 changes: 2 additions & 2 deletions common/buf/readv_reader_stub.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build wasm || openbsd
// +build wasm openbsd
//go:build openbsd
// +build openbsd

package buf

Expand Down
4 changes: 2 additions & 2 deletions common/buf/readv_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !wasm && !openbsd
// +build !wasm,!openbsd
//go:build !openbsd
// +build !openbsd

package buf_test

Expand Down
37 changes: 0 additions & 37 deletions common/buf/readv_unix.go

This file was deleted.

4 changes: 2 additions & 2 deletions transport/internet/sockopt_other.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build js || netbsd || openbsd || solaris
// +build js netbsd openbsd solaris
//go:build !windows && !darwin && !linux && !android && !freebsd
// +build !windows,!darwin,!linux,!android,!freebsd

package internet

Expand Down
Loading