The MTProxy you know in Docker. The official image is said to be outdated so I made an always fresh one.
Basic usage:
# force update to the latest image
docker pull jamesits/mtproxy:latest
# generate a secret
head -c 16 /dev/urandom | xxd -ps
# test run
docker run -p 443:443 -e SECRET=<MY_SECRET> -it jamesits/mtproxy:latest
# register your bot with @MTProxybot and get a tag!
# start as daemon with default port
docker run -d --restart unless-stopped -p 443:443 -e SECRET=<MY_SECRET> -e TAG=<MY_TAG> jamesits/mtproxy:latest
# or with a different port
docker run -d --restart unless-stopped -p <PORT>:443 -e SECRET=<MY_SECRET> -e TAG=<MY_TAG> -e PORT=<PORT> jamesits/mtproxy:latest
- 443: proxy port
- 2398: monitoring port (optional)
SECRET
: a random string, generate one withhead -c 16 /dev/urandom | xxd -ps
TAG
: your proxy tag, register with @MTProxybot and you will get oneEXTERNAL_IP
: your global routable IP for users to connect, only needed if your server ingress and egress connections use different IPsPORT
: your user-facing port, only needed if is not 443. This is only for display information; you shall still forward that external port to 443 in containerWORKERS
: CPU threads, default=1
- The proxy will restart itself at midnight to update DC configuration. If you didn't explicitly set an
SECRET
, it will change during the restart. - By default the container will connect to ip.sb API to detect its external IP. If you don't want this feature, set
EXTERNAL_IP
explicitly. - The image on Docker Hub will be rebuilt automatically in 24h (checked by Azure DevOps) if there are any changes on the master branch of the upstream codebase. Please pull the latest one before use.
- Always check your server time! If possible, sync with a NTP server.
If this project is helpful to you, please consider buying me a coffee.
or PayPal