上传文件至「mtg」
This commit is contained in:
16
mtg/Dockerfile
Normal file
16
mtg/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
FROM debian:latest
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y python3 curl && \
|
||||||
|
apt-get clean
|
||||||
|
RUN mkdir -p /opt/mtproto
|
||||||
|
|
||||||
|
COPY ./mtprotoproxy /opt/mtproto/
|
||||||
|
|
||||||
|
WORKDIR /opt/mtproto
|
||||||
|
|
||||||
|
RUN chmod +x mtprotoproxy.py
|
||||||
|
|
||||||
|
CMD ["python3", "mtprotoproxy.py"]
|
||||||
20
mtg/config.py
Normal file
20
mtg/config.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
PORT = 5396
|
||||||
|
|
||||||
|
USERS = {
|
||||||
|
# 32位16进制字符串
|
||||||
|
"tg": "6b96a90543e55d4ea59e7e0ae9420d4931313661613832363239613931383530303864343866633361333139643363342e636f6d",
|
||||||
|
}
|
||||||
|
|
||||||
|
MODES = {
|
||||||
|
# Classic mode, easy to detect
|
||||||
|
"classic": False,
|
||||||
|
|
||||||
|
# Makes the proxy harder to detect
|
||||||
|
# Can be incompatible with very old clients
|
||||||
|
"secure": False,
|
||||||
|
|
||||||
|
# Makes the proxy even more hard to detect
|
||||||
|
# Can be incompatible with old clients
|
||||||
|
"tls": True
|
||||||
|
}
|
||||||
|
TLS_DOMAIN = "endfield.gryphline.com"
|
||||||
13
mtg/docker-compose.yaml
Normal file
13
mtg/docker-compose.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
services:
|
||||||
|
mtproto-service:
|
||||||
|
build: .
|
||||||
|
container_name: mtproto
|
||||||
|
ports:
|
||||||
|
- "5396:5396"
|
||||||
|
networks:
|
||||||
|
- debian_network
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
networks:
|
||||||
|
debian_network:
|
||||||
|
driver: bridge
|
||||||
15
mtg/mtp.service
Normal file
15
mtg/mtp.service
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Async MTProto proxy for Telegram
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=python3 /opt/mtprotoproxy/mtprotoproxy.py /opt/mtprotoproxy/config.py
|
||||||
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
|
LimitNOFILE=infinity
|
||||||
|
User=root
|
||||||
|
Group=root
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
2644
mtg/mtprotoproxy.py
Normal file
2644
mtg/mtprotoproxy.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user