Files
v2rayA/build.sh
T
Markson GuGa Beyond cffe97ca3d core: migrate xray-core from git submodule to go mod and port QUIC outbounds to daeuniverse/outbound
The vendored core/xray submodule is dropped. xray-core is now pinned via a
go mod pseudo-version resolving to v26.7.28 (commit 5ca6f4b7); v26 tags are
not directly resolvable because Xray's module path lacks the /v26 suffix, so
the pin must be made by commit hash. CI workflows and the AUR PKGBUILD no
longer need "submodules: recursive" / "git submodule update".

The juicity and tuic outbounds are ported from softwind to
github.com/daeuniverse/outbound (temporarily replaced with an olicesx fork
pending sticky-ip support):

- Dialer calls use DialContext; the network string is decoded with
  netproxy.ParseMagicNetwork instead of a "udp" prefix check, since it may
  be binary-encoded via netproxy.MagicNetwork.
- A packetConnAdapter wraps xray's UDP dial result: outbound asserts the
  underlay conn to netproxy.PacketConn whose ReadFrom/WriteTo signatures
  (netip.AddrPort / string) differ from net.PacketConn, while xray returns
  *internet.PacketConnWrapper.
2026-09-18 13:15:45 +08:00

20 lines
921 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
CurrentDir="$(pwd)"
if [ -d "$CurrentDir/.git" ]; then
date=$(git -C "$CurrentDir" log -1 --format="%cd" --date=short | sed s/-//g)
count=$(git -C "$CurrentDir" rev-list --count HEAD)
commit=$(git -C "$CurrentDir" rev-parse --short HEAD)
version="unstable-$date.r${count}.$commit"
else
version="unstable"
fi
# https://github.com/webpack/webpack/issues/14532#issuecomment-947012063
cd "$CurrentDir"/gui && yarn --ignore-engines && OUTPUT_DIR="$CurrentDir"/service/server/router/web yarn --ignore-engines build
# Build v2raya-core (xray-core from go mod + custom protocols)
cd "$CurrentDir"/core && CGO_ENABLED=0 go build -trimpath -ldflags "-X main.Version=$version -s -w" -o "$CurrentDir"/v2raya_core ./main
cd "$CurrentDir"/service && CGO_ENABLED=0 go build -trimpath -tags "with_gvisor" -ldflags "-X github.com/v2rayA/v2rayA/conf.Version=$version -s -w" -o "$CurrentDir"/v2raya