2020-09-13 19:27:47 +08:00
|
|
|
package serverconfigs
|
|
|
|
|
|
2020-10-31 17:45:04 +08:00
|
|
|
// 服务相关的全局设置
|
2020-09-13 19:27:47 +08:00
|
|
|
type GlobalConfig struct {
|
2020-11-04 20:54:18 +08:00
|
|
|
// HTTP & HTTPS相关配置
|
2020-09-13 19:27:47 +08:00
|
|
|
HTTPAll struct {
|
2020-11-04 20:54:18 +08:00
|
|
|
MatchDomainStrictly bool `yaml:"matchDomainStrictly" json:"matchDomainStrictly"` // 是否严格匹配域名
|
2020-09-13 19:27:47 +08:00
|
|
|
} `yaml:"httpAll" json:"httpAll"`
|
2020-11-04 20:54:18 +08:00
|
|
|
|
2020-09-13 19:27:47 +08:00
|
|
|
HTTP struct{} `yaml:"http" json:"http"`
|
|
|
|
|
HTTPS struct{} `yaml:"https" json:"https"`
|
|
|
|
|
TCPAll struct{} `yaml:"tcpAll" json:"tcpAll"`
|
|
|
|
|
TCP struct{} `yaml:"tcp" json:"tcp"`
|
|
|
|
|
TLS struct{} `yaml:"tls" json:"tls"`
|
|
|
|
|
Unix struct{} `yaml:"unix" json:"unix"`
|
|
|
|
|
UDP struct{} `yaml:"udp" json:"udp"`
|
2020-11-04 20:54:18 +08:00
|
|
|
|
|
|
|
|
// IP库相关配置
|
|
|
|
|
IPLibrary struct {
|
|
|
|
|
Code string `yaml:"code" json:"code"` // 当前使用的IP库代号
|
|
|
|
|
} `yaml:"ipLibrary" json:"ipLibrary"`
|
2020-09-13 19:27:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (this *GlobalConfig) Init() error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|