Полный продакшен-рефактор fix25: split peer/admin, удаление legacy, шифрование secret, auth_id, новые API/роуты и зачистка subscription

This commit is contained in:
2026-05-09 00:27:45 +05:00
parent e60594e09e
commit d73bab99ec
34 changed files with 930 additions and 1673 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ func initAdminRouter(adminApi *gin.RouterGroup) {
{
admin.GET("/me", controller.AdminMe)
admin.POST("/change-password", controller.AdminChangePassword)
admin.GET("/verify-default-pass", controller.VerifyDefaultPass)
admin.GET("/security", controller.AdminSecurity)
}
}
-2
View File
@@ -15,9 +15,7 @@ func initHysteria2MachineAuthRouter(hysteria2Api *gin.RouterGroup) {
func initHysteria2Router(hysteria2Api *gin.RouterGroup) {
hysteria2 := hysteria2Api.Group("/hysteria2")
{
hysteria2.POST("/hysteria2Kick", controller.Hysteria2Kick)
hysteria2.POST("/hysteria2ChangeVersion", controller.Hysteria2ChangeVersion)
hysteria2.GET("/listRelease", controller.ListRelease)
hysteria2.GET("/hysteria2Url", controller.Hysteria2Url)
}
}
+5 -4
View File
@@ -16,12 +16,13 @@ func initPeerRouter(peerApi *gin.RouterGroup) {
peers.POST("/:id/reset-traffic", controller.ResetTraffic)
peers.POST("/:id/release-kick", controller.ReleaseKickPeer)
peers.POST("/:id/kick", controller.Hysteria2Kick)
peers.POST("/:id/kick", controller.KickPeer)
peers.GET("/:id/client-config", controller.PeerClientConfig)
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)
// aliases на один миграционный релиз
peers.GET("/:id/client-url", controller.PeerClientConfig)
peers.GET("/:id/qr", controller.PeerClientConfig)
}
}