From d2b1a95f46fd939de91456c4e60ab4e1cf97b408 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Sat, 4 Mar 2023 00:49:13 +0800 Subject: [PATCH] build: use xray dev version for REALITY feature --- Dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a95158d..30aebf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,16 @@ WORKDIR ./build/release/ RUN strip upx && mv upx /tmp/ FROM ${GOLANG} AS xray -ENV XRAY="1.7.5" -RUN wget https://github.com/XTLS/Xray-core/archive/refs/tags/v${XRAY}.tar.gz && tar xf v${XRAY}.tar.gz -WORKDIR ./Xray-core-${XRAY}/main/ +#ENV XRAY="1.7.5" +#RUN wget https://github.com/XTLS/Xray-core/archive/refs/tags/v${XRAY}.tar.gz && tar xf v${XRAY}.tar.gz +#WORKDIR ./Xray-core-${XRAY}/main/ + +# TODO: use xray dev version just for now +RUN apk add git +RUN git clone https://github.com/XTLS/Xray-core.git +WORKDIR ./Xray-core/main/ +RUN git checkout 4c8ee0af50bbabd29e6766f0d9509add6fc0b2e7 + RUN go get -d RUN env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w" && mv main /tmp/xray COPY --from=upx /tmp/upx /usr/bin/