mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6008] [MERGED] fix(sub) Happ profileEnableRouting button #6054
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#6054
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/6008
Author: @a-poluyan
Created: 7/16/2026
Status: ✅ Merged
Merged: 7/21/2026
Merged by: @MHSanaei
Base:
main← Head:main📝 Commits (1)
40a723aUpdate controller.go📊 Changes
1 file changed (+3 additions, -2 deletions)
View changed files
📝
internal/sub/controller.go(+3 -2)📄 Description
Summary
Make Happ RouteEnable optional in subscription generation — omit Routing-Enable parameter when disabled instead of sending "false", preserving client's local routing preferences.
Why
Currently, subscription always sends Routing-Enable with explicit true or false, forcing clients to enable or disable routing. Users had no way to let clients keep their own routing configuration. This change makes the parameter optional: enabled sends true, disabled omits the parameter entirely so clients retain their existing routing state.
Type of change
Bug fix
Areas affected
Backend (subscription response header "Routing-Enable")
How was this tested?
Enabled RouteEnable in subscription settings → verified subscription response contains Routing-Enable: true
Disabled RouteEnable in subscription settings → verified subscription response does not contain Routing-Enable parameter
Client with routing enabled locally → after subscription update with RouteEnable disabled, routing remained enabled (no forced override)
Client with routing disabled locally → after subscription update with RouteEnable disabled, routing remained disabled (no forced override)
Backward compatibility verified — existing configs with RouteEnable enabled continue to work as before
Checklist
I tested the change locally and confirmed the described behavior.
go build ./... and the test suite pass locally.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.