Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 777B

123456789101112131415161718192021222324252627282930313233343536
  1. ###############################################################################
  2. # BUILD STAGE
  3. FROM golang:1.12-alpine
  4. RUN set -x \
  5. && apk --no-cache --update add \
  6. bash \
  7. ca-certificates \
  8. curl \
  9. git \
  10. make \
  11. upx
  12. COPY . /go/src/github.com/9seconds/mtg/
  13. RUN set -x \
  14. && cd /go/src/github.com/9seconds/mtg \
  15. && make -j 4 static \
  16. && upx --ultra-brute -qq ./mtg
  17. ###############################################################################
  18. # PACKAGE STAGE
  19. FROM scratch
  20. ENTRYPOINT ["/mtg"]
  21. ENV MTG_IP=0.0.0.0 \
  22. MTG_PORT=3128 \
  23. MTG_STATS_IP=0.0.0.0 \
  24. MTG_STATS_PORT=3129
  25. EXPOSE 3128 3129
  26. COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
  27. COPY --from=0 /go/src/github.com/9seconds/mtg/mtg /mtg