mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-01 09:20:24 +08:00
实现公用的IP名单
This commit is contained in:
39
internal/web/actions/default/servers/iplists/init.go
Normal file
39
internal/web/actions/default/servers/iplists/init.go
Normal file
@@ -0,0 +1,39 @@
|
||||
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)).
|
||||
GetPost("/createPopup", new(CreatePopupAction)).
|
||||
Get("/list", new(ListAction)).
|
||||
GetPost("/import", new(ImportAction)).
|
||||
GetPost("/export", new(ExportAction)).
|
||||
Get("/exportData", new(ExportDataAction)).
|
||||
Post("/delete", new(DeleteAction)).
|
||||
GetPost("/test", new(TestAction)).
|
||||
GetPost("/update", new(UpdateAction)).
|
||||
Get("/items", new(ItemsAction)).
|
||||
|
||||
// IP相关
|
||||
GetPost("/createIPPopup", new(CreateIPPopupAction)).
|
||||
GetPost("/updateIPPopup", new(UpdateIPPopupAction)).
|
||||
Post("/deleteIP", new(DeleteIPAction)).
|
||||
|
||||
// 防火墙
|
||||
GetPost("/bindHTTPFirewallPopup", new(BindHTTPFirewallPopupAction)).
|
||||
Post("/unbindHTTPFirewall", new(UnbindHTTPFirewallAction)).
|
||||
Post("/httpFirewall", new(HttpFirewallAction)).
|
||||
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user