mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
feat(proxy): proxy for aiohttp,base sessions (#284)
* feat(proxy): proxy for aiohttp,base sessions Add support for proxies in aiohttp session with aiohttp_socks library, edit BaseSession class to support proxies for other sessions in future. * fix(annotation): missing underscore before "private" typevar * chore: remove redundant of proxy_url schema for socks version * test: add missing test Add missing test, remove BaseSession.cfg and switch to implementing class' "private" traits, add aiohttp_socks in dependency list as optional and extra. * feat(session): Implement asyncio session for requests [wip] * feat(proxy chain): Chained proxy support in aiohttp session Add ChainProxyConnector support, !pin pydantic to "1.4", add documentation on aiohttp connector. * style(mypy): apply linter changes * tests(mock): remove await for magic mock * fix dangling dependency * refactor(generic): get rid of generic behaviour for base session
This commit is contained in:
parent
2553f5f19e
commit
15bcc0ba9f
8 changed files with 245 additions and 8 deletions
|
|
@ -39,6 +39,7 @@ Babel = "^2.7"
|
|||
aiofiles = "^0.4.0"
|
||||
uvloop = {version = "^0.14.0", markers = "sys_platform == 'darwin' or sys_platform == 'linux'", optional = true}
|
||||
async_lru = "^1.0"
|
||||
aiohttp-socks = {version = "^0.3.8", optional = true}
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
uvloop = {version = "^0.14.0", markers = "sys_platform == 'darwin' or sys_platform == 'linux'"}
|
||||
|
|
@ -63,9 +64,11 @@ pymdown-extensions = "^6.1"
|
|||
lxml = "^4.4"
|
||||
ipython = "^7.10"
|
||||
markdown-include = "^0.5.1"
|
||||
aiohttp-socks = "^0.3.4"
|
||||
|
||||
[tool.poetry.extras]
|
||||
fast = ["uvloop"]
|
||||
proxy = ["aiohttp-socks"]
|
||||
|
||||
[tool.black]
|
||||
line-length = 99
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue