Rename subscription.process.[filter/exclude]_outbound_type to subscription.process.[filter/exclude]_type

This commit is contained in:
世界 2024-04-22 21:09:31 +08:00
parent 7dffc3de5f
commit cf6908fdf8
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
3 changed files with 15 additions and 15 deletions

View File

@ -9,8 +9,8 @@
{ {
"filter": [], "filter": [],
"exclude": [], "exclude": [],
"filter_outbound_type": [], "filter_type": [],
"exclude_outbound_type": [], "exclude_type": [],
"rename": {}, "rename": {},
"remove_emoji": false, "remove_emoji": false,
"rewrite_multiplex": {} "rewrite_multiplex": {}
@ -62,11 +62,11 @@ Regexp filter rules, non-matching outbounds will be removed.
Regexp exclude rules, matching outbounds will be removed. Regexp exclude rules, matching outbounds will be removed.
#### process.filter_outbound_type #### process.filter_type
Outbound type filter rules, non-matching outbounds will be removed. Outbound type filter rules, non-matching outbounds will be removed.
#### process.exclude_outbound_type #### process.exclude_type
Outbound type exclude rules, matching outbounds will be removed. Outbound type exclude rules, matching outbounds will be removed.

View File

@ -62,13 +62,13 @@ type Subscription struct {
} }
type OutboundProcessOptions struct { type OutboundProcessOptions struct {
Filter option.Listable[string] `json:"filter,omitempty"` Filter option.Listable[string] `json:"filter,omitempty"`
Exclude option.Listable[string] `json:"exclude,omitempty"` Exclude option.Listable[string] `json:"exclude,omitempty"`
FilterOutboundType option.Listable[string] `json:"filter_outbound_type,omitempty"` FilterType option.Listable[string] `json:"filter_type,omitempty"`
ExcludeOutboundType option.Listable[string] `json:"exclude_outbound_type,omitempty"` ExcludeType option.Listable[string] `json:"exclude_type,omitempty"`
Rename *badjson.TypedMap[string, string] `json:"rename,omitempty"` Rename *badjson.TypedMap[string, string] `json:"rename,omitempty"`
RemoveEmoji bool `json:"remove_emoji,omitempty"` RemoveEmoji bool `json:"remove_emoji,omitempty"`
RewriteMultiplex *option.OutboundMultiplexOptions `json:"rewrite_multiplex,omitempty"` RewriteMultiplex *option.OutboundMultiplexOptions `json:"rewrite_multiplex,omitempty"`
} }
type Profile struct { type Profile struct {

View File

@ -74,8 +74,8 @@ func (o *ProcessOptions) Process(outbounds []boxOption.Outbound) []boxOption.Out
continue continue
} }
} }
if len(o.FilterOutboundType) > 0 { if len(o.FilterType) > 0 {
if !common.Contains(o.FilterOutboundType, outbound.Type) { if !common.Contains(o.FilterType, outbound.Type) {
continue continue
} }
} }
@ -86,8 +86,8 @@ func (o *ProcessOptions) Process(outbounds []boxOption.Outbound) []boxOption.Out
continue continue
} }
} }
if len(o.ExcludeOutboundType) > 0 { if len(o.ExcludeType) > 0 {
if common.Contains(o.ExcludeOutboundType, outbound.Type) { if common.Contains(o.ExcludeType, outbound.Type) {
continue continue
} }
} }