mirror of
https://github.com/alexbers/mtprotoproxy.git
synced 2026-03-14 07:13:09 +00:00
Compare commits
130 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
027ee2713b | ||
|
|
3c4c92cdb2 | ||
|
|
3ef826cd6b | ||
|
|
9ec1e543bd | ||
|
|
fae04ed3c7 | ||
|
|
25685f370c | ||
|
|
1feb8e5fc7 | ||
|
|
5e488203a2 | ||
|
|
94fd98a1fb | ||
|
|
4c5b0803fa | ||
|
|
8fa8aabc8e | ||
|
|
f2fbaa923b | ||
|
|
79eaabdd23 | ||
|
|
23c7b0d53b | ||
|
|
516600a32d | ||
|
|
5fcd1c0158 | ||
|
|
781549f37f | ||
|
|
dc1223fd90 | ||
|
|
0d52ae0bc7 | ||
|
|
2b1469985d | ||
|
|
4784491800 | ||
|
|
7a2c6b9825 | ||
|
|
37307a98fb | ||
|
|
02b39168c3 | ||
|
|
163e7b7cce | ||
|
|
1ed13d9efa | ||
|
|
51c8d68271 | ||
|
|
50cd74051f | ||
|
|
1d826866d1 | ||
|
|
ff6b826e13 | ||
|
|
3315ac1df6 | ||
|
|
4184875405 | ||
|
|
d34a15bca3 | ||
|
|
56bfab51d5 | ||
|
|
4f8b1b16db | ||
|
|
27f5d249a7 | ||
|
|
c51f6f85b8 | ||
|
|
44a52bf958 | ||
|
|
8520a26837 | ||
|
|
068996ab36 | ||
|
|
4faa96732f | ||
|
|
bee0b3be6b | ||
|
|
09fec8ca99 | ||
|
|
25d76bee09 | ||
|
|
a680b3e854 | ||
|
|
3fe87954a2 | ||
|
|
3fb3da139f | ||
|
|
014e450e62 | ||
|
|
04491f8a6a | ||
|
|
e081d6b727 | ||
|
|
ea28a7055a | ||
|
|
45cb849ca9 | ||
|
|
e66818326e | ||
|
|
4a1bf1ec6a | ||
|
|
854aaa1f24 | ||
|
|
5b0ad45cb9 | ||
|
|
26e00a7409 | ||
|
|
ac6d20a897 | ||
|
|
06ed40c815 | ||
|
|
1938c7d3bb | ||
|
|
01fd1a34c2 | ||
|
|
1a0977b10e | ||
|
|
9dc8521c18 | ||
|
|
4169e6acab | ||
|
|
121a8974de | ||
|
|
fdf5efe3d2 | ||
|
|
015d0a2012 | ||
|
|
dcad0bd51b | ||
|
|
da9e51ed03 | ||
|
|
59306e6e67 | ||
|
|
7502d1dc31 | ||
|
|
9df42cda79 | ||
|
|
a65f7a8e17 | ||
|
|
8a4bc77125 | ||
|
|
294cb65738 | ||
|
|
559c577df1 | ||
|
|
ccc8c3fb14 | ||
|
|
e061cd81c4 | ||
|
|
7527d402d6 | ||
|
|
f51a4bfe34 | ||
|
|
d9fa5b222a | ||
|
|
91ec36653e | ||
|
|
e43ae99911 | ||
|
|
ab52521a25 | ||
|
|
53184470e9 | ||
|
|
48330f1e8a | ||
|
|
4e2cb87685 | ||
|
|
a030ae2978 | ||
|
|
3d8961316e | ||
|
|
d7c163c0dc | ||
|
|
80062c95bc | ||
|
|
c1fdc4c0a3 | ||
|
|
f5d41e9aa7 | ||
|
|
4e754a75bd | ||
|
|
1a934f992d | ||
|
|
c543bc1c3d | ||
|
|
96ba65aba0 | ||
|
|
985e3eb546 | ||
|
|
129f5cc981 | ||
|
|
6fb022284e | ||
|
|
4691917c34 | ||
|
|
7d11ff07bd | ||
|
|
1c875e3d31 | ||
|
|
a2890cf213 | ||
|
|
026849cb54 | ||
|
|
4f1fea79eb | ||
|
|
50df84bc80 | ||
|
|
6823117c63 | ||
|
|
d21eab60c2 | ||
|
|
312539c3b8 | ||
|
|
a9e12bb1bb | ||
|
|
6c5155ce07 | ||
|
|
422c409480 | ||
|
|
cdd4fef49e | ||
|
|
9da90d25d3 | ||
|
|
eba7f9be69 | ||
|
|
af8c102449 | ||
|
|
a01896522d | ||
|
|
6f70ff3003 | ||
|
|
d48c177e36 | ||
|
|
f55ae68092 | ||
|
|
4cae6290b9 | ||
|
|
830d55fe77 | ||
|
|
66d9c03ff9 | ||
|
|
73592c4f72 | ||
|
|
b0cb48f684 | ||
|
|
cb10355681 | ||
|
|
bd8e0f935d | ||
|
|
e2435461ca | ||
|
|
47218748aa |
@@ -1,15 +1,13 @@
|
||||
FROM alpine:3.8
|
||||
FROM alpine:3.10
|
||||
|
||||
RUN adduser tgproxy -u 10000 -D
|
||||
|
||||
RUN apk add --no-cache python3 py3-cryptography ca-certificates libcap
|
||||
|
||||
COPY mtprotoproxy.py config.py /home/tgproxy/
|
||||
|
||||
RUN chown -R tgproxy:tgproxy /home/tgproxy
|
||||
RUN setcap cap_net_bind_service=+ep /usr/bin/python3.6
|
||||
RUN setcap cap_net_bind_service=+ep /usr/bin/python3.7
|
||||
|
||||
USER tgproxy
|
||||
|
||||
WORKDIR /home/tgproxy/
|
||||
CMD ["./mtprotoproxy.py"]
|
||||
CMD ["python3", "mtprotoproxy.py"]
|
||||
|
||||
14
README.md
14
README.md
@@ -1,17 +1,19 @@
|
||||
# Async MTProto Proxy #
|
||||
|
||||
Fast and simple to setup mtproto proxy.
|
||||
Fast and simple to setup MTProto proxy written in Python.
|
||||
|
||||
## Starting Up ##
|
||||
|
||||
1. `git clone -b stable https://github.com/alexbers/mtprotoproxy.git; cd mtprotoproxy`
|
||||
2. *(optional, recommended)* edit *config.py*, set **PORT**, **USERS** and **AD_TAG**
|
||||
3. `docker-compose up --build -d` (or just `python3 mtprotoproxy.py` if you don't like docker)
|
||||
4. *(optional, shows telegram link to set the proxy)* `docker-compose logs`
|
||||
3. `docker-compose up -d` (or just `python3 mtprotoproxy.py` if you don't like Docker)
|
||||
4. *(optional, get a link to share the proxy)* `docker-compose logs`
|
||||
|
||||

|
||||
|
||||
## Channel Advertising ##
|
||||
|
||||
To advertise a channel get a tag from **@MTProxybot** and write it to *config.py*.
|
||||
To advertise a channel get a tag from **@MTProxybot** and put it to *config.py*.
|
||||
|
||||
## Performance ##
|
||||
|
||||
@@ -23,5 +25,5 @@ the VDS instance with 1 CPU core and 1024MB RAM.
|
||||
The proxy can be launched:
|
||||
- with a custom config: `python3 mtprotoproxy.py [configfile]`
|
||||
- several times, clients will be automaticaly balanced between instances
|
||||
- using *PyPy* interprteter
|
||||
- with runtime statistics exported for [Prometheus](https://prometheus.io/): using [prometheus](https://github.com/alexbers/mtprotoproxy/tree/prometheus) branch
|
||||
- with uvloop module to get an extra speed boost
|
||||
- with runtime statistics exported to [Prometheus](https://prometheus.io/)
|
||||
|
||||
16
config.py
16
config.py
@@ -6,9 +6,17 @@ USERS = {
|
||||
"tg2": "0123456789abcdef0123456789abcdef"
|
||||
}
|
||||
|
||||
# Makes the proxy harder to detect
|
||||
# Can be incompatible with very old clients
|
||||
SECURE_ONLY = True
|
||||
|
||||
# Makes the proxy even more hard to detect
|
||||
# Compatible only with the recent clients
|
||||
TLS_ONLY = True
|
||||
|
||||
# The domain for TLS, bad clients are proxied there
|
||||
# Use random existing domain, proxy checks it on start
|
||||
# TLS_DOMAIN = "www.google.com"
|
||||
|
||||
# Tag for advertising, obtainable from @MTProxybot
|
||||
# AD_TAG = "3c09c680b76ee91a4c25ad51f742267d"
|
||||
|
||||
# Uncommenting this do make a proxy harder to detect
|
||||
# But it can be incompatible with old clients
|
||||
# SECURE_ONLY = True
|
||||
|
||||
@@ -4,4 +4,7 @@ services:
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
- ./config.py:/home/tgproxy/config.py
|
||||
- ./mtprotoproxy.py:/home/tgproxy/mtprotoproxy.py
|
||||
# mem_limit: 1024m
|
||||
|
||||
1620
mtprotoproxy.py
1620
mtprotoproxy.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user