mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix ws console and packet capture over SSL
This commit is contained in:
1 parent
13630179b2
commit
61dede72f9
2 files changed
+5
-2
No files matched your search
@@ -541,7 +541,7 @@ async def ws_console(
|
||||
pass
|
||||
|
||||
ws_console_compute_url = (
|
||||
f"ws://{compute_host}:{compute.port}/v3/compute/projects/"
|
||||
f"{websocket.url.scheme}://{compute_host}:{compute.port}/v3/compute/projects/"
|
||||
f"{node.project.id}/{node.node_type}/nodes/{node.id}/console/ws"
|
||||
)
|
||||
|
||||
@@ -575,7 +575,8 @@ async def ws_console(
|
||||
auth = aiohttp.BasicAuth(user, password.get_secret_value(), "utf-8")
|
||||
else:
|
||||
auth = aiohttp.BasicAuth(user, "")
|
||||
async with HTTPClient.get_client().ws_connect(ws_console_compute_url, auth=auth) as ws:
|
||||
ssl_context = Controller.instance().ssl_context()
|
||||
async with HTTPClient.get_client().ws_connect(ws_console_compute_url, auth=auth, ssl_context=ssl_context) as ws:
|
||||
asyncio.ensure_future(ws_receive(ws))
|
||||
async for msg in ws:
|
||||
if msg.type == aiohttp.WSMsgType.TEXT:
|
||||
|
||||
Reference in new issue
Block a user