docker hub官方鏡像地址如下:
https://hub.docker.com/r/telegrammessenger/proxy
拉取鏡像
sudo docker pull telegrammessenger/proxy
創建容器
sudo docker run -d \ -p 443:443 \ --name=mtproto-proxy \ --restart=always \ -v proxy-config:/data \ telegrammessenger/proxy:latest
查看docker日志,獲取具體信息
sudo docker logs mtproto-proxy
[+] Using the explicitly passed secret: '00baadf00d15abad1deaa515baadcafe'. [+] Saving it to /data/secret. [*] Final configuration: [*] Secret 1: 00baadf00d15abad1deaa515baadcafe [*] tg:// link for secret 1 auto configuration: : tg://proxy?server=3.14.15.92&port=443&secret=00baadf00d15abad1deaa515baadcafe [*] t.me link for secret 1: tg://proxy?server=3.14.15.92&port=443&secret=00baadf00d15abad1deaa515baadcafe [*] Tag: no tag [*] External IP: 3.14.15.92 [*] Make sure to fix the links in case you run the proxy on a different port.
自定義秘鑰
#自定義單個秘鑰
sudo docker run \ -d \ -p443:443 \ -v proxy-config:/data \ -e SECRET=00baadf00d15abad1deaa51sbaadcafe \ telegrammessenger/proxy:latest
#自定義多個秘鑰,秘鑰以逗號分隔
sudo docker run \ -d \ -p443:443 \ -v proxy-config:/data \ -e SECRET=935ddceb2f6bbbb78363b224099f75c8,2084c7e58d8213296a3206da70356c81 \ telegrammessenger/proxy:latest