sing-box
sing-box copied to clipboard
Add optional tags field for route rules
This PR adds optional tag support for individual rules.
Currently tags are supported for rule-sets, but not for standalone rules. This change extends the same concept to regular rules to improve configuration structure and readability.
Example:
{
"tag": "streaming",
"domain_suffix": [
"youtube.com",
"netflix.com"
],
"outbound": "proxy"
}
Motivation
Large configurations often contain many inline rules without an easy way to identify or group them.
Adding tags to rules helps:
- improve config maintainability
- simplify navigation in large configs
- prepare groundwork for possible future conditional/tag-based processing
Compatibility
This change is fully backward compatible:
tagis optional- existing configurations continue to work unchanged
The tag field (with a small letter), and the Tag() is method.:
I suggest integrating tag before the architecture runs away again )
@nekohasekai