代理服务器是客户端和服务器之间的中介。 为了规避限制,应该在对访问所需信息没有任何限制的地方安装代理服务器,而在客户端和代理服务器之间应该没有这种限制。

更新了对电报客户端的代理支持
- 新的MTProto代理。 与电报本机协议MTProto一起使用
- GitHub开源服务器
- DockerHub上的 Docker映像
- 在移动客户端中,可以添加每种类型的多个代理。 用户可以选择最合适的

MTProto代理
- MTProto-proxy仅适用于Telegram
- 客户端和服务器没有开放的信息交换阶段
- 在Telegram的MTProto代理服务器的实现中,代理服务器及其所有者无法直接访问MTProxy协议元信息(例如,登录名)。
- 对于所有类型的过滤器和分析器,与MTProto-proxy服务器进行的数据交换看起来像是客户端和服务器之间的非结构化二进制双向数据流。 这使得协议识别难以限制。
快速上手
要启动您自己的MTProto代理服务器,仅需要安装
Docker且具有网络访问权限的计算机。 端口443(nginx,apache)上不应有任何东西。 在代理服务器的第一次启动时,将创建一个密钥,该密钥将被记住。 使用一个命令运行:
$ docker run -d --net=host --name=mtproto-proxy --restart=always \
-v proxy-config:/data telegrammessenger/proxy
:
$ docker logs mtproto-proxy
[+] Using the explicitly passed secret: 'b7e70329dcf3721c4239b86ad32a90b8'.
[+] Saving it to /data/secret.
[*] Final configuration:
[*] Secret 1: b7e70329dcf3721c4239b86ad32a90b8
[*] tg:// link for secret 1 auto configuration: : tg://proxy?server=81.177.103.94&port=443&secret=b7e70329dcf3721c4239b86ad32a90b8
[*] t.me link for secret 1: tg://proxy?server=81.177.103.94&port=443&secret=b7e70329dcf3721c4239b86ad32a90b8
[*] Tag: no tag
[*] External IP: 81.177.103.94
[*] Make sure to fix the links in case you run the proxy on a different port.
, - «» , IP .
SECRET:
$ docker run -d --net=host --name=mtproto-proxy --restart=always \
-v proxy-config:/data -e SECRET=b7e70329dcf3721c4239b86ad32a90b8 \
telegrammessenger/proxy
- ( ) ( 16). , : boss, managers, users. . ( ) , . ? . . .
:
$ docker run -d --net=host --name=mtproto-proxy --restart=always \
-v proxy-config:/data -e SECRET=b7e70329dcf3721c4239b86ad32a90b8,afccd434fb32248f29f033b189bd8541,878397a50627deb349d4c296bd9dc3c2 \
telegrammessenger/proxy
SECRET_COUNT ( 16):
$ docker run -d --net=host --name=mtproto-proxy --restart=always \
-v proxy-config:/data -e SECRET_COUNT=5 telegrammessenger/proxy
, , Linux:
# busybox:
$ tr -dc 'a-f0-9' < /dev/urandom | dd bs=1 count=32 2>/dev/null
$ hexdump -n 16 -e '4/4 "%08x" 1 "\n"' /dev/random # hexdump
$ openssl rand -hex 16 # openssl
- . 60000 . - ( , ). WORKERS. , :
$ docker run -d --net=host --name=mtproto-proxy --restart=always \
-v proxy-config:/data -e WORKERS=16 telegrammessenger/proxy
--net=host
. IPv6 , , proxy-server.
, , :
$ docker run -d -p443:443 --name=mtproto-proxy --restart=always \
-v proxy-config:/data telegrammessenger/proxy
- , :
$ docker run -d -p8443:443 --name=mtproto-proxy --restart=always \
-v proxy-config:/data telegrammessenger/proxy:latest
, - «» , .
MTProto- . localhost:
http://localhost:2398/stats
.
- docker
--net=host
:
curl http://localhost:2398/stats
, , , nginx - . - docker :
$ docker exec mtproto-proxy curl http://localhost:2398/stats
:
- ready_targets — Telegram, c -
- active_targets — Telegram ( ready_targets)
- total_special_connections —
- total_max_special_connections —
Telegram - Promoted-. Promoted- — , -. -.
Promoted-
@MTProxybot TAG :
$ docker run -d --net=host --name=mtproto-proxy --restart=always \
-v proxy-config:/data -e TAG=85174e9e0ffa43c0d3a7167e52175268 \
telegrammessenger/proxy:latest
, .
Promoted- , -. , .

-
MTProto- , - :
$ docker pull telegrammessenger/proxy #
$ docker stop mtproto-proxy #
$ docker rm mtproto-proxy #
$ docker run .... #
$ docker logs -f --tail=30 mtproto-proxy #
Docker Compose
docker-compose.yml:
version: '3.0'
services:
mtproxy:
image: telegrammessenger/proxy:latest
hostname: mtproxy
container_name: mtproxy.local
volumes:
- proxy-config:/data
network_mode: "host"
logging:
driver: syslog
options:
tag: mtproxy
restart: always
volumes:
proxy-config:
external: true
Promoted- TAG.
- c Docker Compose
$ docker-compose pull mtproxy #
$ docker-compose up -d #
$ docker-compose logs -f --tail=30 mtproxy #