mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Update tcp.py
This commit is contained in:
parent
ab45707f0f
commit
8b87c6ace3
@ -20,11 +20,7 @@ import asyncio
|
|||||||
import ipaddress
|
import ipaddress
|
||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
|
import socks
|
||||||
try:
|
|
||||||
import socks
|
|
||||||
except ImportError:
|
|
||||||
socks = None
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -43,10 +39,7 @@ class TCP:
|
|||||||
|
|
||||||
self.loop = asyncio.get_event_loop()
|
self.loop = asyncio.get_event_loop()
|
||||||
|
|
||||||
if proxy and not socks:
|
if proxy:
|
||||||
log.warning("Can't use proxy because pysocks is not installed")
|
|
||||||
|
|
||||||
if proxy and socks:
|
|
||||||
hostname = proxy.get("hostname")
|
hostname = proxy.get("hostname")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user