mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Add support for proxy again
This commit is contained in:
@@ -10,12 +10,12 @@ class ConnectionTcpFull(Connection):
|
||||
Default Telegram mode. Sends 12 additional bytes and
|
||||
needs to calculate the CRC value of the packet itself.
|
||||
"""
|
||||
def __init__(self, ip, port, *, loop):
|
||||
super().__init__(ip, port, loop=loop)
|
||||
def __init__(self, ip, port, *, loop, proxy=None):
|
||||
super().__init__(ip, port, loop=loop, proxy=proxy)
|
||||
self._send_counter = 0
|
||||
|
||||
async def connect(self, timeout=None):
|
||||
await super().connect(timeout=timeout)
|
||||
async def connect(self, timeout=None, ssl=None):
|
||||
await super().connect(timeout=timeout, ssl=ssl)
|
||||
self._send_counter = 0 # Important or Telegram won't reply
|
||||
|
||||
def _send(self, data):
|
||||
|
Reference in New Issue
Block a user