I need to get the proxy from the proxy.txt file:
ip:port:username:password
and add to the code:
file = dbm_base()
api_id = int(file['api_id4'].decode())
api_hash = file['api_hash4'].decode()
client = TelegramClient('client4', api_id, api_hash, proxy=(socks.SOCKS5, 'ip', port, 'username', 'password'))#port without ''
I doing this:
with open('proxy.txt', 'r') as f:
proxys = f.readline().split(":")
file = dbm_base()
api_id = int(file['api_id4'].decode())
api_hash = file['api_hash4'].decode()
s = socks.socksocket()
client = TelegramClient('client1', api_id, api_hash, proxy=s.set_proxy(socks.HTTP, f'{proxys[0]}', int(proxys[1]), f'{proxys[2]}', f'{proxys[3]}'))
But the proxy server does not connect to the script.
What did I do wrong and why is the proxy server not connecting?