Problem Description
When using extra_groups in templates:
- Subscription-generated groups ignore the filter, causing them to be added to every non-subscription type group.
- Outbounds other than subscriptions are not filtered.
Steps to Reproduce
- Configure outbounds:
"outbounds": [
{
"type": "shadowsocks",
"tag": "香港 自建"
}
],
"subscriptions": [
{
"name": "sub",
"url": "suburl",
"generate_selector": true
}
]
- Configure extra_groups as follows:
"extra_groups": [
{
"tag": "Hong Kong",
"type": "selector",
"filter": "(?i)🇭🇰|香港|hk"
}
]
- The generated configuration is:
{
"type": "selector",
"tag": "Hong Kong",
"outbounds": [
"sub",
"香港 01",
"香港 02"
]
}
Expected Behavior
- The filter in extra_groups should only match outbounds that satisfy the filter condition. Subscription-generated groups should not be added to all selector groups disregarding the filter.
- The filter in extra_groups should apply to all outbounds, not just subsciptions.
The result should be something like:
{
"type": "selector",
"tag": "Hong Kong",
"outbounds": [
"香港 01",
"香港 02",
"香港 自建"
]
}