mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-13 23:03:09 +00:00
Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0614c35020 | ||
|
|
368669a546 | ||
|
|
949ee12ed2 | ||
|
|
1f7ce9e977 | ||
|
|
8920faf650 | ||
|
|
34f743858c | ||
|
|
375fee1535 | ||
|
|
e0ea17978c | ||
|
|
8bb885ada5 | ||
|
|
bc841cff48 | ||
|
|
c89479000f | ||
|
|
74711c4212 | ||
|
|
51b2482dec | ||
|
|
87f4370927 | ||
|
|
a978eae922 | ||
|
|
88c8c57a44 | ||
|
|
446682521b | ||
|
|
b26873176a | ||
|
|
6e8e8b63b2 | ||
|
|
3b4f239cc1 | ||
|
|
0283d6264a | ||
|
|
15a8f607ca | ||
|
|
6076db9f8c | ||
|
|
6560a6c1d2 | ||
|
|
24479e68ab | ||
|
|
6ecf0ec9ac | ||
|
|
18a80e52cd | ||
|
|
ea3b8a44c3 | ||
|
|
37d570f8dc | ||
|
|
8f48e9ef65 | ||
|
|
76bc2253eb | ||
|
|
07bd9b795a | ||
|
|
1cad031947 | ||
|
|
923dac842b | ||
|
|
1a63fdae11 | ||
|
|
c7b6dcf3c2 | ||
|
|
a95b1ec3c1 | ||
|
|
49bc5d1f3b | ||
|
|
c2414c3487 | ||
|
|
8b26cc843d | ||
|
|
639dea5e8d | ||
|
|
c48cacce83 | ||
|
|
2bb0ef0b1f | ||
|
|
f5ee5db86f | ||
|
|
9c50cab94e | ||
|
|
199eaeb7c4 | ||
|
|
66ac871a74 | ||
|
|
c5344df0eb | ||
|
|
93ad268d48 | ||
|
|
1c29465b6e | ||
|
|
d41b4abf35 | ||
|
|
7f19b3f78d | ||
|
|
0549fd7200 | ||
|
|
fd75ca3cf9 | ||
|
|
522b0cfe75 | ||
|
|
4a4d449a34 | ||
|
|
8c15fc8fe0 | ||
|
|
e436792992 | ||
|
|
07759f67cb | ||
|
|
f525cc9611 | ||
|
|
c010543889 | ||
|
|
0a41479054 | ||
|
|
5f206361f2 | ||
|
|
6980bfd3be |
13
Dockerfile
13
Dockerfile
@@ -1,13 +1,14 @@
|
||||
FROM alpine:3.10
|
||||
FROM ubuntu:24.04
|
||||
|
||||
RUN adduser tgproxy -u 10000 -D
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y python3 python3-uvloop python3-cryptography python3-socks libcap2-bin ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
RUN setcap cap_net_bind_service=+ep /usr/bin/python3.12
|
||||
|
||||
RUN apk add --no-cache python3 py3-cryptography ca-certificates libcap
|
||||
|
||||
RUN chown -R tgproxy:tgproxy /home/tgproxy
|
||||
RUN setcap cap_net_bind_service=+ep /usr/bin/python3.7
|
||||
RUN useradd tgproxy -u 10000
|
||||
|
||||
USER tgproxy
|
||||
|
||||
WORKDIR /home/tgproxy/
|
||||
|
||||
COPY --chown=tgproxy mtprotoproxy.py config.py /home/tgproxy/
|
||||
|
||||
CMD ["python3", "mtprotoproxy.py"]
|
||||
|
||||
@@ -20,6 +20,11 @@ To advertise a channel get a tag from **@MTProxybot** and put it to *config.py*.
|
||||
The proxy performance should be enough to comfortably serve about 4 000 simultaneous users on
|
||||
the VDS instance with 1 CPU core and 1024MB RAM.
|
||||
|
||||
## More Instructions ##
|
||||
|
||||
- [Running without Docker](https://github.com/alexbers/mtprotoproxy/wiki/Running-Without-Docker)
|
||||
- [Optimization and fine tuning](https://github.com/alexbers/mtprotoproxy/wiki/Optimization-and-Fine-Tuning)
|
||||
|
||||
## Advanced Usage ##
|
||||
|
||||
The proxy can be launched:
|
||||
|
||||
25
config.py
25
config.py
@@ -1,20 +1,25 @@
|
||||
PORT = 3256
|
||||
PORT = 443
|
||||
|
||||
# name -> secret (32 hex chars)
|
||||
USERS = {
|
||||
"tg": "00000000000000000000000000000000",
|
||||
"tg2": "0123456789abcdef0123456789abcdef"
|
||||
"tg": "00000000000000000000000000000001",
|
||||
# "tg2": "0123456789abcdef0123456789abcdef",
|
||||
}
|
||||
|
||||
# Makes the proxy harder to detect
|
||||
# Can be incompatible with very old clients
|
||||
SECURE_ONLY = True
|
||||
MODES = {
|
||||
# Classic mode, easy to detect
|
||||
"classic": False,
|
||||
|
||||
# Makes the proxy even more hard to detect
|
||||
# Compatible only with the recent clients
|
||||
TLS_ONLY = True
|
||||
# Makes the proxy harder to detect
|
||||
# Can be incompatible with very old clients
|
||||
"secure": False,
|
||||
|
||||
# The domain for TLS, bad clients are proxied there
|
||||
# Makes the proxy even more hard to detect
|
||||
# Can be incompatible with old clients
|
||||
"tls": True
|
||||
}
|
||||
|
||||
# The domain for TLS mode, bad clients are proxied there
|
||||
# Use random existing domain, proxy checks it on start
|
||||
# TLS_DOMAIN = "www.google.com"
|
||||
|
||||
|
||||
@@ -7,4 +7,10 @@ services:
|
||||
volumes:
|
||||
- ./config.py:/home/tgproxy/config.py
|
||||
- ./mtprotoproxy.py:/home/tgproxy/mtprotoproxy.py
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-file: "10"
|
||||
max-size: "10m"
|
||||
# mem_limit: 1024m
|
||||
|
||||
678
mtprotoproxy.py
678
mtprotoproxy.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user