refactor(backend): modularize web proxy into service layer with complete swagger docs

This commit is contained in:
pycook
2025-07-30 23:26:41 +08:00
parent 03d1483f9f
commit dd11bf67ce
9 changed files with 2053 additions and 585 deletions

View File

@@ -254,7 +254,13 @@ func SetupRouter(r *gin.Engine) {
// Web proxy management API routes
webProxyGroup := v1.Group("/web_proxy")
{
webProxyGroup.GET("/config/:asset_id", webProxy.GetWebAssetConfig)
webProxyGroup.POST("/start", webProxy.StartWebSession)
webProxyGroup.GET("/external_redirect", webProxy.HandleExternalRedirect)
webProxyGroup.POST("/close", webProxy.CloseWebSession)
webProxyGroup.GET("/sessions/:asset_id", webProxy.GetActiveWebSessions)
webProxyGroup.POST("/heartbeat", webProxy.UpdateWebSessionHeartbeat)
webProxyGroup.POST("/cleanup", webProxy.CleanupWebSession)
}
}
}