From ab42230f9fe8069e37211bb2287b31c39e3937a6 Mon Sep 17 00:00:00 2001 From: TheArtificialQ Date: Wed, 1 Jul 2026 11:03:06 +0200 Subject: [PATCH] feat: add Docker network support for sandbox connections - handling host network --- strix/runtime/session_manager.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/strix/runtime/session_manager.py b/strix/runtime/session_manager.py index 46c2f21b..b38ba00c 100644 --- a/strix/runtime/session_manager.py +++ b/strix/runtime/session_manager.py @@ -115,9 +115,13 @@ async def create_or_reuse( docker_network=docker_network, ) - caido_endpoint = await session.resolve_exposed_port(_CONTAINER_CAIDO_PORT) - host_caido_url = f"http://{caido_endpoint.host}:{caido_endpoint.port}" - logger.debug("Caido host endpoint resolved: %s", host_caido_url) + if docker_network and docker_network.strip().lower() == "host": + host_caido_url = f"http://127.0.0.1:{_CONTAINER_CAIDO_PORT}" + logger.debug("Caido host endpoint selected for host network: %s", host_caido_url) + else: + caido_endpoint = await session.resolve_exposed_port(_CONTAINER_CAIDO_PORT) + host_caido_url = f"http://{caido_endpoint.host}:{caido_endpoint.port}" + logger.debug("Caido host endpoint resolved: %s", host_caido_url) caido_client = await bootstrap_caido( session,