Add invert rule item

This commit is contained in:
世界
2022-07-24 13:44:26 +08:00
parent fbdf3e4b38
commit d0f1d7f3dc
4 changed files with 14 additions and 7 deletions

View File

@@ -107,6 +107,7 @@ type DefaultDNSRule struct {
User Listable[string] `json:"user,omitempty"`
UserID Listable[int32] `json:"user_id,omitempty"`
Outbound Listable[string] `json:"outbound,omitempty"`
Invert bool `json:"invert,omitempty"`
Server string `json:"server,omitempty"`
}

View File

@@ -107,6 +107,7 @@ type DefaultRule struct {
PackageName Listable[string] `json:"package_name,omitempty"`
User Listable[string] `json:"user,omitempty"`
UserID Listable[int32] `json:"user_id,omitempty"`
Invert bool `json:"invert,omitempty"`
Outbound string `json:"outbound,omitempty"`
}
@@ -137,6 +138,7 @@ func (r DefaultRule) Equals(other DefaultRule) bool {
common.ComparableSliceEquals(r.PackageName, other.PackageName) &&
common.ComparableSliceEquals(r.User, other.User) &&
common.ComparableSliceEquals(r.UserID, other.UserID) &&
r.Invert == other.Invert &&
r.Outbound == other.Outbound
}