mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #6988] [Feature]: Send Incy routing via the Routing header and option to reuse the Happ routing profile for Incy #4606
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#4606
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ilya-practicum on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6988
Describe the bug
When happ routing rules enabled, 3xui adds routing profile via header "routing". But when you enable Incy routing, 3xui send routing via body not header. Incy also supports header "routing", it may be better to use header "routing" for Incy also to make it predictable.
P. S. It will also be useful to add check box to send same routing profile for Happ and Incy, since Incy supports "happ://" routing profiles
How to reproduce the problem
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.11.0
Xray-core version
No response
How did you install 3x-ui?
Docker / Docker Compose
Operating system
Debian 13
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Oct 28, 2026):
Your observation is accurate, but it is intended behaviour, not a bug: since the fix for #6062 (commit
61885c91, PR #6810, released before v3.11.0), the panel writes the Incy routing profile into the raw subscription body on purpose, and removes theRoutingheader for Incy clients. I have relabelled this as a feature request, because both of your points ask for a design change. I also retitled it; the old title was "[Bug]: Incy routing does not add header".Why the body and not the header
In
internal/sub/controller.go:520-529(raw/sub/handler):The
Routingheader is built for every client inApplyCommonHeaders(internal/sub/controller.go:974-997). For Incy, the Happ value is dropped there, and only the shared JSON-routing profile (subJsonRoutingRules) stays in that header. The header is how Happ/Incy fetch the geo files that the baked rules reference (#6402). If Incy's own profile were sent in the header instead, it would replace that shared profile on the/sub/response. That trade-off is what the current design avoids. The testTestIncyRoutingIsolatedFromHappHeaders(internal/sub/controller_test.go:806) pins this. The case"incy body profile is not outranked by a routing header"expects theincy://line at the end of the body and an emptyRoutingheader.So the request for "Incy routing via the
Routingheader" is a change in behaviour that the maintainer would need to decide on. It is not a regression.Same profile for Happ and Incy: workaround available today
A checkbox for this does not exist. The Happ tab's routing is deliberately hidden from Incy (
controller.go:974: "The Happ tab is Happ-only, so INCY reads it as blank ... INCY takes a routing link of any scheme"). However, the Incy routing field accepts any link scheme. The value is only rewritten when it is anhttps://URL:ParseRemoteRoutingURL(internal/util/common/url.go:34) treats everything else as literal text, andresolveIncyRoutingSource(internal/sub/remote_routing.go:474) returns it unchanged. To make Incy use your Happ profile:happ://routing/...link you use on the Happ tab into the Incy routing rules field.Incy will then receive that
happ://line in the subscription body. The only downside is that the link is stored twice, and both copies must be edited when it changes. Removing that duplication is what the requested checkbox would do.Verdict: Feature request
This reply was generated automatically; a maintainer may follow up.