实现公用的IP名单

This commit is contained in:
刘祥超
2021-06-23 13:12:33 +08:00
parent c99547d9e3
commit 8e4ee54f03
88 changed files with 2060 additions and 69 deletions

View 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()
})
}