Improve config struct

This commit is contained in:
世界
2022-07-25 11:29:46 +08:00
parent 1f05420745
commit cc78f0347d
22 changed files with 187 additions and 362 deletions

View File

@@ -5,7 +5,6 @@ import (
"strings"
"github.com/sagernet/sing-box/common/json"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
)
@@ -36,15 +35,6 @@ func (o *Options) UnmarshalJSON(content []byte) error {
return err
}
func (o Options) Equals(other Options) bool {
return common.ComparablePtrEquals(o.Log, other.Log) &&
common.PtrEquals(o.DNS, other.DNS) &&
common.SliceEquals(o.Inbounds, other.Inbounds) &&
common.SliceEquals(o.Outbounds, other.Outbounds) &&
common.PtrEquals(o.Route, other.Route) &&
common.ComparablePtrEquals(o.Experimental, other.Experimental)
}
type LogOptions struct {
Disabled bool `json:"disabled,omitempty"`
Level string `json:"level,omitempty"`