将全局的通用设置--域名审核设置移到“集群设置--网站设置”中

This commit is contained in:
GoEdgeLab
2023-09-18 16:09:46 +08:00
parent 6be115490f
commit aaaff5efcf
7 changed files with 717 additions and 506 deletions

View File

@@ -1,10 +1,5 @@
package serverconfigs
const (
DefaultTCPPortRangeMin = 10000
DefaultTCPPortRangeMax = 40000
)
// GlobalConfig 服务相关的全局设置
// Deprecated
type GlobalConfig struct {
@@ -14,8 +9,8 @@ type GlobalConfig struct {
//AllowMismatchDomains []string `yaml:"allowMismatchDomains" json:"allowMismatchDomains"` // 允许的不匹配的域名
//DefaultDomain string `yaml:"defaultDomain" json:"defaultDomain"` // 默认的域名
//DomainMismatchAction *DomainMismatchAction `yaml:"domainMismatchAction" json:"domainMismatchAction"` // 不匹配时采取的动作
DomainAuditingIsOn bool `yaml:"domainAuditingIsOn" json:"domainAuditingIsOn"` // 域名是否需要审核
DomainAuditingPrompt string `yaml:"domainAuditingPrompt" json:"domainAuditingPrompt"` // 域名审核的提示
//DomainAuditingIsOn bool `yaml:"domainAuditingIsOn" json:"domainAuditingIsOn"` // 域名是否需要审核
//DomainAuditingPrompt string `yaml:"domainAuditingPrompt" json:"domainAuditingPrompt"` // 域名审核的提示
} `yaml:"httpAll" json:"httpAll"`
TCPAll struct {

View File

@@ -9,6 +9,11 @@ const (
LnRequestSchedulingMethodURLMapping LnRequestSchedulingMethod = "urlMapping"
)
const (
DefaultTCPPortRangeMin = 10000
DefaultTCPPortRangeMax = 40000
)
func NewGlobalServerConfig() *GlobalServerConfig {
var config = &GlobalServerConfig{}
@@ -51,6 +56,9 @@ type GlobalServerConfig struct {
LnRequestSchedulingMethod LnRequestSchedulingMethod `yaml:"lnRequestSchedulingMethod" json:"lnRequestSchedulingMethod"` // Ln请求调度方法
ServerName string `yaml:"serverName" json:"serverName"` // Server名称
EnableServerAddrVariable bool `yaml:"enableServerAddrVariable" json:"enableServerAddrVariable"` // 是否支持${serverAddr}变量
DomainAuditingIsOn bool `yaml:"domainAuditingIsOn" json:"domainAuditingIsOn"` // 域名是否需要审核
DomainAuditingPrompt string `yaml:"domainAuditingPrompt" json:"domainAuditingPrompt"` // 域名审核的提示
} `yaml:"httpAll" json:"httpAll"` // HTTP统一配置
HTTPAccessLog struct {