This commit is contained in:
eric
2026-03-28 13:27:53 -05:00
parent d34ecab19c
commit 8053c4cb6d
48 changed files with 3527 additions and 1433 deletions

12
web.py
View File

@@ -34,6 +34,7 @@ from src.control_plane import (
system_snapshot,
write_root_file,
)
from src.hub_routes import configure_hub, router as hub_router
from src.web_process_backend import WebProcessBackend, force_kill_ffmpeg, strip_ansi_codes
# ---------------- 配置(根目录结构) ----------------
@@ -176,6 +177,9 @@ async def lifespan(app: FastAPI):
app = FastAPI(title="多进程录制控制台", lifespan=lifespan)
configure_hub(process_backend, list(PROCESS_MONITOR))
app.include_router(hub_router)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
@@ -634,6 +638,14 @@ async def shellcrash_page():
return await index()
@app.get("/console", include_in_schema=False)
async def console_page():
route_file = _console_route_html("console")
if route_file:
return FileResponse(route_file)
return await index()
@app.get("/android", include_in_schema=False)
async def android_page():
route_file = _console_route_html("android")