Skip to content

Add optional tags field for route rules#4158

Open
Pushkinmazila2 wants to merge 9 commits into
SagerNet:testingfrom
Pushkinmazila2:testing
Open

Add optional tags field for route rules#4158
Pushkinmazila2 wants to merge 9 commits into
SagerNet:testingfrom
Pushkinmazila2:testing

Conversation

@Pushkinmazila2
Copy link
Copy Markdown

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:

  • tag is optional
  • existing configurations continue to work unchanged

Signed-off-by: Pushkinmazila2 <zavalny199@yandex.com>
Signed-off-by: Pushkinmazila2 <zavalny199@yandex.com>
@Pushkinmazila2
Copy link
Copy Markdown
Author

The tag field (with a small letter), and the Tag() is method.:

@Pushkinmazila2
Copy link
Copy Markdown
Author

I suggest integrating tag before the architecture runs away again )
@nekohasekai

@nekohasekai nekohasekai force-pushed the testing branch 2 times, most recently from 2141845 to b6c416b Compare May 26, 2026 09:45
Signed-off-by: Pushkinmazila2 <zavalny199@yandex.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants