mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Add proxy support using PySocks (closes #37)
This commit is contained in:
@@ -7,8 +7,8 @@ from telethon.utils import BinaryWriter
|
||||
|
||||
|
||||
class TcpTransport:
|
||||
def __init__(self, ip_address, port):
|
||||
self.tcp_client = TcpClient()
|
||||
def __init__(self, ip_address, port, proxy=None):
|
||||
self.tcp_client = TcpClient(proxy)
|
||||
self.send_counter = 0
|
||||
|
||||
self.tcp_client.connect(ip_address, port)
|
||||
|
Reference in New Issue
Block a user