mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-08 03:34:13 +08:00
24 lines
696 B
Go
24 lines
696 B
Go
package option
|
|
|
|
import "github.com/sagernet/sing/common"
|
|
|
|
type Options struct {
|
|
Log *LogOption `json:"log"`
|
|
Inbounds []Inbound `json:"inbounds,omitempty"`
|
|
Outbounds []Outbound `json:"outbounds,omitempty"`
|
|
Route *RouteOptions `json:"route,omitempty"`
|
|
}
|
|
|
|
func (o Options) Equals(other Options) bool {
|
|
return common.ComparablePtrEquals(o.Log, other.Log) &&
|
|
common.SliceEquals(o.Inbounds, other.Inbounds) &&
|
|
common.ComparableSliceEquals(o.Outbounds, other.Outbounds) &&
|
|
common.PtrEquals(o.Route, other.Route)
|
|
}
|
|
|
|
type LogOption struct {
|
|
Disabled bool `json:"disabled,omitempty"`
|
|
Level string `json:"level,omitempty"`
|
|
Output string `json:"output,omitempty"`
|
|
}
|