diff --git a/pyrogram/connection/connection.py b/pyrogram/connection/connection.py index 02f57efc..509cd10d 100644 --- a/pyrogram/connection/connection.py +++ b/pyrogram/connection/connection.py @@ -32,8 +32,8 @@ class Connection: 2: TCPIntermediate } - def __init__(self, ipv4: str, proxy: type, mode: int = 1): - self.address = (ipv4, 80) + def __init__(self, address: tuple, proxy: type, mode: int = 1): + self.address = address self.proxy = proxy self.mode = self.MODES.get(mode, TCPAbridged) self.lock = threading.Lock() diff --git a/pyrogram/session/internals/data_center.py b/pyrogram/session/internals/data_center.py index 369e5bce..232ca13b 100644 --- a/pyrogram/session/internals/data_center.py +++ b/pyrogram/session/internals/data_center.py @@ -35,4 +35,4 @@ class DataCenter: } def __new__(cls, dc_id: int, test_mode: bool): - return cls.TEST[dc_id] if test_mode else cls.PROD[dc_id] + return (cls.TEST[dc_id], 80) if test_mode else (cls.PROD[dc_id], 443)