Полная зачистка legacy + закрытие fix24.1/fix24.2 + обновление логотипа
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"hy2xs-admin/controller"
|
||||
)
|
||||
|
||||
func initAccountAdminRouter(accountApi *gin.RouterGroup) {
|
||||
account := accountApi.Group("/account")
|
||||
{
|
||||
account.GET("/pageAccount", controller.PageAccount)
|
||||
account.POST("/saveAccount", controller.SaveAccount)
|
||||
account.POST("/deleteAccount", controller.DeleteAccount)
|
||||
account.POST("/updateAccount", controller.UpdateAccount)
|
||||
account.POST("/resetTraffic", controller.ResetTraffic)
|
||||
account.GET("/getAccountInfo", controller.GetAccountInfo)
|
||||
account.GET("/getAccount", controller.GetAccount)
|
||||
account.POST("/importAccount", controller.ImportAccount)
|
||||
account.POST("/exportAccount", controller.ExportAccount)
|
||||
account.POST("/releaseKickAccount", controller.ReleaseKickAccount)
|
||||
account.GET("/verifyDefaultPass", controller.VerifyDefaultPass)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"hy2xs-admin/controller"
|
||||
)
|
||||
|
||||
func initAdminRouter(adminApi *gin.RouterGroup) {
|
||||
admin := adminApi.Group("/admin")
|
||||
{
|
||||
admin.GET("/me", controller.AdminMe)
|
||||
admin.POST("/change-password", controller.AdminChangePassword)
|
||||
admin.GET("/verify-default-pass", controller.VerifyDefaultPass)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"hy2xs-admin/controller"
|
||||
)
|
||||
|
||||
func initDashboardRouter(api *gin.RouterGroup) {
|
||||
dashboard := api.Group("/dashboard")
|
||||
{
|
||||
dashboard.GET("/summary", controller.DashboardSummary)
|
||||
dashboard.GET("/timeseries", controller.DashboardTimeseries)
|
||||
dashboard.GET("/top-peers", controller.DashboardTopPeers)
|
||||
dashboard.GET("/security", controller.DashboardSecurity)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ func initHysteria2Router(hysteria2Api *gin.RouterGroup) {
|
||||
hysteria2.POST("/hysteria2Kick", controller.Hysteria2Kick)
|
||||
hysteria2.POST("/hysteria2ChangeVersion", controller.Hysteria2ChangeVersion)
|
||||
hysteria2.GET("/listRelease", controller.ListRelease)
|
||||
hysteria2.GET("/hysteria2SubscribeUrl", controller.Hysteria2SubscribeUrl)
|
||||
hysteria2.GET("/hysteria2Url", controller.Hysteria2Url)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"hy2xs-admin/controller"
|
||||
)
|
||||
|
||||
func initMonitorRouter(accountApi *gin.RouterGroup) {
|
||||
account := accountApi.Group("/monitor")
|
||||
{
|
||||
account.GET("/monitorSystem", controller.MonitorSystem)
|
||||
account.GET("/monitorHysteria2", controller.MonitorHysteria2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"hy2xs-admin/controller"
|
||||
)
|
||||
|
||||
func initPeerRouter(peerApi *gin.RouterGroup) {
|
||||
peers := peerApi.Group("/peers")
|
||||
{
|
||||
peers.GET("", controller.PagePeer)
|
||||
peers.POST("", controller.SavePeer)
|
||||
peers.GET("/:id", controller.GetPeer)
|
||||
peers.PATCH("/:id", controller.UpdatePeer)
|
||||
peers.DELETE("/:id", controller.DeletePeer)
|
||||
|
||||
peers.POST("/:id/reset-traffic", controller.ResetTraffic)
|
||||
peers.POST("/:id/release-kick", controller.ReleaseKickPeer)
|
||||
peers.POST("/:id/kick", controller.Hysteria2Kick)
|
||||
peers.POST("/import", controller.ImportPeer)
|
||||
peers.POST("/export", controller.ExportPeer)
|
||||
|
||||
// совместимость с текущим transport-форматом (query accountId)
|
||||
peers.GET("/:id/client-url", controller.Hysteria2Url)
|
||||
peers.GET("/:id/qr", controller.Hysteria2Url)
|
||||
}
|
||||
}
|
||||
@@ -61,9 +61,10 @@ func Router(router *gin.Engine, huiWebContext *string) {
|
||||
middleware.JWTHandler(),
|
||||
middleware.AdminHandler(),
|
||||
)
|
||||
initAccountAdminRouter(huiAdminApi)
|
||||
initAdminRouter(huiAdminApi)
|
||||
initDashboardRouter(huiAdminApi)
|
||||
initPeerRouter(huiAdminApi)
|
||||
initConfigRouter(huiAdminApi)
|
||||
initHysteria2Router(huiAdminApi)
|
||||
initLogRouter(huiAdminApi)
|
||||
initMonitorRouter(huiAdminApi)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user