mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fixed socks proxy usage
This commit is contained in:
parent
e2f428ea46
commit
c0353b802d
1 changed files with 2 additions and 2 deletions
|
|
@ -74,9 +74,9 @@ class BaseBot:
|
|||
|
||||
if isinstance(proxy, str) and (proxy.startswith('socks5://') or proxy.startswith('socks4://')):
|
||||
from aiohttp_socks import SocksConnector
|
||||
from aiohttp_socks.helpers import parse_socks_url
|
||||
from aiohttp_socks.utils import parse_proxy_url
|
||||
|
||||
socks_ver, host, port, username, password = parse_socks_url(proxy)
|
||||
socks_ver, host, port, username, password = parse_proxy_url(proxy)
|
||||
if proxy_auth:
|
||||
if not username:
|
||||
username = proxy_auth.login
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue