2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-26 20:07:27 +00:00

Use port 443 for production servers

This commit is contained in:
Dan 2018-04-11 23:21:14 +02:00
parent eeb89e4161
commit 1736a8ea9b
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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)