mirror of
https://github.com/usestrix/strix.git
synced 2026-10-13 03:57:59 +00:00
feat: add Docker network support for sandbox connections - handling host network
This commit is contained in:
parent
3e4372d6f5
commit
ab42230f9f
1 changed files with 7 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue