diff --git a/pyrogram/connection/transport/tcp/tcp_intermediate.py b/pyrogram/connection/transport/tcp/tcp_intermediate.py index 55a7d071..d99ca463 100644 --- a/pyrogram/connection/transport/tcp/tcp_intermediate.py +++ b/pyrogram/connection/transport/tcp/tcp_intermediate.py @@ -27,22 +27,15 @@ log = logging.getLogger(__name__) class TCPIntermediate(TCP): def __init__(self, proxy: dict): super().__init__(proxy) - self.is_first_packet = None def connect(self, address: tuple): super().connect(address) - self.is_first_packet = True + super().sendall(b"\xee" * 4) + log.info("Connected{}!".format(" with proxy" if self.proxy_enabled else "")) def sendall(self, data: bytes, *args): - length = len(data) - data = pack(" bytes or None: length = super().recvall(4) @@ -50,4 +43,4 @@ class TCPIntermediate(TCP): if length is None: return None - return super().recvall(unpack("