manag veth directly with sniffer
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 10s

This commit is contained in:
2026-03-07 15:38:56 +01:00
parent a282b89d45
commit 264da68f11
7 changed files with 257 additions and 56 deletions

View File

@@ -75,6 +75,13 @@ async def on_startup() -> None:
@app.on_event("shutdown")
async def shutdown_event() -> None:
"""Stop network resources and release shared runtime objects."""
try:
from src.network_sniffer import stop_afpacket_sniffer
stop_afpacket_sniffer()
except Exception:
logging.exception("Failed to stop sniffer sessions during shutdown")
try:
network_api.shutdown_network_api()
except Exception:
@@ -87,6 +94,13 @@ async def shutdown_event() -> None:
except Exception:
logging.exception("Failed to stop bridge telemetry collector")
try:
from src.utilities.capture_pipeline import capture_pipeline_manager
capture_pipeline_manager.stop_all()
except Exception:
logging.exception("Failed to stop capture pipelines")
try:
from src.utilities.packet_tracker import packet_tracker