Skip to content

Add VLESS route routing rules#3985

Open
kavore wants to merge 9 commits intoSagerNet:testingfrom
kavore:vless-route
Open

Add VLESS route routing rules#3985
kavore wants to merge 9 commits intoSagerNet:testingfrom
kavore:vless-route

Conversation

@kavore
Copy link
Copy Markdown

@kavore kavore commented Apr 1, 2026

Add support for routing based on VLESS route value extracted from UUID bytes 6-7 (requires corresponding sing-vmess change).

Changes

  • Add VLESSRoute field to InboundContext
  • Extract route from context in VLESS inbound handlers (TCP and UDP)
  • Add vless_route (exact match) and vless_route_range (range match) rule options
  • Add VLESSRouteItem and VLESSRouteRangeItem rule items

Example config

{
  "route": {
    "rules": [
      {
        "vless_route": [53, 443],
        "outbound": "proxy"
      },
      {
        "vless_route_range": ["1000:2000"],
        "outbound": "special"
      }
    ]
  }
}

Depends on: SagerNet/sing-vmess#11

@charliez0
Copy link
Copy Markdown

interesting but why need this lol

sing supports filter via username I remembered

@kavore
Copy link
Copy Markdown
Author

kavore commented Apr 3, 2026

interesting but why need this lol

sing supports filter via username I remembered

That can be useful when you have a subscription and want to apply different routing for a single user. For example, one link with route ID 0001 can send Gemini traffic through WARP, while another link with route ID 0002 sends Gemini traffic directly - all for the same user

@nekohasekai nekohasekai force-pushed the testing branch 2 times, most recently from 484b664 to 25052a2 Compare April 3, 2026 15:02
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.

3 participants