mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-04 14:24:51 +00:00
Update tcp.py
This commit is contained in:
parent
ab45707f0f
commit
8b87c6ace3
1 changed files with 2 additions and 9 deletions
|
|
@ -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 a new issue