2021-06-23 13:12:33 +08:00
|
|
|
package iplists
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
|
|
|
|
"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
|
|
|
|
|
"github.com/iwind/TeaGo"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
|
|
|
|
server.
|
|
|
|
|
Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeServer)).
|
|
|
|
|
Data("teaMenu", "servers").
|
|
|
|
|
Data("teaSubMenu", "iplist").
|
|
|
|
|
Prefix("/servers/iplists").
|
|
|
|
|
Get("", new(IndexAction)).
|
2021-11-17 19:50:52 +08:00
|
|
|
Get("/lists", new(ListsAction)).
|
2021-06-23 13:12:33 +08:00
|
|
|
GetPost("/createPopup", new(CreatePopupAction)).
|
|
|
|
|
Get("/list", new(ListAction)).
|
|
|
|
|
GetPost("/import", new(ImportAction)).
|
|
|
|
|
GetPost("/export", new(ExportAction)).
|
|
|
|
|
Get("/exportData", new(ExportDataAction)).
|
|
|
|
|
Post("/delete", new(DeleteAction)).
|
2021-11-21 09:43:14 +08:00
|
|
|
Post("/deleteItems", new(DeleteItemsAction)).
|
2023-12-24 10:53:03 +08:00
|
|
|
Post("/deleteCount", new(DeleteCountAction)).
|
2021-06-23 13:12:33 +08:00
|
|
|
GetPost("/test", new(TestAction)).
|
|
|
|
|
GetPost("/update", new(UpdateAction)).
|
|
|
|
|
Get("/items", new(ItemsAction)).
|
2021-07-14 22:45:52 +08:00
|
|
|
Get("/selectPopup", new(SelectPopupAction)).
|
2021-06-23 13:12:33 +08:00
|
|
|
|
|
|
|
|
// IP相关
|
|
|
|
|
GetPost("/createIPPopup", new(CreateIPPopupAction)).
|
|
|
|
|
GetPost("/updateIPPopup", new(UpdateIPPopupAction)).
|
|
|
|
|
Post("/deleteIP", new(DeleteIPAction)).
|
2021-07-18 17:09:31 +08:00
|
|
|
Get("/accessLogsPopup", new(AccessLogsPopupAction)).
|
2022-01-08 16:48:45 +08:00
|
|
|
Post("/readAll", new(ReadAllAction)).
|
2021-06-23 13:12:33 +08:00
|
|
|
|
|
|
|
|
// 防火墙
|
|
|
|
|
GetPost("/bindHTTPFirewallPopup", new(BindHTTPFirewallPopupAction)).
|
|
|
|
|
Post("/unbindHTTPFirewall", new(UnbindHTTPFirewallAction)).
|
|
|
|
|
Post("/httpFirewall", new(HttpFirewallAction)).
|
|
|
|
|
|
2021-07-14 22:45:52 +08:00
|
|
|
// 选项数据
|
|
|
|
|
Post("/levelOptions", new(LevelOptionsAction)).
|
2021-06-23 13:12:33 +08:00
|
|
|
EndAll()
|
|
|
|
|
})
|
|
|
|
|
}
|