|
@ -18,26 +18,6 @@ RUN env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w" && mv main /tmp/xra |
|
|
COPY --from=upx /tmp/upx /usr/bin/ |
|
|
COPY --from=upx /tmp/upx /usr/bin/ |
|
|
RUN upx -9 /tmp/xray |
|
|
RUN upx -9 /tmp/xray |
|
|
|
|
|
|
|
|
FROM ${GOLANG} AS v2ray |
|
|
|
|
|
ENV V2FLY="5.1.0" |
|
|
|
|
|
RUN wget https://github.com/v2fly/v2ray-core/archive/refs/tags/v${V2FLY}.tar.gz && tar xf v${V2FLY}.tar.gz |
|
|
|
|
|
WORKDIR ./v2ray-core-${V2FLY}/main/ |
|
|
|
|
|
RUN go get -d |
|
|
|
|
|
RUN env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w" && mv main /tmp/v2ray |
|
|
|
|
|
COPY --from=upx /tmp/upx /usr/bin/ |
|
|
|
|
|
RUN upx -9 /tmp/v2ray |
|
|
|
|
|
|
|
|
|
|
|
FROM ${GOLANG} AS sagray |
|
|
|
|
|
#ENV SAGER_VER="5.0.17" |
|
|
|
|
|
RUN wget https://github.com/SagerNet/v2ray-core/archive/refs/heads/main.zip && unzip main.zip |
|
|
|
|
|
WORKDIR ./v2ray-core-main/main/ |
|
|
|
|
|
#RUN wget https://github.com/SagerNet/v2ray-core/archive/refs/tags/v${SAGER}.tar.gz && tar xf v${SAGER}.tar.gz |
|
|
|
|
|
#WORKDIR ./v2ray-core-${SAGER}/main/ |
|
|
|
|
|
RUN go get -d |
|
|
|
|
|
RUN env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w" && mv main /tmp/sagray |
|
|
|
|
|
COPY --from=upx /tmp/upx /usr/bin/ |
|
|
|
|
|
RUN upx -9 /tmp/sagray |
|
|
|
|
|
|
|
|
|
|
|
FROM ${GOLANG} AS xproxy |
|
|
FROM ${GOLANG} AS xproxy |
|
|
COPY ./ /XProxy/ |
|
|
COPY ./ /XProxy/ |
|
|
WORKDIR /XProxy/cmd/ |
|
|
WORKDIR /XProxy/cmd/ |
|
@ -53,8 +33,6 @@ RUN wget "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/downlo |
|
|
wget "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" && \ |
|
|
wget "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" && \ |
|
|
tar cJf assets.tar.xz *.dat && rm *.dat |
|
|
tar cJf assets.tar.xz *.dat && rm *.dat |
|
|
COPY --from=xproxy /tmp/xproxy /release/usr/bin/ |
|
|
COPY --from=xproxy /tmp/xproxy /release/usr/bin/ |
|
|
COPY --from=sagray /tmp/sagray /release/usr/bin/ |
|
|
|
|
|
COPY --from=v2ray /tmp/v2ray /release/usr/bin/ |
|
|
|
|
|
COPY --from=xray /tmp/xray /release/usr/bin/ |
|
|
COPY --from=xray /tmp/xray /release/usr/bin/ |
|
|
|
|
|
|
|
|
FROM ${ALPINE} |
|
|
FROM ${ALPINE} |
|
|