From cce13f682d3c09bfe7058250f585eebd0741a5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=B5=E5=91=B5=E3=81=A7=E3=81=99?= <51957264+shoucandanghehe@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:28:51 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Feature:=20=E6=B7=BB=E5=8A=A0=20we?= =?UTF-8?q?bsockets=20=E9=A9=B1=E5=8A=A8=E5=99=A8=20proxy=20=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E8=AD=A6=E5=91=8A=20(#2916)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> --- nonebot/drivers/websockets.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nonebot/drivers/websockets.py b/nonebot/drivers/websockets.py index 826e7994..4790f22d 100644 --- a/nonebot/drivers/websockets.py +++ b/nonebot/drivers/websockets.py @@ -69,6 +69,8 @@ class Mixin(WebSocketClientMixin): @override @asynccontextmanager async def websocket(self, setup: Request) -> AsyncGenerator["WebSocket", None]: + if setup.proxy is not None: + logger.warning("proxy is not supported by websockets driver") connection = Connect( str(setup.url), extra_headers={**setup.headers, **setup.cookies.as_header(setup)},