Skip to content

[Feature Request] Add optional tag or comment field to routing rules #4261

Description

@Pushkinmazila2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions