From afbf8e3211895ec16c34b2ff893a5cc0810f91bb Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Mon, 28 Feb 2022 20:17:07 +0800 Subject: [PATCH] update: add trojan-go in docker --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 27397db..48b5248 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ ENV GOST_VERSION="v2.11.1" ENV XRAY_VERSION="v1.5.3" ENV V2FLY_VERSION="v4.44.0" ENV TROJAN_VERSION="v1.16.0" +ENV TROJAN_GO_VERSION="v0.10.6" ENV DNSPROXY_VERSION="v0.41.1" RUN \ @@ -52,6 +53,7 @@ git clone https://github.com/ginuerzh/gost.git && \ git clone https://github.com/XTLS/Xray-core.git && \ git clone https://github.com/v2fly/v2ray-core.git && \ git clone https://github.com/trojan-gfw/trojan.git && \ +git clone https://github.com/p4gefau1t/trojan-go.git && \ git clone https://github.com/AdguardTeam/dnsproxy.git && \ \ # Install rust environment (nightly version) @@ -207,6 +209,12 @@ env CGO_ENABLED=0 go build -o v2ray -trimpath -ldflags "-s -w" ./main && \ env CGO_ENABLED=0 go build -o v2ctl -trimpath -ldflags "-s -w" -tags confonly ./infra/control/main && \ mv ./v2ctl ./v2ray /tmp/release/ && \ \ +# Compile Trojan-Go +cd /tmp/trojan-go/ && git checkout $TROJAN_GO_VERSION \ +env CGO_ENABLED=0 go build -trimpath -ldflags "-X github.com/p4gefau1t/trojan-go/constant.Version=`git describe --dirty` \ + -X github.com/p4gefau1t/trojan-go/constant.Commit=`git rev-parse HEAD` -s -w" -tags "full" && \ +mv ./trojan-go /tmp/release/ && \ +\ # Compile dnsproxy cd /tmp/dnsproxy/ && \ git checkout $DNSPROXY_VERSION && VERSION=`git describe --tags` && \