mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-08 17:13:56 +00:00
#65 bug fix with no proxy_auth
This commit is contained in:
parent
acdcd1455f
commit
734623ae71
1 changed files with 5 additions and 3 deletions
|
|
@ -63,9 +63,11 @@ class BaseBot:
|
|||
from aiohttp_socks.helpers import parse_socks_url
|
||||
|
||||
socks_ver, host, port, username, password = parse_socks_url(proxy)
|
||||
if proxy_auth and not username or password:
|
||||
username = proxy_auth.login
|
||||
password = proxy_auth.password
|
||||
if proxy_auth:
|
||||
if not username:
|
||||
username = proxy_auth.login
|
||||
if not password:
|
||||
password = proxy_auth.password
|
||||
|
||||
connector = SocksConnector(socks_ver=socks_ver, host=host, port=port,
|
||||
username=username, password=password,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue