Support connection timeout

This commit is contained in:
Lonami Exo
2018-10-04 16:39:57 +02:00
parent 0cc8bca098
commit db83709c6b
9 changed files with 30 additions and 22 deletions

View File

@@ -22,8 +22,8 @@ class ConnectionTcpObfuscated(ConnectionTcpAbridged):
async def _read(self, n):
return self._aes_decrypt.encrypt(await self._reader.readexactly(n))
async def connect(self):
await Connection.connect(self)
async def connect(self, timeout=None):
await Connection.connect(self, timeout=timeout)
# Obfuscated messages secrets cannot start with any of these
keywords = (b'PVrG', b'GET ', b'POST', b'\xee\xee\xee\xee')