From b83cd04a49d045bbee66df77aae5bd3804c263e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Wed, 18 Mar 2026 22:20:59 +0800 Subject: [PATCH 01/23] Remove BSDs(f,o) --- .github/build/friendly-filenames.json | 9 +- .github/workflows/release.yml | 41 +--- common/buf/readv_posix.go | 4 +- common/buf/readv_reader.go | 3 - common/buf/readv_reader_wasm.go | 15 -- common/buf/readv_test.go | 3 - common/buf/readv_unix.go | 37 --- transport/internet/sockopt_freebsd.go | 265 ---------------------- transport/internet/sockopt_other.go | 4 +- transport/internet/tcp/sockopt_freebsd.go | 26 --- transport/internet/tcp/sockopt_other.go | 4 +- transport/internet/udp/hub_freebsd.go | 46 ---- transport/internet/udp/hub_other.go | 4 +- 13 files changed, 15 insertions(+), 446 deletions(-) delete mode 100644 common/buf/readv_reader_wasm.go delete mode 100644 common/buf/readv_unix.go delete mode 100644 transport/internet/sockopt_freebsd.go delete mode 100644 transport/internet/tcp/sockopt_freebsd.go delete mode 100644 transport/internet/udp/hub_freebsd.go diff --git a/.github/build/friendly-filenames.json b/.github/build/friendly-filenames.json index e6679aedd370..e01ee48b1bdd 100644 --- a/.github/build/friendly-filenames.json +++ b/.github/build/friendly-filenames.json @@ -1,11 +1,8 @@ { "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" }, @@ -23,10 +20,6 @@ "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" } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33ab9c43987f..8bd5687264f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,18 +79,17 @@ jobs: strategy: matrix: # Include amd64 on all platforms. - goos: [windows, freebsd, openbsd, linux, darwin] - goarch: [amd64, 386] + goos: [windows, linux, darwin, android] + goarch: [amd64, 386, arm64] patch-assetname: [""] exclude: # Exclude i386 on darwin - goarch: 386 goos: darwin + # Exclude i386 on Android + - goarch: 386 + goos: android include: - # BEGIN MacOS ARM64 - - goos: darwin - goarch: arm64 - # END MacOS ARM64 # BEGIN Linux ARM 5 6 7 - goos: linux goarch: arm @@ -102,22 +101,8 @@ jobs: 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 - - goos: linux - goarch: arm64 + # BEGIN riscv64 & LOONG64 - goos: linux goarch: riscv64 - goos: linux @@ -139,25 +124,11 @@ jobs: - goos: linux goarch: ppc64le # END PPC - # BEGIN FreeBSD ARM - - goos: freebsd - goarch: arm64 - - goos: freebsd - goarch: arm - goarm: 7 - # END FreeBSD ARM # BEGIN S390X - 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 fail-fast: false runs-on: ubuntu-latest diff --git a/common/buf/readv_posix.go b/common/buf/readv_posix.go index eb63e3cc213b..508fc42379ce 100644 --- a/common/buf/readv_posix.go +++ b/common/buf/readv_posix.go @@ -1,5 +1,5 @@ -//go:build !windows && !wasm && !illumos -// +build !windows,!wasm,!illumos +//go:build !windows +// +build !windows package buf diff --git a/common/buf/readv_reader.go b/common/buf/readv_reader.go index bcd0f0ed121a..9dbbb6b03a11 100644 --- a/common/buf/readv_reader.go +++ b/common/buf/readv_reader.go @@ -1,6 +1,3 @@ -//go:build !wasm -// +build !wasm - package buf import ( diff --git a/common/buf/readv_reader_wasm.go b/common/buf/readv_reader_wasm.go deleted file mode 100644 index 30b52e74c4b4..000000000000 --- a/common/buf/readv_reader_wasm.go +++ /dev/null @@ -1,15 +0,0 @@ -//go:build wasm -// +build wasm - -package buf - -import ( - "io" - "syscall" -) - -const useReadv = false - -func NewReadVReader(reader io.Reader, rawConn syscall.RawConn) Reader { - panic("not implemented") -} diff --git a/common/buf/readv_test.go b/common/buf/readv_test.go index dbab9c764c9c..e78c232cddf6 100644 --- a/common/buf/readv_test.go +++ b/common/buf/readv_test.go @@ -1,6 +1,3 @@ -//go:build !wasm -// +build !wasm - package buf_test import ( diff --git a/common/buf/readv_unix.go b/common/buf/readv_unix.go deleted file mode 100644 index f5ac6ad1e344..000000000000 --- a/common/buf/readv_unix.go +++ /dev/null @@ -1,37 +0,0 @@ -//go:build illumos -// +build illumos - -package buf - -import "golang.org/x/sys/unix" - -type unixReader struct { - iovs [][]byte -} - -func (r *unixReader) Init(bs []*Buffer) { - iovs := r.iovs - if iovs == nil { - iovs = make([][]byte, 0, len(bs)) - } - for _, b := range bs { - iovs = append(iovs, b.v) - } - r.iovs = iovs -} - -func (r *unixReader) Read(fd uintptr) int32 { - n, e := unix.Readv(int(fd), r.iovs) - if e != nil { - return -1 - } - return int32(n) -} - -func (r *unixReader) Clear() { - r.iovs = r.iovs[:0] -} - -func newMultiReader() multiReader { - return &unixReader{} -} diff --git a/transport/internet/sockopt_freebsd.go b/transport/internet/sockopt_freebsd.go deleted file mode 100644 index 4d490a40b5c1..000000000000 --- a/transport/internet/sockopt_freebsd.go +++ /dev/null @@ -1,265 +0,0 @@ -package internet - -import ( - "encoding/binary" - "net" - "os" - "syscall" - "unsafe" - - "github.com/xtls/xray-core/common/errors" - "golang.org/x/sys/unix" -) - -const ( - sysPFINOUT = 0x0 - sysPFIN = 0x1 - sysPFOUT = 0x2 - sysPFFWD = 0x3 - sysDIOCNATLOOK = 0xc04c4417 -) - -type pfiocNatlook struct { - Saddr [16]byte /* pf_addr */ - Daddr [16]byte /* pf_addr */ - Rsaddr [16]byte /* pf_addr */ - Rdaddr [16]byte /* pf_addr */ - Sport uint16 - Dport uint16 - Rsport uint16 - Rdport uint16 - Af uint8 - Proto uint8 - Direction uint8 - Pad [1]byte -} - -const ( - sizeofPfiocNatlook = 0x4c - soReUsePort = 0x00000200 - soReUsePortLB = 0x00010000 -) - -func ioctl(s uintptr, ioc int, b []byte) error { - if _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, s, uintptr(ioc), uintptr(unsafe.Pointer(&b[0]))); errno != 0 { - return error(errno) - } - return nil -} - -func (nl *pfiocNatlook) rdPort() int { - return int(binary.BigEndian.Uint16((*[2]byte)(unsafe.Pointer(&nl.Rdport))[:])) -} - -func (nl *pfiocNatlook) setPort(remote, local int) { - binary.BigEndian.PutUint16((*[2]byte)(unsafe.Pointer(&nl.Sport))[:], uint16(remote)) - binary.BigEndian.PutUint16((*[2]byte)(unsafe.Pointer(&nl.Dport))[:], uint16(local)) -} - -// OriginalDst uses ioctl to read original destination from /dev/pf -func OriginalDst(la, ra net.Addr) (net.IP, int, error) { - f, err := os.Open("/dev/pf") - if err != nil { - return net.IP{}, -1, errors.New("failed to open device /dev/pf").Base(err) - } - defer f.Close() - fd := f.Fd() - b := make([]byte, sizeofPfiocNatlook) - nl := (*pfiocNatlook)(unsafe.Pointer(&b[0])) - var raIP, laIP net.IP - var raPort, laPort int - switch la.(type) { - case *net.TCPAddr: - raIP = ra.(*net.TCPAddr).IP - laIP = la.(*net.TCPAddr).IP - raPort = ra.(*net.TCPAddr).Port - laPort = la.(*net.TCPAddr).Port - nl.Proto = syscall.IPPROTO_TCP - case *net.UDPAddr: - raIP = ra.(*net.UDPAddr).IP - laIP = la.(*net.UDPAddr).IP - raPort = ra.(*net.UDPAddr).Port - laPort = la.(*net.UDPAddr).Port - nl.Proto = syscall.IPPROTO_UDP - } - if raIP.To4() != nil { - if laIP.IsUnspecified() { - laIP = net.ParseIP("127.0.0.1") - } - copy(nl.Saddr[:net.IPv4len], raIP.To4()) - copy(nl.Daddr[:net.IPv4len], laIP.To4()) - nl.Af = syscall.AF_INET - } - if raIP.To16() != nil && raIP.To4() == nil { - if laIP.IsUnspecified() { - laIP = net.ParseIP("::1") - } - copy(nl.Saddr[:], raIP) - copy(nl.Daddr[:], laIP) - nl.Af = syscall.AF_INET6 - } - nl.setPort(raPort, laPort) - ioc := uintptr(sysDIOCNATLOOK) - for _, dir := range []byte{sysPFOUT, sysPFIN} { - nl.Direction = dir - err = ioctl(fd, int(ioc), b) - if err == nil || err != syscall.ENOENT { - break - } - } - if err != nil { - return net.IP{}, -1, os.NewSyscallError("ioctl", err) - } - - odPort := nl.rdPort() - var odIP net.IP - switch nl.Af { - case syscall.AF_INET: - odIP = make(net.IP, net.IPv4len) - copy(odIP, nl.Rdaddr[:net.IPv4len]) - case syscall.AF_INET6: - odIP = make(net.IP, net.IPv6len) - copy(odIP, nl.Rdaddr[:]) - } - return odIP, odPort, nil -} - -func applyOutboundSocketOptions(network string, address string, fd uintptr, config *SocketConfig) error { - if config.Mark != 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_USER_COOKIE, int(config.Mark)); err != nil { - return errors.New("failed to set SO_USER_COOKIE").Base(err) - } - } - - if isTCPSocket(network) { - tfo := config.ParseTFOValue() - if tfo > 0 { - tfo = 1 - } - if tfo >= 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, unix.TCP_FASTOPEN, tfo); err != nil { - return errors.New("failed to set TCP_FASTOPEN_CONNECT=", tfo).Base(err) - } - } - if config.TcpKeepAliveIdle > 0 || config.TcpKeepAliveInterval > 0 { - if config.TcpKeepAliveIdle > 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPIDLE, int(config.TcpKeepAliveIdle)); err != nil { - return errors.New("failed to set TCP_KEEPIDLE", err) - } - } - if config.TcpKeepAliveInterval > 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, int(config.TcpKeepAliveInterval)); err != nil { - return errors.New("failed to set TCP_KEEPINTVL", err) - } - } - if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 1); err != nil { - return errors.New("failed to set SO_KEEPALIVE", err) - } - } else if config.TcpKeepAliveInterval < 0 || config.TcpKeepAliveIdle < 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 0); err != nil { - return errors.New("failed to unset SO_KEEPALIVE", err) - } - } - } - - if config.Tproxy.IsEnabled() { - ip, _, _ := net.SplitHostPort(address) - if net.ParseIP(ip).To4() != nil { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IP, syscall.IP_BINDANY, 1); err != nil { - return errors.New("failed to set outbound IP_BINDANY").Base(err) - } - } else { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IPV6, syscall.IPV6_BINDANY, 1); err != nil { - return errors.New("failed to set outbound IPV6_BINDANY").Base(err) - } - } - } - return nil -} - -func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig) error { - if config.Mark != 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_USER_COOKIE, int(config.Mark)); err != nil { - return errors.New("failed to set SO_USER_COOKIE").Base(err) - } - } - if isTCPSocket(network) { - tfo := config.ParseTFOValue() - if tfo >= 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, unix.TCP_FASTOPEN, tfo); err != nil { - return errors.New("failed to set TCP_FASTOPEN=", tfo).Base(err) - } - } - if config.TcpKeepAliveIdle > 0 || config.TcpKeepAliveInterval > 0 { - if config.TcpKeepAliveIdle > 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPIDLE, int(config.TcpKeepAliveIdle)); err != nil { - return errors.New("failed to set TCP_KEEPIDLE", err) - } - } - if config.TcpKeepAliveInterval > 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, int(config.TcpKeepAliveInterval)); err != nil { - return errors.New("failed to set TCP_KEEPINTVL", err) - } - } - if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 1); err != nil { - return errors.New("failed to set SO_KEEPALIVE", err) - } - } else if config.TcpKeepAliveInterval < 0 || config.TcpKeepAliveIdle < 0 { - if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 0); err != nil { - return errors.New("failed to unset SO_KEEPALIVE", err) - } - } - } - - if config.Tproxy.IsEnabled() { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IPV6, syscall.IPV6_BINDANY, 1); err != nil { - if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IP, syscall.IP_BINDANY, 1); err != nil { - return errors.New("failed to set inbound IP_BINDANY").Base(err) - } - } - } - - return nil -} - -func bindAddr(fd uintptr, ip []byte, port uint32) error { - setReuseAddr(fd) - setReusePort(fd) - - var sockaddr syscall.Sockaddr - - switch len(ip) { - case net.IPv4len: - a4 := &syscall.SockaddrInet4{ - Port: int(port), - } - copy(a4.Addr[:], ip) - sockaddr = a4 - case net.IPv6len: - a6 := &syscall.SockaddrInet6{ - Port: int(port), - } - copy(a6.Addr[:], ip) - sockaddr = a6 - default: - return errors.New("unexpected length of ip") - } - - return syscall.Bind(int(fd), sockaddr) -} - -func setReuseAddr(fd uintptr) error { - if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_REUSEADDR, 1); err != nil { - return errors.New("failed to set SO_REUSEADDR").Base(err).AtWarning() - } - return nil -} - -func setReusePort(fd uintptr) error { - if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, soReUsePortLB, 1); err != nil { - if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, soReUsePort, 1); err != nil { - return errors.New("failed to set SO_REUSEPORT").Base(err).AtWarning() - } - } - return nil -} diff --git a/transport/internet/sockopt_other.go b/transport/internet/sockopt_other.go index 7e91110e4cc1..6ebd9a72c6b8 100644 --- a/transport/internet/sockopt_other.go +++ b/transport/internet/sockopt_other.go @@ -1,5 +1,5 @@ -//go:build js || netbsd || openbsd || solaris -// +build js netbsd openbsd solaris +//go:build !windows && !darwin && !linux +// +build !windows,!darwin,!linux package internet diff --git a/transport/internet/tcp/sockopt_freebsd.go b/transport/internet/tcp/sockopt_freebsd.go deleted file mode 100644 index d7ab3ff0129e..000000000000 --- a/transport/internet/tcp/sockopt_freebsd.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build freebsd -// +build freebsd - -package tcp - -import ( - "github.com/xtls/xray-core/common/errors" - "github.com/xtls/xray-core/common/net" - "github.com/xtls/xray-core/transport/internet" - "github.com/xtls/xray-core/transport/internet/stat" -) - -// GetOriginalDestination from tcp conn -func GetOriginalDestination(conn stat.Connection) (net.Destination, error) { - la := conn.LocalAddr() - ra := conn.RemoteAddr() - ip, port, err := internet.OriginalDst(la, ra) - if err != nil { - return net.Destination{}, errors.New("failed to get destination").Base(err) - } - dest := net.TCPDestination(net.IPAddress(ip), net.Port(port)) - if !dest.IsValid() { - return net.Destination{}, errors.New("failed to parse destination.") - } - return dest, nil -} diff --git a/transport/internet/tcp/sockopt_other.go b/transport/internet/tcp/sockopt_other.go index 3f657354a946..a177517bf96c 100644 --- a/transport/internet/tcp/sockopt_other.go +++ b/transport/internet/tcp/sockopt_other.go @@ -1,5 +1,5 @@ -//go:build !linux && !freebsd && !darwin -// +build !linux,!freebsd,!darwin +//go:build !linux && !darwin +// +build !linux,!darwin package tcp diff --git a/transport/internet/udp/hub_freebsd.go b/transport/internet/udp/hub_freebsd.go deleted file mode 100644 index 6bf9fd872691..000000000000 --- a/transport/internet/udp/hub_freebsd.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build freebsd -// +build freebsd - -package udp - -import ( - "bytes" - "encoding/gob" - "io" - - "github.com/xtls/xray-core/common/errors" - "github.com/xtls/xray-core/common/net" - "github.com/xtls/xray-core/transport/internet" -) - -// RetrieveOriginalDest from stored laddr, caddr -func RetrieveOriginalDest(oob []byte) net.Destination { - dec := gob.NewDecoder(bytes.NewBuffer(oob)) - var la, ra net.UDPAddr - dec.Decode(&la) - dec.Decode(&ra) - ip, port, err := internet.OriginalDst(&la, &ra) - if err != nil { - return net.Destination{} - } - return net.UDPDestination(net.IPAddress(ip), net.Port(port)) -} - -// ReadUDPMsg stores laddr, caddr for later use -func ReadUDPMsg(conn *net.UDPConn, payload []byte, oob []byte) (int, int, int, *net.UDPAddr, error) { - nBytes, addr, err := conn.ReadFromUDP(payload) - var buf bytes.Buffer - enc := gob.NewEncoder(&buf) - udpAddr, ok := conn.LocalAddr().(*net.UDPAddr) - if !ok { - return 0, 0, 0, nil, errors.New("invalid local address") - } - if addr == nil { - return 0, 0, 0, nil, errors.New("invalid remote address") - } - enc.Encode(udpAddr) - enc.Encode(addr) - var reader io.Reader = &buf - noob, _ := reader.Read(oob) - return nBytes, noob, 0, addr, err -} diff --git a/transport/internet/udp/hub_other.go b/transport/internet/udp/hub_other.go index 3a7841832bce..14006052332d 100644 --- a/transport/internet/udp/hub_other.go +++ b/transport/internet/udp/hub_other.go @@ -1,5 +1,5 @@ -//go:build !linux && !freebsd && !darwin -// +build !linux,!freebsd,!darwin +//go:build !linux && !darwin +// +build !linux,!darwin package udp From 0d2babe042e415f1e70ba231b5240f1a60fd0e72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Wed, 18 Mar 2026 22:56:41 +0800 Subject: [PATCH 02/23] Leftovers cleanup --- app/dns/dns.go | 2 +- transport/internet/sockopt_other.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/dns/dns.go b/app/dns/dns.go index c108208362ea..6780da79445c 100644 --- a/app/dns/dns.go +++ b/app/dns/dns.go @@ -594,7 +594,7 @@ func detectGUIPlatform() bool { switch runtime.GOOS { case "android", "ios", "windows", "darwin": return true - case "linux", "freebsd", "openbsd": + case "linux": if t := os.Getenv("XDG_SESSION_TYPE"); t == "wayland" || t == "x11" { return true } diff --git a/transport/internet/sockopt_other.go b/transport/internet/sockopt_other.go index 6ebd9a72c6b8..c66e1e1d8c6c 100644 --- a/transport/internet/sockopt_other.go +++ b/transport/internet/sockopt_other.go @@ -1,5 +1,5 @@ -//go:build !windows && !darwin && !linux -// +build !windows,!darwin,!linux +//go:build !windows && !darwin && !linux && !android +// +build !windows,!darwin,!linux,!android package internet From b4471642a1b2408d2de7e476aa5d56dad72c36ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Fri, 20 Mar 2026 01:23:44 +0800 Subject: [PATCH 03/23] Change BSD(f,o) to source-only; Remove Linux on IBM Z --- .github/workflows/release.yml | 16 +- app/dns/dns.go | 2 +- transport/internet/sockopt_freebsd.go | 265 ++++++++++++++++++++++ transport/internet/sockopt_other.go | 4 +- transport/internet/tcp/sockopt_freebsd.go | 26 +++ transport/internet/tcp/sockopt_other.go | 4 +- transport/internet/udp/hub_freebsd.go | 46 ++++ transport/internet/udp/hub_other.go | 4 +- 8 files changed, 356 insertions(+), 11 deletions(-) create mode 100644 transport/internet/sockopt_freebsd.go create mode 100644 transport/internet/tcp/sockopt_freebsd.go create mode 100644 transport/internet/udp/hub_freebsd.go diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8bd5687264f2..9af1ec949c51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,6 +82,8 @@ jobs: goos: [windows, linux, darwin, android] goarch: [amd64, 386, arm64] patch-assetname: [""] + # Building for FreeBSD and OpenBSD has been suspended unless + # there are active contributors that uses FreeBSD or OpenBSD actively. exclude: # Exclude i386 on darwin - goarch: 386 @@ -124,10 +126,6 @@ jobs: - goos: linux goarch: ppc64le # END PPC - # BEGIN S390X - - goos: linux - goarch: s390x - # END S390X # END Other architectures fail-fast: false @@ -172,6 +170,16 @@ jobs: - name: Build Xray run: | + # Special processing for ARM64 + if [[ ${GOARCH} == 'arm64' ]]; then + if [[ ${GOOS} == 'windows' ]]; then + GOARM64="v8.1" + fi + if [[ ${GOOS} == 'darwin' ]]; then + GOARM64="v8.4" + fi + fi + # Building mkdir -p build_assets COMMID=$(git describe --always --dirty) if [[ ${GOOS} == 'windows' ]]; then diff --git a/app/dns/dns.go b/app/dns/dns.go index 6780da79445c..c108208362ea 100644 --- a/app/dns/dns.go +++ b/app/dns/dns.go @@ -594,7 +594,7 @@ func detectGUIPlatform() bool { switch runtime.GOOS { case "android", "ios", "windows", "darwin": return true - case "linux": + case "linux", "freebsd", "openbsd": if t := os.Getenv("XDG_SESSION_TYPE"); t == "wayland" || t == "x11" { return true } diff --git a/transport/internet/sockopt_freebsd.go b/transport/internet/sockopt_freebsd.go new file mode 100644 index 000000000000..4d490a40b5c1 --- /dev/null +++ b/transport/internet/sockopt_freebsd.go @@ -0,0 +1,265 @@ +package internet + +import ( + "encoding/binary" + "net" + "os" + "syscall" + "unsafe" + + "github.com/xtls/xray-core/common/errors" + "golang.org/x/sys/unix" +) + +const ( + sysPFINOUT = 0x0 + sysPFIN = 0x1 + sysPFOUT = 0x2 + sysPFFWD = 0x3 + sysDIOCNATLOOK = 0xc04c4417 +) + +type pfiocNatlook struct { + Saddr [16]byte /* pf_addr */ + Daddr [16]byte /* pf_addr */ + Rsaddr [16]byte /* pf_addr */ + Rdaddr [16]byte /* pf_addr */ + Sport uint16 + Dport uint16 + Rsport uint16 + Rdport uint16 + Af uint8 + Proto uint8 + Direction uint8 + Pad [1]byte +} + +const ( + sizeofPfiocNatlook = 0x4c + soReUsePort = 0x00000200 + soReUsePortLB = 0x00010000 +) + +func ioctl(s uintptr, ioc int, b []byte) error { + if _, _, errno := syscall.Syscall(syscall.SYS_IOCTL, s, uintptr(ioc), uintptr(unsafe.Pointer(&b[0]))); errno != 0 { + return error(errno) + } + return nil +} + +func (nl *pfiocNatlook) rdPort() int { + return int(binary.BigEndian.Uint16((*[2]byte)(unsafe.Pointer(&nl.Rdport))[:])) +} + +func (nl *pfiocNatlook) setPort(remote, local int) { + binary.BigEndian.PutUint16((*[2]byte)(unsafe.Pointer(&nl.Sport))[:], uint16(remote)) + binary.BigEndian.PutUint16((*[2]byte)(unsafe.Pointer(&nl.Dport))[:], uint16(local)) +} + +// OriginalDst uses ioctl to read original destination from /dev/pf +func OriginalDst(la, ra net.Addr) (net.IP, int, error) { + f, err := os.Open("/dev/pf") + if err != nil { + return net.IP{}, -1, errors.New("failed to open device /dev/pf").Base(err) + } + defer f.Close() + fd := f.Fd() + b := make([]byte, sizeofPfiocNatlook) + nl := (*pfiocNatlook)(unsafe.Pointer(&b[0])) + var raIP, laIP net.IP + var raPort, laPort int + switch la.(type) { + case *net.TCPAddr: + raIP = ra.(*net.TCPAddr).IP + laIP = la.(*net.TCPAddr).IP + raPort = ra.(*net.TCPAddr).Port + laPort = la.(*net.TCPAddr).Port + nl.Proto = syscall.IPPROTO_TCP + case *net.UDPAddr: + raIP = ra.(*net.UDPAddr).IP + laIP = la.(*net.UDPAddr).IP + raPort = ra.(*net.UDPAddr).Port + laPort = la.(*net.UDPAddr).Port + nl.Proto = syscall.IPPROTO_UDP + } + if raIP.To4() != nil { + if laIP.IsUnspecified() { + laIP = net.ParseIP("127.0.0.1") + } + copy(nl.Saddr[:net.IPv4len], raIP.To4()) + copy(nl.Daddr[:net.IPv4len], laIP.To4()) + nl.Af = syscall.AF_INET + } + if raIP.To16() != nil && raIP.To4() == nil { + if laIP.IsUnspecified() { + laIP = net.ParseIP("::1") + } + copy(nl.Saddr[:], raIP) + copy(nl.Daddr[:], laIP) + nl.Af = syscall.AF_INET6 + } + nl.setPort(raPort, laPort) + ioc := uintptr(sysDIOCNATLOOK) + for _, dir := range []byte{sysPFOUT, sysPFIN} { + nl.Direction = dir + err = ioctl(fd, int(ioc), b) + if err == nil || err != syscall.ENOENT { + break + } + } + if err != nil { + return net.IP{}, -1, os.NewSyscallError("ioctl", err) + } + + odPort := nl.rdPort() + var odIP net.IP + switch nl.Af { + case syscall.AF_INET: + odIP = make(net.IP, net.IPv4len) + copy(odIP, nl.Rdaddr[:net.IPv4len]) + case syscall.AF_INET6: + odIP = make(net.IP, net.IPv6len) + copy(odIP, nl.Rdaddr[:]) + } + return odIP, odPort, nil +} + +func applyOutboundSocketOptions(network string, address string, fd uintptr, config *SocketConfig) error { + if config.Mark != 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_USER_COOKIE, int(config.Mark)); err != nil { + return errors.New("failed to set SO_USER_COOKIE").Base(err) + } + } + + if isTCPSocket(network) { + tfo := config.ParseTFOValue() + if tfo > 0 { + tfo = 1 + } + if tfo >= 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, unix.TCP_FASTOPEN, tfo); err != nil { + return errors.New("failed to set TCP_FASTOPEN_CONNECT=", tfo).Base(err) + } + } + if config.TcpKeepAliveIdle > 0 || config.TcpKeepAliveInterval > 0 { + if config.TcpKeepAliveIdle > 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPIDLE, int(config.TcpKeepAliveIdle)); err != nil { + return errors.New("failed to set TCP_KEEPIDLE", err) + } + } + if config.TcpKeepAliveInterval > 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, int(config.TcpKeepAliveInterval)); err != nil { + return errors.New("failed to set TCP_KEEPINTVL", err) + } + } + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 1); err != nil { + return errors.New("failed to set SO_KEEPALIVE", err) + } + } else if config.TcpKeepAliveInterval < 0 || config.TcpKeepAliveIdle < 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 0); err != nil { + return errors.New("failed to unset SO_KEEPALIVE", err) + } + } + } + + if config.Tproxy.IsEnabled() { + ip, _, _ := net.SplitHostPort(address) + if net.ParseIP(ip).To4() != nil { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IP, syscall.IP_BINDANY, 1); err != nil { + return errors.New("failed to set outbound IP_BINDANY").Base(err) + } + } else { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IPV6, syscall.IPV6_BINDANY, 1); err != nil { + return errors.New("failed to set outbound IPV6_BINDANY").Base(err) + } + } + } + return nil +} + +func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig) error { + if config.Mark != 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_USER_COOKIE, int(config.Mark)); err != nil { + return errors.New("failed to set SO_USER_COOKIE").Base(err) + } + } + if isTCPSocket(network) { + tfo := config.ParseTFOValue() + if tfo >= 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, unix.TCP_FASTOPEN, tfo); err != nil { + return errors.New("failed to set TCP_FASTOPEN=", tfo).Base(err) + } + } + if config.TcpKeepAliveIdle > 0 || config.TcpKeepAliveInterval > 0 { + if config.TcpKeepAliveIdle > 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPIDLE, int(config.TcpKeepAliveIdle)); err != nil { + return errors.New("failed to set TCP_KEEPIDLE", err) + } + } + if config.TcpKeepAliveInterval > 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, int(config.TcpKeepAliveInterval)); err != nil { + return errors.New("failed to set TCP_KEEPINTVL", err) + } + } + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 1); err != nil { + return errors.New("failed to set SO_KEEPALIVE", err) + } + } else if config.TcpKeepAliveInterval < 0 || config.TcpKeepAliveIdle < 0 { + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 0); err != nil { + return errors.New("failed to unset SO_KEEPALIVE", err) + } + } + } + + if config.Tproxy.IsEnabled() { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IPV6, syscall.IPV6_BINDANY, 1); err != nil { + if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_IP, syscall.IP_BINDANY, 1); err != nil { + return errors.New("failed to set inbound IP_BINDANY").Base(err) + } + } + } + + return nil +} + +func bindAddr(fd uintptr, ip []byte, port uint32) error { + setReuseAddr(fd) + setReusePort(fd) + + var sockaddr syscall.Sockaddr + + switch len(ip) { + case net.IPv4len: + a4 := &syscall.SockaddrInet4{ + Port: int(port), + } + copy(a4.Addr[:], ip) + sockaddr = a4 + case net.IPv6len: + a6 := &syscall.SockaddrInet6{ + Port: int(port), + } + copy(a6.Addr[:], ip) + sockaddr = a6 + default: + return errors.New("unexpected length of ip") + } + + return syscall.Bind(int(fd), sockaddr) +} + +func setReuseAddr(fd uintptr) error { + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_REUSEADDR, 1); err != nil { + return errors.New("failed to set SO_REUSEADDR").Base(err).AtWarning() + } + return nil +} + +func setReusePort(fd uintptr) error { + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, soReUsePortLB, 1); err != nil { + if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, soReUsePort, 1); err != nil { + return errors.New("failed to set SO_REUSEPORT").Base(err).AtWarning() + } + } + return nil +} diff --git a/transport/internet/sockopt_other.go b/transport/internet/sockopt_other.go index c66e1e1d8c6c..86ed1ee21ab1 100644 --- a/transport/internet/sockopt_other.go +++ b/transport/internet/sockopt_other.go @@ -1,5 +1,5 @@ -//go:build !windows && !darwin && !linux && !android -// +build !windows,!darwin,!linux,!android +//go:build !windows && !darwin && !linux && !android && !freebsd +// +build !windows,!darwin,!linux,!android,!freebsd package internet diff --git a/transport/internet/tcp/sockopt_freebsd.go b/transport/internet/tcp/sockopt_freebsd.go new file mode 100644 index 000000000000..d7ab3ff0129e --- /dev/null +++ b/transport/internet/tcp/sockopt_freebsd.go @@ -0,0 +1,26 @@ +//go:build freebsd +// +build freebsd + +package tcp + +import ( + "github.com/xtls/xray-core/common/errors" + "github.com/xtls/xray-core/common/net" + "github.com/xtls/xray-core/transport/internet" + "github.com/xtls/xray-core/transport/internet/stat" +) + +// GetOriginalDestination from tcp conn +func GetOriginalDestination(conn stat.Connection) (net.Destination, error) { + la := conn.LocalAddr() + ra := conn.RemoteAddr() + ip, port, err := internet.OriginalDst(la, ra) + if err != nil { + return net.Destination{}, errors.New("failed to get destination").Base(err) + } + dest := net.TCPDestination(net.IPAddress(ip), net.Port(port)) + if !dest.IsValid() { + return net.Destination{}, errors.New("failed to parse destination.") + } + return dest, nil +} diff --git a/transport/internet/tcp/sockopt_other.go b/transport/internet/tcp/sockopt_other.go index a177517bf96c..3f657354a946 100644 --- a/transport/internet/tcp/sockopt_other.go +++ b/transport/internet/tcp/sockopt_other.go @@ -1,5 +1,5 @@ -//go:build !linux && !darwin -// +build !linux,!darwin +//go:build !linux && !freebsd && !darwin +// +build !linux,!freebsd,!darwin package tcp diff --git a/transport/internet/udp/hub_freebsd.go b/transport/internet/udp/hub_freebsd.go new file mode 100644 index 000000000000..6bf9fd872691 --- /dev/null +++ b/transport/internet/udp/hub_freebsd.go @@ -0,0 +1,46 @@ +//go:build freebsd +// +build freebsd + +package udp + +import ( + "bytes" + "encoding/gob" + "io" + + "github.com/xtls/xray-core/common/errors" + "github.com/xtls/xray-core/common/net" + "github.com/xtls/xray-core/transport/internet" +) + +// RetrieveOriginalDest from stored laddr, caddr +func RetrieveOriginalDest(oob []byte) net.Destination { + dec := gob.NewDecoder(bytes.NewBuffer(oob)) + var la, ra net.UDPAddr + dec.Decode(&la) + dec.Decode(&ra) + ip, port, err := internet.OriginalDst(&la, &ra) + if err != nil { + return net.Destination{} + } + return net.UDPDestination(net.IPAddress(ip), net.Port(port)) +} + +// ReadUDPMsg stores laddr, caddr for later use +func ReadUDPMsg(conn *net.UDPConn, payload []byte, oob []byte) (int, int, int, *net.UDPAddr, error) { + nBytes, addr, err := conn.ReadFromUDP(payload) + var buf bytes.Buffer + enc := gob.NewEncoder(&buf) + udpAddr, ok := conn.LocalAddr().(*net.UDPAddr) + if !ok { + return 0, 0, 0, nil, errors.New("invalid local address") + } + if addr == nil { + return 0, 0, 0, nil, errors.New("invalid remote address") + } + enc.Encode(udpAddr) + enc.Encode(addr) + var reader io.Reader = &buf + noob, _ := reader.Read(oob) + return nBytes, noob, 0, addr, err +} diff --git a/transport/internet/udp/hub_other.go b/transport/internet/udp/hub_other.go index 14006052332d..3a7841832bce 100644 --- a/transport/internet/udp/hub_other.go +++ b/transport/internet/udp/hub_other.go @@ -1,5 +1,5 @@ -//go:build !linux && !darwin -// +build !linux,!darwin +//go:build !linux && !freebsd && !darwin +// +build !linux,!freebsd,!darwin package udp From 831a5773696202139c66268a4090f51bdbbe4d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Fri, 20 Mar 2026 01:32:03 +0800 Subject: [PATCH 04/23] Cleanups --- .github/build/friendly-filenames.json | 9 ++++++++- .github/workflows/release.yml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/build/friendly-filenames.json b/.github/build/friendly-filenames.json index e01ee48b1bdd..d9ff4fc4a065 100644 --- a/.github/build/friendly-filenames.json +++ b/.github/build/friendly-filenames.json @@ -3,6 +3,10 @@ "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" }, @@ -19,7 +23,10 @@ "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" } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9af1ec949c51..11e03016e4b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -109,7 +109,7 @@ jobs: goarch: riscv64 - goos: linux goarch: loong64 - # END riscv64 & ARM64 & LOONG64 + # END riscv64 & LOONG64 # BEGIN MIPS - goos: linux goarch: mips64 From 66324d5613299b5919b9e3d708bb7408be04cc55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Fri, 20 Mar 2026 14:33:59 +0800 Subject: [PATCH 05/23] Update notes for reproducible --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 72fe602946a4..e8aa65d2c4ea 100644 --- a/README.md +++ b/README.md @@ -198,6 +198,18 @@ 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 ARM64 target, add this environment variable before compiling: + +``` +GOARM64=v8.1 +``` + +If you are compiling a macOS ARM64 target, add this environment variable before compiling: + +``` +GOARM64=v8.4 +``` + If you are compiling a 32-bit MIPS/MIPSLE target, use this command instead: ```bash From c072649b1f987af10f7209e91fa30c08c6f7ea37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Sat, 21 Mar 2026 17:06:21 +0800 Subject: [PATCH 06/23] Additional notes for architecture deprecation --- .github/workflows/release.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 11e03016e4b1..7f16528f48e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,37 +84,47 @@ jobs: patch-assetname: [""] # Building for FreeBSD and OpenBSD has been suspended unless # there are active contributors that uses FreeBSD or OpenBSD actively. + # PRs for FreeBSD and OpenBSD compatibility are welcome. + # Building for BSDs will be add back when there is active maintenance. exclude: - # Exclude i386 on darwin + # Exclude x86 32-bit on macOS - goarch: 386 goos: darwin - # Exclude i386 on Android + # Exclude x86 32-bit on Android - goarch: 386 goos: android + # Removing x86 32-bit on Windows (not win7) might be in v27 or v28 or depending on upstream? + # Removing x86 32-bit on Linux might depending on upstream. include: # BEGIN Linux ARM 5 6 7 + # ARMv7 is a long tail - goos: linux goarch: arm goarm: 7 + # ARMv6 might be removed in v28 or in the middle of v27 - goos: linux goarch: arm goarm: 6 + # ARMv5 might be removed in v27 or in the middle of v26 - goos: linux goarch: arm goarm: 5 # END Linux ARM 5 6 7 # BEGIN Other architectures - # BEGIN riscv64 & LOONG64 + # BEGIN RISCV & LoongArch - goos: linux goarch: riscv64 - goos: linux goarch: loong64 - # END riscv64 & LOONG64 + # END RISCV & LoongArch # BEGIN MIPS + # MIPS64 BE/LE might be removed in v27 - goos: linux goarch: mips64 - goos: linux goarch: mips64le + # MIPS32 BE/LE might be removed in v28 or v29 or evaluate annualy. + # This is a long tail architecture due to router productions. - goos: linux goarch: mipsle - goos: linux From 79f2f2ea40851ff8eda1dc0d05abdb310178c9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Sat, 21 Mar 2026 19:05:46 +0800 Subject: [PATCH 07/23] Add back s390x and set Windows ARM64 to v8.0 --- .github/workflows/release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f16528f48e6..4abfb362d544 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,6 +136,10 @@ jobs: - goos: linux goarch: ppc64le # END PPC + # BEGIN S390X + - goos: linux + goarch: s390x + # END S390X # END Other architectures fail-fast: false @@ -182,9 +186,6 @@ jobs: run: | # Special processing for ARM64 if [[ ${GOARCH} == 'arm64' ]]; then - if [[ ${GOOS} == 'windows' ]]; then - GOARM64="v8.1" - fi if [[ ${GOOS} == 'darwin' ]]; then GOARM64="v8.4" fi From 33302852dabf5a5ed7c4efa2fc1e4379bf3bd616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Sat, 21 Mar 2026 19:11:50 +0800 Subject: [PATCH 08/23] Note change --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index e8aa65d2c4ea..b6cfd9a51c86 100644 --- a/README.md +++ b/README.md @@ -198,12 +198,6 @@ 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 ARM64 target, add this environment variable before compiling: - -``` -GOARM64=v8.1 -``` - If you are compiling a macOS ARM64 target, add this environment variable before compiling: ``` From 93b84f161b2085b4e18ba9306bb0a4ea52f402ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Sun, 22 Mar 2026 01:13:56 +0800 Subject: [PATCH 09/23] Fix missing friendly name --- .github/build/friendly-filenames.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/build/friendly-filenames.json b/.github/build/friendly-filenames.json index d9ff4fc4a065..15c4ab58b4fd 100644 --- a/.github/build/friendly-filenames.json +++ b/.github/build/friendly-filenames.json @@ -23,6 +23,7 @@ "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" }, From 9df6a74bacaf72b3c9cf1ceb7db60f10aee9a569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Mon, 23 Mar 2026 14:34:03 +0800 Subject: [PATCH 10/23] Optimize build list & Add back building for temporarily dropped builds --- .github/workflows/extended-nightly.yml | 100 +++++++++++++++++++++++++ .github/workflows/release.yml | 69 ++++++++--------- 2 files changed, 133 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/extended-nightly.yml diff --git a/.github/workflows/extended-nightly.yml b/.github/workflows/extended-nightly.yml new file mode 100644 index 000000000000..cf2e78884096 --- /dev/null +++ b/.github/workflows/extended-nightly.yml @@ -0,0 +1,100 @@ +name: Extended or Back-seated Nightly Build +# Secondary builds are built here. +# Failing maybe not a blocking. This depends on judgements. + +on: + workflow_dispatch: + push: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build: + permissions: + contents: write + strategy: + matrix: + include: + - goos: freebsd + goarch: amd64 + assetname: ["freebsd-64"] + - goos: freebsd + goarch: arm64 + assetname: ["freebsd-arm64-v8a"] + - goos: freebsd + goarch: 386 + assetname: ["freebsd-32"] + - goos: freebsd + goarch: arm + goarm: 7 + assetname: ["freebsd-arm32-v7a"] + - goos: openbsd + goarch: amd64 + assetname: ["openbsd-64"] + - goos: openbsd + goarch: arm64 + assetname: ["openbsd-arm64-v8a"] + - goos: openbsd + goarch: 386 + assetname: ["openbsd-32"] + - goos: openbsd + goarch: arm + goarm: 7 + assetname: ["openbsd-arm32-v7a"] + fail-fast: false + + runs-on: ubuntu-latest + env: + GOOS: ${{ matrix.goos }} + GOARCH: ${{ matrix.goarch }} + GOARM: ${{ matrix.goarm }} + 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: | + # 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 -gcflags="all=-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main + else + echo 'Building Xray...' + if [[ ${GOARCH} == 'mips' || ${GOARCH} == 'mipsle' ]]; then + go build -o build_assets/xray -trimpath -buildvcs=false -gcflags="-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main + echo 'Building soft-float Xray for MIPS/MIPSLE 32-bit...' + GOMIPS=softfloat go build -o build_assets/xray_softfloat -trimpath -buildvcs=false -gcflags="-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main + else + go build -o build_assets/xray -trimpath -buildvcs=false -gcflags="all=-l=4" -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/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4abfb362d544..d2f98a12b21e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,45 +78,39 @@ jobs: contents: write strategy: matrix: - # Include amd64 on all platforms. + # Include x86-64 and ARM64 on all platforms. goos: [windows, linux, darwin, android] - goarch: [amd64, 386, arm64] + goarch: [amd64, arm64] patch-assetname: [""] # Building for FreeBSD and OpenBSD has been suspended unless # there are active contributors that uses FreeBSD or OpenBSD actively. # PRs for FreeBSD and OpenBSD compatibility are welcome. # Building for BSDs will be add back when there is active maintenance. - exclude: - # Exclude x86 32-bit on macOS - - goarch: 386 - goos: darwin - # Exclude x86 32-bit on Android - - goarch: 386 - goos: android - # Removing x86 32-bit on Windows (not win7) might be in v27 or v28 or depending on upstream? - # Removing x86 32-bit on Linux might depending on upstream. include: - # BEGIN Linux ARM 5 6 7 - # ARMv7 is a long tail - - goos: linux - goarch: arm - goarm: 7 - # ARMv6 might be removed in v28 or in the middle of v27 - - goos: linux - goarch: arm - goarm: 6 - # ARMv5 might be removed in v27 or in the middle of v26 - - goos: linux - goarch: arm - goarm: 5 - # END Linux ARM 5 6 7 - # BEGIN Other architectures # BEGIN RISCV & LoongArch - goos: linux goarch: riscv64 - goos: linux goarch: loong64 # END RISCV & LoongArch + # BEGIN PPC + - goos: linux + goarch: ppc64 + - goos: linux + goarch: ppc64le + # END PPC + # BEGIN S390X + - goos: linux + goarch: s390x + # END S390X + # BEGIN x86 + # Removing x86 32-bit on Linux might depending on upstream. + - goos: linux + goarch: 386 + # Removing x86 32-bit on Windows (not win7) might be in v27 or v28 or depending on upstream? + - goos: windows + goarch: 386 + # END x86 # BEGIN MIPS # MIPS64 BE/LE might be removed in v27 - goos: linux @@ -130,17 +124,20 @@ jobs: - goos: linux goarch: mips # END MIPS - # BEGIN PPC + # BEGIN Linux ARM + # ARMv7 is a long tail - goos: linux - goarch: ppc64 + goarch: arm + goarm: 7 + # ARMv6 might be removed in v28 or in the middle of v27 - goos: linux - goarch: ppc64le - # END PPC - # BEGIN S390X + goarch: arm + goarm: 6 + # ARMv5 might be removed in v27 or in the middle of v26 - goos: linux - goarch: s390x - # END S390X - # END Other architectures + goarch: arm + goarm: 5 + # END Linux ARM 5 6 7 fail-fast: false runs-on: ubuntu-latest @@ -169,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 From cfbf033379bfae392d9ceee405245291c7f3b15d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Mon, 23 Mar 2026 14:38:53 +0800 Subject: [PATCH 11/23] Fix wrong type --- .github/workflows/extended-nightly.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/extended-nightly.yml b/.github/workflows/extended-nightly.yml index cf2e78884096..f6d1ee7f6b57 100644 --- a/.github/workflows/extended-nightly.yml +++ b/.github/workflows/extended-nightly.yml @@ -17,30 +17,30 @@ jobs: include: - goos: freebsd goarch: amd64 - assetname: ["freebsd-64"] + assetname: freebsd-64 - goos: freebsd goarch: arm64 - assetname: ["freebsd-arm64-v8a"] + assetname: freebsd-arm64-v8a - goos: freebsd goarch: 386 - assetname: ["freebsd-32"] + assetname: freebsd-32 - goos: freebsd goarch: arm goarm: 7 - assetname: ["freebsd-arm32-v7a"] + assetname: freebsd-arm32-v7a - goos: openbsd goarch: amd64 - assetname: ["openbsd-64"] + assetname: openbsd-64 - goos: openbsd goarch: arm64 - assetname: ["openbsd-arm64-v8a"] + assetname: openbsd-arm64-v8a - goos: openbsd goarch: 386 - assetname: ["openbsd-32"] + assetname: openbsd-32 - goos: openbsd goarch: arm goarm: 7 - assetname: ["openbsd-arm32-v7a"] + assetname: openbsd-arm32-v7a fail-fast: false runs-on: ubuntu-latest From dca454929f37b8352758f6e7339faebc744069a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Mon, 23 Mar 2026 19:00:02 +0800 Subject: [PATCH 12/23] sxs --- common/buf/readv_reader_stub.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/buf/readv_reader_stub.go b/common/buf/readv_reader_stub.go index b2be9825f17e..b86f5dc0cbad 100644 --- a/common/buf/readv_reader_stub.go +++ b/common/buf/readv_reader_stub.go @@ -1,5 +1,5 @@ -//go:build wasm || openbsd -// +build wasm openbsd +//go:build openbsd +// +build openbsd package buf From 2c01f28d141118d909662aa2fbb18789a477a27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Tue, 24 Mar 2026 01:58:53 +0800 Subject: [PATCH 13/23] Adjust supporting notes. --- .github/workflows/release-win7.yml | 3 +++ .github/workflows/release.yml | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-win7.yml b/.github/workflows/release-win7.yml index 9d777bc05dea..391fe38a518b 100644 --- a/.github/workflows/release-win7.yml +++ b/.github/workflows/release-win7.yml @@ -1,4 +1,7 @@ name: Build and Release for Windows 7 +# The furthest build might happen in August 2028 before a newer monor version of Go 1 releases. +# The furthest build must before Go 2 releases. +# Multiple factors may affect this procedure. on: workflow_dispatch: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2f98a12b21e..199d58bb3e8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,7 +107,7 @@ jobs: # Removing x86 32-bit on Linux might depending on upstream. - goos: linux goarch: 386 - # Removing x86 32-bit on Windows (not win7) might be in v27 or v28 or depending on upstream? + # Back-seating x86 32-bit on Windows (not win7) might be in v27. - goos: windows goarch: 386 # END x86 @@ -117,7 +117,7 @@ jobs: goarch: mips64 - goos: linux goarch: mips64le - # MIPS32 BE/LE might be removed in v28 or v29 or evaluate annualy. + # MIPS32 BE/LE might be back-seated in v28. # This is a long tail architecture due to router productions. - goos: linux goarch: mipsle @@ -129,11 +129,11 @@ jobs: - goos: linux goarch: arm goarm: 7 - # ARMv6 might be removed in v28 or in the middle of v27 + # ARMv6 might be back-seated in v28 - goos: linux goarch: arm goarm: 6 - # ARMv5 might be removed in v27 or in the middle of v26 + # ARMv5 might be removed in v27 - goos: linux goarch: arm goarm: 5 From 005bf180c09ba48d8351793102a76586be972417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:24:03 +0800 Subject: [PATCH 14/23] Drop legacy/obselete architectures in v27 --- .github/workflows/extended-nightly.yml | 6 +++--- .github/workflows/release.yml | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/extended-nightly.yml b/.github/workflows/extended-nightly.yml index f6d1ee7f6b57..f36fb3058b32 100644 --- a/.github/workflows/extended-nightly.yml +++ b/.github/workflows/extended-nightly.yml @@ -26,7 +26,6 @@ jobs: assetname: freebsd-32 - goos: freebsd goarch: arm - goarm: 7 assetname: freebsd-arm32-v7a - goos: openbsd goarch: amd64 @@ -39,7 +38,6 @@ jobs: assetname: openbsd-32 - goos: openbsd goarch: arm - goarm: 7 assetname: openbsd-arm32-v7a fail-fast: false @@ -47,7 +45,6 @@ jobs: env: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} - GOARM: ${{ matrix.goarm }} CGO_ENABLED: 0 steps: - name: Checkout codebase @@ -70,6 +67,9 @@ jobs: - name: Build Xray run: | + if [[ ${GOARCH} == 'arm' ]]; then + GOARM="7" + fi # Building mkdir -p build_assets COMMID=$(git describe --always --dirty) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 199d58bb3e8b..07f4a83a0b47 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,20 +104,20 @@ jobs: goarch: s390x # END S390X # BEGIN x86 - # Removing x86 32-bit on Linux might depending on upstream. + # Removing x86 32-bit on Linux will depending on upstream. - goos: linux goarch: 386 - # Back-seating x86 32-bit on Windows (not win7) might be in v27. + # Back-seating x86 32-bit on Windows (not win7) will be in v27. - goos: windows goarch: 386 # END x86 # BEGIN MIPS - # MIPS64 BE/LE might be removed in v27 + # MIPS64 BE/LE will be removed in v27 - goos: linux goarch: mips64 - goos: linux goarch: mips64le - # MIPS32 BE/LE might be back-seated in v28. + # MIPS32 BE/LE will be back-seated in v27. # This is a long tail architecture due to router productions. - goos: linux goarch: mipsle @@ -129,15 +129,15 @@ jobs: - goos: linux goarch: arm goarm: 7 - # ARMv6 might be back-seated in v28 + # ARMv6 will be removed in v27 - goos: linux goarch: arm goarm: 6 - # ARMv5 might be removed in v27 + # ARMv5 will be removed in v27 - goos: linux goarch: arm goarm: 5 - # END Linux ARM 5 6 7 + # END Linux ARM fail-fast: false runs-on: ubuntu-latest From d7630192f2d32b39d84f49d1066b8f95122ced02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Wed, 25 Mar 2026 15:24:55 +0800 Subject: [PATCH 15/23] Drop x86 for back-seating; simplify building parameters --- .github/workflows/extended-nightly.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/extended-nightly.yml b/.github/workflows/extended-nightly.yml index f36fb3058b32..9fa12431d6ed 100644 --- a/.github/workflows/extended-nightly.yml +++ b/.github/workflows/extended-nightly.yml @@ -1,6 +1,6 @@ name: Extended or Back-seated Nightly Build # Secondary builds are built here. -# Failing maybe not a blocking. This depends on judgements. +# Failing maybe not meaning a blocking. This is a judgement call. on: workflow_dispatch: @@ -21,9 +21,6 @@ jobs: - goos: freebsd goarch: arm64 assetname: freebsd-arm64-v8a - - goos: freebsd - goarch: 386 - assetname: freebsd-32 - goos: freebsd goarch: arm assetname: freebsd-arm32-v7a @@ -33,9 +30,6 @@ jobs: - goos: openbsd goarch: arm64 assetname: openbsd-arm64-v8a - - goos: openbsd - goarch: 386 - assetname: openbsd-32 - goos: openbsd goarch: arm assetname: openbsd-arm32-v7a @@ -75,16 +69,10 @@ jobs: COMMID=$(git describe --always --dirty) if [[ ${GOOS} == 'windows' ]]; then echo 'Building Xray for Windows...' - go build -o build_assets/xray.exe -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main + 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...' - if [[ ${GOARCH} == 'mips' || ${GOARCH} == 'mipsle' ]]; then - go build -o build_assets/xray -trimpath -buildvcs=false -gcflags="-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main - echo 'Building soft-float Xray for MIPS/MIPSLE 32-bit...' - GOMIPS=softfloat go build -o build_assets/xray_softfloat -trimpath -buildvcs=false -gcflags="-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main - else - go build -o build_assets/xray -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main - fi + go build -o build_assets/xray -trimpath -buildvcs=false -ldflags="-X github.com/xtls/xray-core/core.build=${COMMID} -s -w -buildid=" -v ./main fi - name: Copy README.md & LICENSE From c39d10b6d23f5d79d409f161053ef1010358e579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Sat, 4 Apr 2026 17:53:46 +0800 Subject: [PATCH 16/23] Add GOARM64=v8.2 to Windows; Add GOAMD64 to Windows (v2) and macOS (v3) --- .github/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07f4a83a0b47..78f64d702c9a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -186,6 +186,18 @@ jobs: if [[ ${GOOS} == 'darwin' ]]; then GOARM64="v8.4" fi + if [[ ${GOOS} == 'windows' ]]; then + GOARM64="v8.2" + fi + fi + # Special processing for x86-64 + if [[ ${GOARCH} == 'amd64' ]]; then + if [[ ${GOOS} == 'darwin' ]]; then + GOAMD64="v3" + fi + if [[ ${GOOS} == 'windows' ]]; then + GOAMD64="v2" + fi fi # Building mkdir -p build_assets From 60857c822ea37f33ff83f4230acde46ccb521baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Tue, 7 Apr 2026 01:55:08 +0800 Subject: [PATCH 17/23] Add back FreeBSD into regular CI; also several adjustments --- .github/build/friendly-filenames.json | 5 +---- .github/workflows/extended-nightly.yml | 12 +++--------- .github/workflows/release.yml | 16 ++++++++++++---- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/build/friendly-filenames.json b/.github/build/friendly-filenames.json index 15c4ab58b4fd..ea59f6d13646 100644 --- a/.github/build/friendly-filenames.json +++ b/.github/build/friendly-filenames.json @@ -3,10 +3,9 @@ "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" }, + "freebsd-arm": { "friendlyName": "freebsd-arm32-v7a" }, "linux-386": { "friendlyName": "linux-32" }, "linux-amd64": { "friendlyName": "linux-64" }, "linux-arm5": { "friendlyName": "linux-arm32-v5" }, @@ -15,9 +14,7 @@ "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" }, diff --git a/.github/workflows/extended-nightly.yml b/.github/workflows/extended-nightly.yml index 9fa12431d6ed..670aead34a56 100644 --- a/.github/workflows/extended-nightly.yml +++ b/.github/workflows/extended-nightly.yml @@ -15,15 +15,6 @@ jobs: strategy: matrix: include: - - goos: freebsd - goarch: amd64 - assetname: freebsd-64 - - goos: freebsd - goarch: arm64 - assetname: freebsd-arm64-v8a - - goos: freebsd - goarch: arm - assetname: freebsd-arm32-v7a - goos: openbsd goarch: amd64 assetname: openbsd-64 @@ -33,6 +24,9 @@ jobs: - goos: openbsd goarch: arm assetname: openbsd-arm32-v7a + - goos: openbsd + goarch: 386 + assetname: openbsd-32 fail-fast: false runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78f64d702c9a..26b5949deedb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,12 +79,12 @@ jobs: strategy: matrix: # Include x86-64 and ARM64 on all platforms. - goos: [windows, linux, darwin, android] + goos: [windows, freebsd, linux, darwin, android] goarch: [amd64, arm64] patch-assetname: [""] - # Building for FreeBSD and OpenBSD has been suspended unless - # there are active contributors that uses FreeBSD or OpenBSD actively. - # PRs for FreeBSD and OpenBSD compatibility are welcome. + # 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 RISCV & LoongArch @@ -138,6 +138,10 @@ jobs: goarch: arm goarm: 5 # END Linux ARM + # BEGIN BSD ARM + - goos: freebsd + goarch: arm + # END BSD ARM fail-fast: false runs-on: ubuntu-latest @@ -199,6 +203,10 @@ jobs: GOAMD64="v2" fi fi + # Special processing for 32-bit ARM + if [[ ${GOARCH} == 'arm' ]] && [[ ${GOOS} != 'linux' ]]; then + GOARM="7" + fi # Building mkdir -p build_assets COMMID=$(git describe --always --dirty) From 74973e75f0a41c04dea37d6c8af2da08cd0c62fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Tue, 7 Apr 2026 02:02:48 +0800 Subject: [PATCH 18/23] Update README --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index ec2c8e980f8d..d4cb0e38119e 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,24 @@ 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: + +``` +GOAMD64=v2 +``` + +If you are compiling a macOS x86-64 target, add this environment variable before compiling: + +``` +GOAMD64=v3 +``` + +If you are compiling a Windows ARM64 target, add this environment variable before compiling: + +``` +GOARM64=v8.2 +``` + If you are compiling a macOS ARM64 target, add this environment variable before compiling: ``` From edce7ad280ed55fa1a1acea5434ee75c10f5ed36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Tue, 7 Apr 2026 19:00:31 +0800 Subject: [PATCH 19/23] Only 64-bit for BSD --- .github/build/friendly-filenames.json | 3 --- .github/workflows/extended-nightly.yml | 6 ------ .github/workflows/release.yml | 4 ---- 3 files changed, 13 deletions(-) diff --git a/.github/build/friendly-filenames.json b/.github/build/friendly-filenames.json index ea59f6d13646..6282fb7e5f3d 100644 --- a/.github/build/friendly-filenames.json +++ b/.github/build/friendly-filenames.json @@ -5,7 +5,6 @@ "darwin-arm64": { "friendlyName": "macos-arm64-v8a" }, "freebsd-amd64": { "friendlyName": "freebsd-64" }, "freebsd-arm64": { "friendlyName": "freebsd-arm64-v8a" }, - "freebsd-arm": { "friendlyName": "freebsd-arm32-v7a" }, "linux-386": { "friendlyName": "linux-32" }, "linux-amd64": { "friendlyName": "linux-64" }, "linux-arm5": { "friendlyName": "linux-arm32-v5" }, @@ -21,10 +20,8 @@ "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" } diff --git a/.github/workflows/extended-nightly.yml b/.github/workflows/extended-nightly.yml index 670aead34a56..7505b2eb8dcc 100644 --- a/.github/workflows/extended-nightly.yml +++ b/.github/workflows/extended-nightly.yml @@ -21,12 +21,6 @@ jobs: - goos: openbsd goarch: arm64 assetname: openbsd-arm64-v8a - - goos: openbsd - goarch: arm - assetname: openbsd-arm32-v7a - - goos: openbsd - goarch: 386 - assetname: openbsd-32 fail-fast: false runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26b5949deedb..6e56d46779ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,10 +138,6 @@ jobs: goarch: arm goarm: 5 # END Linux ARM - # BEGIN BSD ARM - - goos: freebsd - goarch: arm - # END BSD ARM fail-fast: false runs-on: ubuntu-latest From 3ff5728c846766f416d52fbe028ab35632abc721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Sat, 30 May 2026 02:24:38 +0800 Subject: [PATCH 20/23] trim --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d0db95ad9176..fc31f0fe62ef 100644 --- a/README.md +++ b/README.md @@ -236,7 +236,6 @@ For Android: ```bash GOOS=android GOARCH=arm64 CGO_ENABLED=1 CC=/path/to/aarch64-linux-android24-clang go build -o xray -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=REPLACE -s -w -buildid= -checklinkname=0" -v ./main GOOS=android GOARCH=amd64 CGO_ENABLED=1 CC=/path/to/x86_64-linux-android24-clang go build -o xray -trimpath -buildvcs=false -gcflags="all=-l=4" -ldflags="-X github.com/xtls/xray-core/core.build=REPLACE -s -w -buildid= -checklinkname=0" -v ./main - ``` If you are compiling a 32-bit MIPS/MIPSLE target, use this command instead: From 8e4089cfbff47466b7ad5385d585ae52693ac18d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Mon, 1 Jun 2026 12:19:38 +0800 Subject: [PATCH 21/23] Set single run --- .github/workflows/extended-nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/extended-nightly.yml b/.github/workflows/extended-nightly.yml index 7505b2eb8dcc..1e5f0574a417 100644 --- a/.github/workflows/extended-nightly.yml +++ b/.github/workflows/extended-nightly.yml @@ -24,6 +24,7 @@ jobs: 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 }} From 8759716dad9543aa5ee7ad11fbcea9eb89b3156b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Fri, 5 Jun 2026 19:30:35 +0800 Subject: [PATCH 22/23] adjusting several details --- .github/workflows/extended-nightly.yml | 11 ++++++++++ .github/workflows/release-win7.yml | 3 +-- .github/workflows/release.yml | 28 +++++++++++--------------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/workflows/extended-nightly.yml b/.github/workflows/extended-nightly.yml index 1e5f0574a417..02ef1d0ba6dc 100644 --- a/.github/workflows/extended-nightly.yml +++ b/.github/workflows/extended-nightly.yml @@ -9,7 +9,15 @@ on: 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: @@ -62,6 +70,9 @@ jobs: 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 diff --git a/.github/workflows/release-win7.yml b/.github/workflows/release-win7.yml index 391fe38a518b..35343d8a5747 100644 --- a/.github/workflows/release-win7.yml +++ b/.github/workflows/release-win7.yml @@ -1,6 +1,5 @@ name: Build and Release for Windows 7 -# The furthest build might happen in August 2028 before a newer monor version of Go 1 releases. -# The furthest build must before Go 2 releases. +# The furthest build might happen in August 2028 before a newer version of Go 1 releases. # Multiple factors may affect this procedure. on: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f98544aa9ec..fd0574c92c7f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -181,28 +181,24 @@ jobs: - name: Build Xray run: | - # Special processing for ARM64 - if [[ ${GOARCH} == 'arm64' ]]; then - if [[ ${GOOS} == 'darwin' ]]; then - GOARM64="v8.4" - fi - if [[ ${GOOS} == 'windows' ]]; then - GOARM64="v8.2" - fi - fi - # Special processing for x86-64 + # Special processing for x86-64 and ARM64 if [[ ${GOARCH} == 'amd64' ]]; then - if [[ ${GOOS} == 'darwin' ]]; then + if [[ ${GOOS} == 'windows' ]]; then + GOAMD64="v2" + elif [[ ${GOOS} == 'darwin' ]]; then GOAMD64="v3" fi + elif [[ ${GOARCH} == 'arm64' ]]; then if [[ ${GOOS} == 'windows' ]]; then - GOAMD64="v2" + GOARM64="v8.2" + elif [[ ${GOOS} == 'darwin' ]]; then + GOARM64="v8.4" fi fi - # Special processing for 32-bit ARM - if [[ ${GOARCH} == 'arm' ]] && [[ ${GOOS} != 'linux' ]]; then - GOARM="7" - 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) From ce4016401ef56cc89d53cba2f39278706033e4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=90=B2=93=F0=90=B3=9B=F0=90=B3=AA=F0=90=B3=82?= =?UTF-8?q?=F0=90=B3=90=20=F0=90=B2=80=F0=90=B3=A2=F0=90=B3=A6=F0=90=B3=AB?= =?UTF-8?q?=F0=90=B3=A2=20=F0=90=B2=A5=F0=90=B3=94=F0=90=B3=9B=F0=90=B3=AA?= =?UTF-8?q?=F0=90=B3=8C=F0=90=B3=91=F0=90=B3=96=F0=90=B3=87?= <26771058+KobeArthurScofield@users.noreply.github.com> Date: Sun, 21 Jun 2026 00:16:45 +0800 Subject: [PATCH 23/23] Upgrade actions/checkout to v7 --- .github/workflows/extended-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extended-nightly.yml b/.github/workflows/extended-nightly.yml index 02ef1d0ba6dc..4fd7b3cadaf0 100644 --- a/.github/workflows/extended-nightly.yml +++ b/.github/workflows/extended-nightly.yml @@ -39,7 +39,7 @@ jobs: CGO_ENABLED: 0 steps: - name: Checkout codebase - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Show workflow information run: |