Use Case
Currently, route.rule_set objects support a tag field, which is highly useful for identifying and managing them. However, individual routing rules inside route.rules do not have a tag, description, or comment field.
When managing large and complex configuration files with dozens of routing rules, it becomes difficult to debug, maintain, or quickly identify the exact purpose of a specific rule without external documentation.
Proposed Solution
Add an optional tag (or comment) string field to the routing rule object schema.
Example:
{
"route": {
"rules": [
{
"tag": "bypass-local-traffic",
"geoip": ["private"],
"outbound": "direct"
},
{
"tag": "restrict-work-ads",
"domain_suffix": ["doubleclick.net"],
"outbound": "block"
}
]
}
}
This field should be ignored during core routing logic operations but could be printed in logs (e.g., when a rule matches a packet under v or vv log levels) to drastically improve troubleshooting.
alternatives considered
Using external JSON/JSONC comments (like //), but this is not native to standard JSON parsing and gets stripped out if the configuration is managed or regenerated via API/web frontends.
Additional Context
I would love to see this feature implemented. I am also willing to contribute and help with the implementation (PR) if guided in the right direction regarding which parts of the router/config parser codebase need to be modified.
Use Case
Currently,
route.rule_setobjects support atagfield, which is highly useful for identifying and managing them. However, individual routing rules insideroute.rulesdo not have atag,description, orcommentfield.When managing large and complex configuration files with dozens of routing rules, it becomes difficult to debug, maintain, or quickly identify the exact purpose of a specific rule without external documentation.
Proposed Solution
Add an optional
tag(orcomment) string field to the routing rule object schema.Example:
{ "route": { "rules": [ { "tag": "bypass-local-traffic", "geoip": ["private"], "outbound": "direct" }, { "tag": "restrict-work-ads", "domain_suffix": ["doubleclick.net"], "outbound": "block" } ] } }This field should be ignored during core routing logic operations but could be printed in logs (e.g., when a rule matches a packet under
vorvvlog levels) to drastically improve troubleshooting.alternatives considered
Using external JSON/JSONC comments (like
//), but this is not native to standard JSON parsing and gets stripped out if the configuration is managed or regenerated via API/web frontends.Additional Context
I would love to see this feature implemented. I am also willing to contribute and help with the implementation (PR) if guided in the right direction regarding which parts of the router/config parser codebase need to be modified.