alexbers / mtprotoproxy Goto Github PK
View Code? Open in Web Editor NEWAsync MTProto proxy for Telegram
License: MIT License
Async MTProto proxy for Telegram
License: MIT License
hi how can Upgrade connetion 4000 to 10.000 or many?
I can successfully connect to proxy but i get this error:
http://uupload.ir/files/123.png
Im using newest version
I tested this software on the server
posting of photos and content is goods
But there's a problem opening photos and videos .
This seems to be due to the limited Telegram IP in the TG_DATACENTERS section.
please check this problem.
thanks .
On the latest master 0778060 with AD_TAG enabled still get those kind of errors:
Fatal write error on socket transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x7f0a312a9fd0>
transport: <_SelectorSocketTransport closing fd=801 read=idle write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/selector_events.py", line 723, in _write_ready
n = self._sock.send(self._buffer)
TimeoutError: [Errno 110] Connection timed out
<..>
Fatal read error on socket transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x7f0a2daa5940>
transport: <_SelectorSocketTransport fd=792 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/selector_events.py", line 662, in _read_ready
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
Fatal read error on socket transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x7f0a2d815ef0>
transport: <_SelectorSocketTransport fd=1557 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/selector_events.py", line 662, in _read_ready
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
<..>
Fatal read error on socket transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x7f0a30fa0c18>
transport: <_SelectorSocketTransport fd=3524 read=polling write=<polling, bufsize=10611>>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/selector_events.py", line 662, in _read_ready
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
Stats for 07.06.2018 11:14:48
tg: 357181 connects (974 current), 8927.98 MB
Stats for 07.06.2018 11:15:18
tg: 357339 connects (985 current), 8945.99 MB
Fatal read error on socket transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x7f0a30c5ff28>
transport: <_SelectorSocketTransport fd=1520 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/selector_events.py", line 662, in _read_ready
data = self._sock.recv(self.max_size)
TimeoutError: [Errno 110] Connection timed out
So, both send
and recv
despite the fix from 0778060#diff-e2b821dc5d96409f0102669d33aa8637R671
Unfortunately stacktrace doesn't say much on asyncio, so, my guess is that it fails somewhere during handshake.
And it looks like it causes socket leaks:
This peak to 40k was before latest patch (definitely leak) and what I have now is better, but it still grows.
Hi, When AD_TAG is set proxy not working anymore...
PORT = 3259
# name -> secret (32 hex chars)
USERS = {
"tg": "0123456789abcdef0123456789abcdef"
}
# Tag for advertising, obtainable from @MTProxybot
AD_TAG = "02b86204e28dfceda581080dd966179c"
hi
master.
you can select option for encrypt traffics with P2P or PGP ?
this option can help we for unban proxys
Can you fix windows specific loop please?
Common one only support 64 simultaneous connection
And windows specific one doesn't download photos
Thanks for this super script
Such errors often appear in the output. However, this doesn't seem to affect the quality of the connection.
Windows 10 Build 17692, Python 3.7.0
Fatal read error on pipe transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x000002A9FF98A940>
transport: <_ProactorSocketTransport fd=748>
Traceback (most recent call last):
File "C:\...\Python37\lib\asyncio\proactor_events.py", line 255, in _loop_reading
data = fut.result()
File "C:\...\Python37\lib\asyncio\windows_events.py", line 732, in _poll
value = callback(transferred, key, ov)
File "C:\...\Python37\lib\asyncio\windows_events.py", line 428, in finish_recv
return ov.getresult()
OSError: [WinError 121] The semaphore timeout period has expired
It would be nice to get rid of hardcoded telegram IPs
https://github.com/alexbers/mtprotoproxy/blob/master/mtprotoproxy.py#L75-L78
and use IPs from this URL https://core.telegram.org/getProxyConfig
statically or, better, download it periodically in background
Hello. I've tested this server software and it works great though if I send some file (Only one client was connected) the server CPU gets 100% load. I believe it is because of encryption, but I'm not python expert.
When more than a few people are connected, the proxy is interrupted by the following error :
Traceback (most recent call last):
File "mtprotoproxy.py", line 769, in
main()
File "mtprotoproxy.py", line 750, in main
loop.run_forever()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 523, in run_forever
self._run_once()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 1713, in _run_once
event_list = self._selector.select(timeout)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\selectors.py", line 323, in select
r, w, _ = self._select(self._readers, self._writers, [], timeout)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\selectors.py", line 314, in _select
r, w, x = select.select(r, w, w, timeout)
ValueError: too many file descriptors in select()
I tried to set PREFER_IPV6 = False
in config.py
but mtprotoproxy is still running on ipv6 interface.
Is it available to fully disable IPv6?
I get this error:
Failed to determine your ip, advertising disabled
i entered my ip here: ip_addrs = ["YOUR_IP"]
i can connect successfully to proxy but i don want get this error
whats problem? why my advertising disabled?
Hello! I wrote a simple ansible role for easy mtprotoproxy installation: https://github.com/rlex/ansible-role-mtprotoproxy
Might be useful for those who deploy bunch of proxies.
Also, is it possible to either move config.py to separate location (ie config.py.template) or maybe document mtprotoproxy.py arguments (ie that you can use config path after it to load something different than config.py)? It's not quite obvious and editing config.py while in working tree is not great idea, especially if you fetch changes pretty often.
Hi all
i install py3.7
on set channel advertising and run it return this error:
SSL handshake failed on verifying the certificate
protocol: <asyncio.sslproto.SSLProtocol object at 0x03313E10>
transport: <_ProactorSocketTransport fd=356 read=<_OverlappedFuture pending over
lapped=<pending, 0x356e398> cb=[_ProactorReadPipeTransport._loop_reading()]>>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 625, in _on_handshake_complete
raise handshake_exc
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verif
y failed: self signed certificate in certificate chain (_ssl.c:1045)
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x03313E10>
transport: <_ProactorSocketTransport closing fd=356>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verif
y failed: self signed certificate in certificate chain (_ssl.c:1045)
Error updating middle proxy list
SSL handshake failed on verifying the certificate
protocol: <asyncio.sslproto.SSLProtocol object at 0x0356AC10>
transport: <_ProactorSocketTransport fd=356 read=<_OverlappedFuture pending over
lapped=<pending, 0x3a12600> cb=[_ProactorReadPipeTransport._loop_reading()]>>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 625, in _on_handshake_complete
raise handshake_exc
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verif
y failed: self signed certificate in certificate chain (_ssl.c:1045)
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x0356AC10>
transport: <_ProactorSocketTransport closing fd=356>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verif
y failed: self signed certificate in certificate chain (_ssl.c:1045)
Error updating middle proxy list for IPv6
SSL handshake failed on verifying the certificate
protocol: <asyncio.sslproto.SSLProtocol object at 0x04085F70>
transport: <_ProactorSocketTransport fd=588 read=<_OverlappedFuture pending over
lapped=<pending, 0x40a68c0> cb=[_ProactorReadPipeTransport._loop_reading()]>>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 625, in _on_handshake_complete
raise handshake_exc
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verif
y failed: self signed certificate in certificate chain (_ssl.c:1045)
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x04085F70>
transport: <_ProactorSocketTransport closing fd=588>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslp
roto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", lin
e 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verif
y failed: self signed certificate in certificate chain (_ssl.c:1045)
Error updating middle proxy secret, using old
Fatal read error on pipe transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x0431F930>
transport: <_ProactorSocketTransport fd=592>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\proa
ctor_events.py", line 255, in _loop_reading
data = fut.result()
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\wind
ows_events.py", line 732, in _poll
value = callback(transferred, key, ov)
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\wind
ows_events.py", line 428, in finish_recv
return ov.getresult()
OSError: [WinError 121] The semaphore timeout period has expired
Fatal read error on pipe transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x02947A50>
transport: <_ProactorSocketTransport fd=588>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\proa
ctor_events.py", line 255, in _loop_reading
data = fut.result()
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\wind
ows_events.py", line 732, in _poll
value = callback(transferred, key, ov)
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\wind
ows_events.py", line 428, in finish_recv
return ov.getresult()
OSError: [WinError 121] The semaphore timeout period has expired
Exception in callback _ProactorBaseWritePipeTransport._loop_writing(<_Overlapped
Future cancelled>)
handle: <Handle _ProactorBaseWritePipeTransport._loop_writing(<_OverlappedFuture
cancelled>)>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\even
ts.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\proa
ctor_events.py", line 346, in _loop_writing
assert f is self._write_fut
AssertionError
Fatal read error on pipe transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x02947D50>
transport: <_ProactorSocketTransport fd=848>
Traceback (most recent call last):
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\proa
ctor_events.py", line 255, in _loop_reading
data = fut.result()
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\wind
ows_events.py", line 732, in _poll
value = callback(transferred, key, ov)
File "C:\Users\reza\AppData\Local\Programs\Python\Python37-32\lib\asyncio\wind
ows_events.py", line 428, in finish_recv
return ov.getresult()
OSError: [WinError 121] The semaphore timeout period has expired
I install pycrypto or pycryptodome on my machine, but the program doesn't see it and using AES.
Ubuntu 16.04
Hey! I would like to suggest you to use timeouts for read/write operations as I do, for example, for mtg.
The rationale is quite simple: we might have some harmful clients (even attackers) who can write, let's say, 32 bytes for initial connection and send nothing after that. In that case, we would have an open socket for the infinite amount of time which can lead to the resource leak. Also, it would be trivial to destroy the proxy in such a way (just imagine, a small fleet of 20-30 machines which will do that for the proxy). Also, it helps to disconnect stale clients.
For mtg, I found out that 30 seconds is enough to have a great user experience. Nobody notices such timeouts on generic usage but I see these timeouts from time to time in the logs.
Hello!
$ python3 mtprotoproxy.py
File "mtprotoproxy.py", line 242
async def read(self, n):
^
SyntaxError: invalid syntax
$ cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)
$ python3 --version
Python 3.4.8
$ python --version
Python 2.7.5
$ pip -V
pip 10.0.1 from /usr/lib/python3.4/site-packages/pip (python 3.4)
$ pip list
Package Version
------------ -------
pip 10.0.1
pycryptodome 3.6.4
setuptools 40.0.0
wheel 0.31.1
What am I missing?
i don't get any logs with
docker-compose logs
if i run
without docker - i get logs
Hi
What is the beta secret that starts with dd
? Does it enable the random padding feature?
Hello. Is there any ways to bind proxy to the interface or ip address? I have a lot of IPs on the server and the proxy use all of them after start so I want to limit it and bind to the dedicated IP address.
Fatal read error on pipe transport
protocol: <asyncio.streams.StreamReaderProtocol object at 0x03B24410>
transport: <_ProactorSocketTransport closing fd=536>
Traceback (most recent call last):
File "C:\Users-----\AppData\Local\Programs\Python\Python37-32\lib\asyncio\proactor_events.py", line 255, in _loop_reading
data = fut.result()
File "C:\Users-----\AppData\Local\Programs\Python\Python37-32\lib\asyncio\windows_events.py", line 732, in _poll
value = callback(transferred, key, ov)
File "C:\Users-----\AppData\Local\Programs\Python\Python37-32\lib\asyncio\windows_events.py", line 428, in finish_recv
return ov.getresult()
OSError: [WinError 121] The semaphore timeout period has expired
It looks like it's possible to multiplex many client -> proxy
connections into single proxy -> telegram
server connection based on RPC connection ID
Line 330 in ed227da
Line 358 in ed227da
You just have to maintain mapping between client -> proxy
and proxy -> telegram
sockets and send packets as a whole. And, probably, you will need to have some kind of proxy -> telegram
connection pool (separate pool for each dc_id
)
Is there a limit to maximum secrets? Docker says it supports up to 16 secrets.
Running latest master and Telegram X 0.20.10.933-arm64-v8a, logcat shows nothing useful :(
After making 'systemctl status MTProxy' I noticed these messages:
Aug 03 22:43:28 ubuntu python3.7[984]: Unable to connect to 149.154.175.50 443
Aug 03 22:43:28 ubuntu python3.7[984]: Unable to connect to 149.154.175.100 443
Aug 03 22:43:36 ubuntu python3.7[984]: Unable to connect to 149.154.175.100 443
Aug 03 22:43:36 ubuntu python3.7[984]: Unable to connect to 149.154.175.50 443
Aug 03 22:43:44 ubuntu python3.7[984]: Unable to connect to 149.154.175.100 443
Aug 03 22:43:44 ubuntu python3.7[984]: Unable to connect to 149.154.175.50 443
Aug 03 22:43:52 ubuntu python3.7[984]: Unable to connect to 149.154.175.50 443
Aug 03 22:43:52 ubuntu python3.7[984]: Unable to connect to 149.154.175.100 443
Aug 03 22:44:00 ubuntu python3.7[984]: Unable to connect to 149.154.175.100 443
Aug 03 22:44:00 ubuntu python3.7[984]: Unable to connect to 149.154.175.50 443
Is it some VPS-side problem or may be something wrong with those telegram servers?
hi in 24 hours my ip filtered how can stop it??
is it possible to fully disable normal mode and ENABLE RANDOM PADDING mode ONLY . if some users connect without random padding don't serv them or block their ip address .
because without random padding , server will be detect by ISP and IP of server will fully block in whole country.
some users don't using 'dd' i don't know why . if i add 'dd' they manualy remove it !!! and cause server BAN !
everytime afew users cause the whole server block ! i need to block those users .
thanks for this project
Hi there I saw some mtproxies can show a channel as ads how i can add that?
DD and ipv6 support, implement in this proxy?
Hello, I am using this script for installing mtproto and when I try to connect to it the client starts trying to connect and it changes state between online and connecting and never connects.
I have checked my firewall and opened the port but no success.
the proxy was working without any problem til this morning.
after i run the proxy is works for one minute or so then crashes with this error:
Task exception was never retrieved future: <Task finished coro=<IocpProactor.accept.<locals>.accept_coro() done, defined at C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\asyncio\windows_events.py:496> exception=OSError(22, 'The specified network name is no longer available', None, 64, None)> Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\asyncio\windows_events.py", line 499, in accept_coro await future File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\asyncio\windows_events.py", line 732, in _poll value = callback(transferred, key, ov) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\asyncio\windows_events.py", line 488, in finish_accept ov.getresult() OSError: [WinError 64] The specified network name is no longer available Accept failed on a socket socket: <socket.socket fd=612, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('0.0.0.0', 6969)> Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\asyncio\proactor_events.py", line 637, in loop conn, addr = f.result() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\asyncio\windows_events.py", line 499, in accept_coro await future File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\asyncio\windows_events.py", line 732, in _poll value = callback(transferred, key, ov) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\asyncio\windows_events.py", line 488, in finish_accept ov.getresult() OSError: [WinError 64] The specified network name is no longer available
I have the server running on a dual core and 4 GO RAM, but the problem is the time that it takes to connect to the proxy is too much, sometimes the ping is 3xxx ms. but after connecting, the speed is charming.
I have even tried to set
FAST_MODE = True
But no luck, the server is super fast at ping running other MTproto server implementations.
Anyone with the same problem or a tip?
Command to run: sudo docker-compose up --build -d
.
Output:
4ace7a4bf7b0_proxy_mtprotoproxy_1 | Traceback (most recent call last):
4ace7a4bf7b0_proxy_mtprotoproxy_1 | File "./mtprotoproxy.py", line 1014, in <module>
4ace7a4bf7b0_proxy_mtprotoproxy_1 | main()
4ace7a4bf7b0_proxy_mtprotoproxy_1 | File "./mtprotoproxy.py", line 987, in main
4ace7a4bf7b0_proxy_mtprotoproxy_1 | server_v4 = loop.run_until_complete(task_v4)
4ace7a4bf7b0_proxy_mtprotoproxy_1 | File "/usr/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
4ace7a4bf7b0_proxy_mtprotoproxy_1 | return future.result()
4ace7a4bf7b0_proxy_mtprotoproxy_1 | File "/usr/lib/python3.6/asyncio/streams.py", line 113, in start_server
4ace7a4bf7b0_proxy_mtprotoproxy_1 | return (yield from loop.create_server(factory, host, port, **kwds))
4ace7a4bf7b0_proxy_mtprotoproxy_1 | File "/usr/lib/python3.6/asyncio/base_events.py", line 1047, in create_server
4ace7a4bf7b0_proxy_mtprotoproxy_1 | % (sa, err.strerror.lower()))
4ace7a4bf7b0_proxy_mtprotoproxy_1 | PermissionError: [Errno 13] error while attempting to bind on address ('0.0.0.0', 443): permission denied
Official proxy binds fine on 443 port (on the same server).
Subj.
AD_TAG has disabled.
Additional info: Proxy working on IPV6 address, pycrypto&pycryptodome don't installed (yet), because proxy working on mips.
/removed
How can I run multiple mtproto servers simultaneously on different ports and different secrets and different channel_tags with multiple configs?
When I build the second one with docker-compose it erases the first one.
Hi. When I use official mtproxy on the client it shows about 70ms ping. But when I use mtprotoproxy installed on the same server my client shows about 230ms ping. It’s about four times slower! Could someone explain why?
i try to run this script in my windows server 2012
it worked and my proxy installed but when i restart CMD and run again script by this command (python mtprotoproxy.py) i get this error :
f (beta)
Traceback (most recent call last):
File "mtprotoproxy.py", line 1134, in
main()
File "mtprotoproxy.py", line 1107, in main
server_v4 = loop.run_until_complete(task_v4)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asynci
o\base_events.py", line 568, in run_until_complete
return future.result()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asynci
o\streams.py", line 114, in start_server
return await loop.create_server(factory, host, port, **kwds)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\asynci
o\base_events.py", line 1361, in create_server
% (sa, err.strerror.lower())) from None
OSError: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 8580): only one usage of each socket address (protocol/network address/port) is nor
mally permitted
For some reason, I have to run on port 8580
How can i fix this error?
hello.i want to know is there way to limit the number of users that use a specific secret.for example only 32 people can use a specific secret.
if not,i don't know how to do it and i'm not familiar with mtproto proxy scheme.but i can change the code(and maybe PR if my code is usable).But i do need some help.
should it be limited by the number of IP's that are connected to a secret or do we have a ID for every single USER that connects to the secret?(and by secret i mean single secret not the whole proxy)
also can you hint me the lines that accept a connection,process them,where are open connection saved?
when i was run mtprotoproxy i got this error:
root@xxxxxx:/opt/mtprotoproxy# python3 mtprotoproxy.py File "mtprotoproxy.py", line 159 async def read(self, n): ^ SyntaxError: invalid syntax
root@DeaD:~/mtprotoproxy# docker-compose up --build -d
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 9, in
load_entry_point('docker-compose==1.8.0', 'console_scripts', 'docker-compose')()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2569, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2229, in load
return self.resolve()
File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 2235, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python2.7/dist-packages/compose/cli/main.py", line 14, in
from . import errors
File "/usr/lib/python2.7/dist-packages/compose/cli/errors.py", line 9, in
from docker.errors import APIError
File "/usr/lib/python2.7/dist-packages/docker/init.py", line 20, in
from .client import Client, AutoVersionClient, from_env # flake8: noqa
File "/usr/lib/python2.7/dist-packages/docker/client.py", line 18, in
import requests
File "/usr/lib/python2.7/dist-packages/requests/init.py", line 53, in
from .packages.urllib3.contrib import pyopenssl
File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 54, in
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
Hi,
After switching to version 1.0.0, I found, that clients may transfer data with less 250Kb/s. Version 0.9.5 executed on the same machine in separate docker provide 2,5Mb/s.
I changed size of buffer TO_CLT_BUFSIZE = 16384 via config.py and speed was improved to 510Kb/s (v1.0.0).
Both tests was done on the same physical machine, with different docker containers, the same secrets and the same clients(desktop and Android). If I switch to "secure" secret, I've also get less performance rate(v1.0.0).
Have you got any suggestions, why new version may be slower on the same secrets?
@alexbers Hi, can you talk to me on the telegram?
Hi dear @alexbers .
As you mentioned in this issue:
TelegramMessenger/MTProxy#31
I wonder if you can help me with installation process.
I know how to install python in Windows.
But i Do not know how to install this source code on windows.
Please give me the commands that i can install&launch mtprotoproxy in Python(windows).
I’ll do my best to publish your REP and make it to the most known mtproxy source code.
Regards,
Reza
i need to monitor proxies and see the number of users of them. how can i do that?
MTProxy Bot never show me stats:
Sorry, we don't have stats for your proxy yet. Please come back later.
I changed port and secret key and tag but problem is remaining
I have another server and stats working fine
But in my new server i have stat problem
Hi, guys!
So, I did notice lately that all of our proxies are showing currently without any ads, even thought we didn't made any changes. The only thing which we made is change IP address several times for each domain.
There is still the same AD_TAG and domain is added via Telegram bot.
I tried to remove and add the proxy via bot, but it does not help and you get the same AD_TAG.
#UPD Seems like ads disappear after you change IP for a proxy domain, any workaround?
Solution: Seems like you have to remove promotion, then add it again. It may take several hours.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.