mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-03 17:57:30 +03:00
option: Fix marshal legacy DNS options
This commit is contained in:
@@ -99,7 +99,9 @@ type _DomainResolveOptions struct {
|
||||
type DomainResolveOptions _DomainResolveOptions
|
||||
|
||||
func (o DomainResolveOptions) MarshalJSON() ([]byte, error) {
|
||||
if o.Strategy == DomainStrategy(C.DomainStrategyAsIS) &&
|
||||
if o.Server == "" {
|
||||
return []byte("{}"), nil
|
||||
} else if o.Strategy == DomainStrategy(C.DomainStrategyAsIS) &&
|
||||
!o.DisableCache &&
|
||||
o.RewriteTTL == nil &&
|
||||
o.ClientSubnet == nil {
|
||||
|
||||
Reference in New Issue
Block a user