Skip to content

Add VLESS route routing rules#3985

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

Add VLESS route routing rules#3985
kavore wants to merge 9 commits into
SagerNet: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 9 times, most recently from 43ff669 to e6427e8 Compare April 10, 2026 08:24
@nekohasekai nekohasekai force-pushed the testing branch 9 times, most recently from 9c09a5c to 9480f2d Compare April 15, 2026 09:23
@nekohasekai nekohasekai force-pushed the testing branch 11 times, most recently from b63ae24 to 76a2201 Compare April 23, 2026 00:15
@nekohasekai nekohasekai force-pushed the testing branch 6 times, most recently from 8f15b13 to 9ee56ae Compare May 3, 2026 01:08
@nekohasekai nekohasekai force-pushed the testing branch 6 times, most recently from 057f540 to 6b07a22 Compare May 15, 2026 05:29
@nekohasekai nekohasekai force-pushed the testing branch 7 times, most recently from 41d2e8c to 812a8fd Compare May 22, 2026 04:03
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