[PR #6008] [MERGED] fix(sub) Happ profileEnableRouting button #6054

Closed
opened 2026-11-02 04:06:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

📊 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?

  1. Enabled RouteEnable in subscription settings → verified subscription response contains Routing-Enable: true

  2. Disabled RouteEnable in subscription settings → verified subscription response does not contain Routing-Enable parameter

  3. Client with routing enabled locally → after subscription update with RouteEnable disabled, routing remained enabled (no forced override)

  4. Client with routing disabled locally → after subscription update with RouteEnable disabled, routing remained disabled (no forced override)

  5. 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.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6008 **Author:** [@a-poluyan](https://github.com/a-poluyan) **Created:** 7/16/2026 **Status:** ✅ Merged **Merged:** 7/21/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`40a723a`](https://github.com/MHSanaei/3x-ui/commit/40a723af69cff611b7097dd5643b523246be7ce7) Update controller.go ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `internal/sub/controller.go` (+3 -2) </details> ### 📄 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?** 1. Enabled RouteEnable in subscription settings → verified subscription response contains Routing-Enable: true 2. Disabled RouteEnable in subscription settings → verified subscription response does not contain Routing-Enable parameter 3. Client with routing enabled locally → after subscription update with RouteEnable disabled, routing remained enabled (no forced override) 4. Client with routing disabled locally → after subscription update with RouteEnable disabled, routing remained disabled (no forced override) 5. 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:02 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6054
No description provided.