mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 18:27:13 +08:00
25 lines
544 B
Go
25 lines
544 B
Go
package fail2ban
|
|
|
|
import (
|
|
"github.com/go-chi/chi/v5"
|
|
|
|
"github.com/TheTNB/panel/pkg/apploader"
|
|
"github.com/TheTNB/panel/pkg/types"
|
|
)
|
|
|
|
func init() {
|
|
apploader.Register(&types.App{
|
|
Slug: "fail2ban",
|
|
Route: func(r chi.Router) {
|
|
service := NewService()
|
|
r.Get("/jails", service.List)
|
|
r.Post("/jails", service.Add)
|
|
r.Delete("/jails", service.Delete)
|
|
r.Get("/jails/{name}", service.BanList)
|
|
r.Post("/unban", service.Unban)
|
|
r.Post("/whiteList", service.SetWhiteList)
|
|
r.Get("/whiteList", service.GetWhiteList)
|
|
},
|
|
})
|
|
}
|