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 760B

12345678910111213141516171819202122232425262728293031323334
  1. ###############################################################################
  2. # BUILD STAGE
  3. FROM golang:1.15-alpine AS build
  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. WORKDIR /go/src/github.com/9seconds/mtg
  14. RUN set -x \
  15. && make -j 4 static \
  16. && upx --ultra-brute -qq ./mtg
  17. ###############################################################################
  18. # PACKAGE STAGE
  19. FROM scratch
  20. ENTRYPOINT ["/mtg"]
  21. ENV MTG_BIND=0.0.0.0:3128 \
  22. MTG_STATS_BIND=0.0.0.0:3129
  23. EXPOSE 3128 3129
  24. COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
  25. COPY --from=build /go/src/github.com/9seconds/mtg/mtg /mtg