Is it possible to use http proxy with credentials? As we use pysocks it doesn't have ability to use credentials with http/https proxy, only with socks.
client = TelegramClient('19852561722', api_id, api_hash, proxy=(socks.HTTP, 'zproxy.luminati.io', 22225, 'lum-customer-zone-us_zone', 'jgnm7p3ngww1'))
client.connect()
Raises error socks.GeneralProxyError: Socket error: 407: Proxy Authentication Required
I don't know very well how proxies work. All I know is the library can't connect to Telegram's servers by using their HTTP mode yet. It's probably possible to use an HTTP proxy to wrap an arbitrary TCP connection. This seems more like a question you should post to https://github.com/Anorov/PySocks.
I use this to work with proxies
clientP = TelegramClient(phone_number, api_id, api_hash,
proxy=(socks.HTTP, '15.151.70.83', 8000, True, 'log', 'pass'),
timeout=timedelta(seconds=15))
@adv-zl seems like you're missing that True between the port and the login. Thanks @Lerbytech!
Most helpful comment
I use this to work with proxies