mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
feat: update to go1.24 & support listening https (#1002)
* feat: support listening https * refactor * modernize * support snake case in config * more precise control of config fields * update goreleaser config * remove kubeyaml * fix: expose agent_secret * chore
This commit is contained in:
@@ -13,11 +13,16 @@ type SettingForm struct {
|
||||
RealIPHeader string `json:"real_ip_header,omitempty" validate:"optional"` // 真实IP
|
||||
UserTemplate string `json:"user_template,omitempty" validate:"optional"`
|
||||
|
||||
TLS bool `json:"tls,omitempty" validate:"optional"`
|
||||
AgentTLS bool `json:"tls,omitempty" validate:"optional"`
|
||||
EnableIPChangeNotification bool `json:"enable_ip_change_notification,omitempty" validate:"optional"`
|
||||
EnablePlainIPInNotification bool `json:"enable_plain_ip_in_notification,omitempty" validate:"optional"`
|
||||
}
|
||||
|
||||
type Setting struct {
|
||||
ConfigForGuests
|
||||
ConfigDashboard
|
||||
}
|
||||
|
||||
type FrontendTemplate struct {
|
||||
Path string `json:"path,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
@@ -28,8 +33,8 @@ type FrontendTemplate struct {
|
||||
IsOfficial bool `json:"is_official,omitempty"`
|
||||
}
|
||||
|
||||
type SettingResponse[T any] struct {
|
||||
Config T `json:"config,omitempty"`
|
||||
type SettingResponse struct {
|
||||
Config Setting `json:"config"`
|
||||
|
||||
Version string `json:"version,omitempty"`
|
||||
FrontendTemplates []FrontendTemplate `json:"frontend_templates,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user