fix(dns): inheritance issue with disableCache (#5351)

This commit is contained in:
Meow
2025-11-27 10:12:37 +08:00
committed by GitHub
parent 9d3401b6f0
commit ed5f7e7af5
5 changed files with 108 additions and 96 deletions
+4 -4
View File
@@ -26,8 +26,8 @@ type NameServerConfig struct {
QueryStrategy string `json:"queryStrategy"`
Tag string `json:"tag"`
TimeoutMs uint64 `json:"timeoutMs"`
DisableCache bool `json:"disableCache"`
ServeStale bool `json:"serveStale"`
DisableCache *bool `json:"disableCache"`
ServeStale *bool `json:"serveStale"`
ServeExpiredTTL *uint32 `json:"serveExpiredTTL"`
FinalQuery bool `json:"finalQuery"`
UnexpectedIPs StringList `json:"unexpectedIPs"`
@@ -52,8 +52,8 @@ func (c *NameServerConfig) UnmarshalJSON(data []byte) error {
QueryStrategy string `json:"queryStrategy"`
Tag string `json:"tag"`
TimeoutMs uint64 `json:"timeoutMs"`
DisableCache bool `json:"disableCache"`
ServeStale bool `json:"serveStale"`
DisableCache *bool `json:"disableCache"`
ServeStale *bool `json:"serveStale"`
ServeExpiredTTL *uint32 `json:"serveExpiredTTL"`
FinalQuery bool `json:"finalQuery"`
UnexpectedIPs StringList `json:"unexpectedIPs"`