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:
UUBulb
2025-02-28 22:02:54 +08:00
committed by GitHub
parent e770398a11
commit 1d2f8d24f6
28 changed files with 321 additions and 175 deletions

View File

@@ -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"`