Config: Correctly marshal PortList and NameServerConfig to JSON (#4386)

This commit is contained in:
yiguous 2025-02-12 22:55:16 +08:00 committed by GitHub
parent a71762b5da
commit 94c7970fd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 7 deletions

View file

@ -12,13 +12,13 @@ import (
)
type NameServerConfig struct {
Address *Address
ClientIP *Address
Port uint16
SkipFallback bool
Domains []string
ExpectIPs StringList
QueryStrategy string
Address *Address `json:"address"`
ClientIP *Address `json:"clientIp"`
Port uint16 `json:"port"`
SkipFallback bool `json:"skipFallback"`
Domains []string `json:"domains"`
ExpectIPs StringList `json:"expectIps"`
QueryStrategy string `json:"queryStrategy"`
}
func (c *NameServerConfig) UnmarshalJSON(data []byte) error {