mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-02 20:00:26 +08:00
删除一直未实现的Unix协议相关内容
This commit is contained in:
@@ -100,7 +100,6 @@ func (this *CreateAction) RunPost(params struct {
|
||||
var httpsConfig *serverconfigs.HTTPSProtocolConfig = nil
|
||||
var tcpConfig *serverconfigs.TCPProtocolConfig = nil
|
||||
var tlsConfig *serverconfigs.TLSProtocolConfig = nil
|
||||
var unixConfig *serverconfigs.UnixProtocolConfig = nil
|
||||
var udpConfig *serverconfigs.UDPProtocolConfig = nil
|
||||
var webId int64 = 0
|
||||
|
||||
@@ -428,14 +427,6 @@ func (this *CreateAction) RunPost(params struct {
|
||||
}
|
||||
req.TlsJSON = data
|
||||
}
|
||||
if unixConfig != nil {
|
||||
data, err := json.Marshal(unixConfig)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
req.UnixJSON = data
|
||||
}
|
||||
if udpConfig != nil {
|
||||
data, err := json.Marshal(udpConfig)
|
||||
if err != nil {
|
||||
|
||||
@@ -108,14 +108,6 @@ func (this *IndexAction) RunGet(params struct {
|
||||
})
|
||||
}
|
||||
}
|
||||
if config.Unix != nil && config.Unix.IsOn {
|
||||
for _, listen := range config.Unix.Listen {
|
||||
portMaps = append(portMaps, maps.Map{
|
||||
"protocol": listen.Protocol,
|
||||
"portRange": listen.Host,
|
||||
})
|
||||
}
|
||||
}
|
||||
if config.UDP != nil && config.UDP.IsOn {
|
||||
for _, listen := range config.UDP.Listen {
|
||||
portMaps = append(portMaps, maps.Map{
|
||||
|
||||
@@ -155,14 +155,6 @@ func (this *IndexAction) RunGet(params struct {
|
||||
})
|
||||
}
|
||||
}
|
||||
if config.Unix != nil && config.Unix.IsOn {
|
||||
for _, listen := range config.Unix.Listen {
|
||||
portMaps = append(portMaps, maps.Map{
|
||||
"protocol": listen.Protocol,
|
||||
"portRange": listen.Host,
|
||||
})
|
||||
}
|
||||
}
|
||||
if config.UDP != nil && config.UDP.IsOn {
|
||||
for _, listen := range config.UDP.Listen {
|
||||
portMaps = append(portMaps, maps.Map{
|
||||
|
||||
@@ -65,7 +65,6 @@ func (this *UpdateSchedulingPopupAction) RunGet(params struct {
|
||||
var isHTTPFamily = false
|
||||
var isTCPFamily = false
|
||||
var isUDPFamily = false
|
||||
var isUnixFamily = false
|
||||
if params.ServerId > 0 {
|
||||
_, serverConfig, isOk := serverutils.FindServer(this.Parent(), params.ServerId)
|
||||
if !isOk {
|
||||
@@ -74,7 +73,6 @@ func (this *UpdateSchedulingPopupAction) RunGet(params struct {
|
||||
isHTTPFamily = serverConfig.IsHTTPFamily()
|
||||
isTCPFamily = serverConfig.IsTCPFamily()
|
||||
isUDPFamily = serverConfig.IsUDPFamily()
|
||||
isUnixFamily = serverConfig.IsUnixFamily()
|
||||
} else {
|
||||
switch params.Family {
|
||||
case "http":
|
||||
@@ -83,8 +81,6 @@ func (this *UpdateSchedulingPopupAction) RunGet(params struct {
|
||||
isTCPFamily = true
|
||||
case "udp":
|
||||
isUDPFamily = true
|
||||
case "unix":
|
||||
isUnixFamily = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,8 +94,7 @@ func (this *UpdateSchedulingPopupAction) RunGet(params struct {
|
||||
}
|
||||
if (isHTTPFamily && lists.Contains(networks, "http")) ||
|
||||
(isTCPFamily && lists.Contains(networks, "tcp")) ||
|
||||
(isUDPFamily && lists.Contains(networks, "udp")) ||
|
||||
(isUnixFamily && lists.Contains(networks, "unix")) {
|
||||
(isUDPFamily && lists.Contains(networks, "udp")) {
|
||||
schedulingTypes = append(schedulingTypes, m)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package unix
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
)
|
||||
|
||||
type IndexAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *IndexAction) Init() {
|
||||
this.Nav("", "setting", "index")
|
||||
this.SecondMenu("unix")
|
||||
}
|
||||
|
||||
func (this *IndexAction) RunGet(params struct {
|
||||
ServerId int64
|
||||
}) {
|
||||
// TODO
|
||||
|
||||
this.Show()
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package unix
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/serverutils"
|
||||
"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)).
|
||||
Helper(serverutils.NewServerHelper()).
|
||||
Prefix("/servers/server/settings/unix").
|
||||
Get("", new(IndexAction)).
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
@@ -100,8 +100,6 @@ func (this *ServerHelper) createLeftMenu(action *actions.ActionObject) {
|
||||
family = "http"
|
||||
} else if serverConfig.IsTCPFamily() {
|
||||
family = "tcp"
|
||||
} else if serverConfig.IsUnixFamily() {
|
||||
family = "unix"
|
||||
} else if serverConfig.IsUDPFamily() {
|
||||
family = "udp"
|
||||
}
|
||||
@@ -462,18 +460,6 @@ func (this *ServerHelper) createSettingsMenu(secondMenuItem string, serverIdStri
|
||||
"isActive": secondMenuItem == "reverseProxy",
|
||||
"isOn": serverConfig.ReverseProxyRef != nil && serverConfig.ReverseProxyRef.IsOn,
|
||||
})
|
||||
} else if serverConfig.IsUnixFamily() {
|
||||
menuItems = append(menuItems, maps.Map{
|
||||
"name": this.Lang(actionPtr, codes.Server_MenuSettingDNS),
|
||||
"url": "/servers/server/settings/dns?serverId=" + serverIdString,
|
||||
"isActive": secondMenuItem == "dns",
|
||||
})
|
||||
menuItems = append(menuItems, maps.Map{
|
||||
"name": this.Lang(actionPtr, codes.Server_MenuSettingUnix),
|
||||
"url": "/servers/server/settings/unix?serverId=" + serverIdString,
|
||||
"isActive": secondMenuItem == "unix",
|
||||
"isOn": serverConfig.Unix != nil && serverConfig.Unix.IsOn && len(serverConfig.Unix.Listen) > 0,
|
||||
})
|
||||
} else if serverConfig.IsUDPFamily() {
|
||||
menuItems = append(menuItems, maps.Map{
|
||||
"name": this.Lang(actionPtr, codes.Server_MenuSettingDNS),
|
||||
|
||||
@@ -102,7 +102,6 @@ import (
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/tcp"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/tls"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/udp"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/unix"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/userAgent"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/waf"
|
||||
_ "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/server/settings/web"
|
||||
|
||||
Reference in New Issue
Block a user