feat: implement self-hosted scripts and agent binary proxy with tar.gz conversion

This commit is contained in:
Bot
2026-05-11 17:39:37 +08:00
parent 3319d7344f
commit 3d00f09493
7 changed files with 640 additions and 3 deletions
+3 -1
View File
@@ -60,6 +60,9 @@ func routers(r *gin.Engine, frontendDist fs.FS) {
api.POST("/login", authMiddleware.LoginHandler)
api.GET("/oauth2/:provider", commonHandler(oauth2redirect))
r.GET("/script/:name", serveScript)
r.GET("/script/bin/:os/:arch", serveAgentBinary)
fallbackAuthMw := fallbackAuthMiddleware(authMiddleware)
fallbackAuth := api.Group("", fallbackAuthMw)
fallbackAuth.GET("/setting", commonHandler(listConfig))
@@ -83,7 +86,6 @@ func routers(r *gin.Engine, frontendDist fs.FS) {
auth.GET("/refresh-token", authMiddleware.RefreshHandler)
auth.GET("/file", commonHandler(createFM))
auth.GET("/ws/file/:id", commonHandler(fmStream))