mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Fix incorrect sending of DC id when connecting to MTProxy
This commit is contained in:
@@ -38,7 +38,6 @@ class ConnectionTcpObfuscated(ConnectionTcpAbridged):
|
||||
break
|
||||
|
||||
random = bytearray(random)
|
||||
random[56] = random[57] = random[58] = random[59] = 0xef
|
||||
random_reversed = random[55:7:-1] # Reversed (8, len=48)
|
||||
|
||||
# Encryption has "continuous buffer" enabled
|
||||
@@ -50,7 +49,9 @@ class ConnectionTcpObfuscated(ConnectionTcpAbridged):
|
||||
self._aes_encrypt = AESModeCTR(encrypt_key, encrypt_iv)
|
||||
self._aes_decrypt = AESModeCTR(decrypt_key, decrypt_iv)
|
||||
|
||||
random[56:60] = b'\xef\xef\xef\xef'
|
||||
random[56:64] = self._compose_tail(bytes(random))
|
||||
|
||||
self._writer.write(random)
|
||||
await self._writer.drain()
|
||||
|
||||
|
Reference in New Issue
Block a user