mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Fix connection to proxy
Fix the proxy bug. Signed-off-by: wulan17 <wulan17@komodos.id>
This commit is contained in:
parent
b8028541c9
commit
921b593285
1 changed files with 3 additions and 4 deletions
|
|
@ -21,6 +21,7 @@ import asyncio
|
|||
import ipaddress
|
||||
import logging
|
||||
import socket
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from typing import Tuple, Dict, TypedDict, Optional
|
||||
|
||||
import socks
|
||||
|
|
@ -91,10 +92,8 @@ class TCP:
|
|||
)
|
||||
sock.settimeout(TCP.TIMEOUT)
|
||||
|
||||
await self.loop.sock_connect(
|
||||
sock=sock,
|
||||
address=destination
|
||||
)
|
||||
with ThreadPoolExecutor() as executor:
|
||||
await self.loop.run_in_executor(executor, sock.connect, destination)
|
||||
|
||||
sock.setblocking(False)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue