[PR #5433] [MERGED] feat(sub): add option to hide server settings in subscription (happ) #5882

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

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5433
Author: @IgorKha
Created: 6/18/2026
Status: ✅ Merged
Merged: 6/20/2026
Merged by: @MHSanaei

Base: main ← Head: feat/happ-hide-settings


📝 Commits (5)

  • 509427f feat(settings): add option to hide server settings in subscription
  • d2c5c14 Merge branch 'main' into feat/happ-hide-settings
  • 97bdf43 Merge branch 'main' into feat/happ-hide-settings
  • 326fa43 chore: regenerate codegen and add translations for subHideSettings
  • f75a1d3 fix(sub): add subHideSettings default to settings map

📊 Changes

24 files changed (+69 additions, -4 deletions)

View changed files

📝 frontend/src/generated/examples.ts (+2 -0)
📝 frontend/src/generated/schemas.ts (+10 -0)
📝 frontend/src/generated/types.ts (+2 -0)
📝 frontend/src/generated/zod.ts (+2 -0)
📝 frontend/src/models/setting.ts (+1 -0)
📝 frontend/src/pages/settings/SubscriptionGeneralTab.tsx (+3 -0)
📝 frontend/src/schemas/setting.ts (+1 -0)
📝 internal/sub/controller.go (+10 -3)
📝 internal/sub/sub.go (+6 -1)
📝 internal/web/entity/entity.go (+1 -0)
📝 internal/web/service/setting.go (+5 -0)
📝 internal/web/translation/ar-EG.json (+2 -0)
📝 internal/web/translation/en-US.json (+2 -0)
📝 internal/web/translation/es-ES.json (+2 -0)
📝 internal/web/translation/fa-IR.json (+2 -0)
📝 internal/web/translation/id-ID.json (+2 -0)
📝 internal/web/translation/ja-JP.json (+2 -0)
📝 internal/web/translation/pt-BR.json (+2 -0)
📝 internal/web/translation/ru-RU.json (+2 -0)
📝 internal/web/translation/tr-TR.json (+2 -0)

...and 4 more files

📄 Description

Summary

Adds a new subscription setting for Happ clients to hide server settings from the client UI

Why

Some deployments need to prevent end users from viewing/editing server configuration in Happ while still consuming subscriptions

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

Manual verification steps:

  1. Open Panel Settings → Subscription (Happ tab) and verify that the new Hide server settings toggle is displayed
  2. Enable the toggle, save the configuration, and restart the panel
  3. Add a Happ subscription and verify that the server settings are hidden as described in the documentation: https://www.happ.su/main/dev-docs/app-management#hide-server-settings-in-the-subscription
  4. Run curl -v <sub-link> and confirm that the response contains the header:
Hide-Settings: 1

Screenshots / recordings

Screenshot 2026-06-18 at 21 37 52 Screenshot 2026-06-18 at 21 36 35

Breaking changes

None

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 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/5433 **Author:** [@IgorKha](https://github.com/IgorKha) **Created:** 6/18/2026 **Status:** ✅ Merged **Merged:** 6/20/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `feat/happ-hide-settings` --- ### 📝 Commits (5) - [`509427f`](https://github.com/MHSanaei/3x-ui/commit/509427f4b26722c73388660d91a1d394935bb8fe) feat(settings): add option to hide server settings in subscription - [`d2c5c14`](https://github.com/MHSanaei/3x-ui/commit/d2c5c144bdc686ed47f1defe3dbd655fbf0cfef3) Merge branch 'main' into feat/happ-hide-settings - [`97bdf43`](https://github.com/MHSanaei/3x-ui/commit/97bdf434bf29b3db6f20e1307461319f75af16f0) Merge branch 'main' into feat/happ-hide-settings - [`326fa43`](https://github.com/MHSanaei/3x-ui/commit/326fa43b089ea5cbcf9fad773c6666bc9b9f1448) chore: regenerate codegen and add translations for subHideSettings - [`f75a1d3`](https://github.com/MHSanaei/3x-ui/commit/f75a1d31ceb7c6a26b24c32c53fd9b7e522236b1) fix(sub): add subHideSettings default to settings map ### 📊 Changes **24 files changed** (+69 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/generated/examples.ts` (+2 -0) 📝 `frontend/src/generated/schemas.ts` (+10 -0) 📝 `frontend/src/generated/types.ts` (+2 -0) 📝 `frontend/src/generated/zod.ts` (+2 -0) 📝 `frontend/src/models/setting.ts` (+1 -0) 📝 `frontend/src/pages/settings/SubscriptionGeneralTab.tsx` (+3 -0) 📝 `frontend/src/schemas/setting.ts` (+1 -0) 📝 `internal/sub/controller.go` (+10 -3) 📝 `internal/sub/sub.go` (+6 -1) 📝 `internal/web/entity/entity.go` (+1 -0) 📝 `internal/web/service/setting.go` (+5 -0) 📝 `internal/web/translation/ar-EG.json` (+2 -0) 📝 `internal/web/translation/en-US.json` (+2 -0) 📝 `internal/web/translation/es-ES.json` (+2 -0) 📝 `internal/web/translation/fa-IR.json` (+2 -0) 📝 `internal/web/translation/id-ID.json` (+2 -0) 📝 `internal/web/translation/ja-JP.json` (+2 -0) 📝 `internal/web/translation/pt-BR.json` (+2 -0) 📝 `internal/web/translation/ru-RU.json` (+2 -0) 📝 `internal/web/translation/tr-TR.json` (+2 -0) _...and 4 more files_ </details> ### 📄 Description ## Summary Adds a new subscription setting for Happ clients to hide server settings from the client UI ## Why Some deployments need to prevent end users from viewing/editing server configuration in Happ while still consuming subscriptions ## Type of change - [ ] Bug fix - [x] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [x] Frontend (UI / panel pages) - [x] Backend (API endpoints, login, settings) - [ ] Xray config generation - [x] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? Manual verification steps: 1. Open Panel Settings → Subscription (Happ tab) and verify that the new Hide server settings toggle is displayed 2. Enable the toggle, save the configuration, and restart the panel 3. Add a Happ subscription and verify that the server settings are hidden as described in the documentation: https://www.happ.su/main/dev-docs/app-management#hide-server-settings-in-the-subscription 4. Run `curl -v <sub-link>` and confirm that the response contains the header: ```sh Hide-Settings: 1 ``` ## Screenshots / recordings <img width="830" height="667" alt="Screenshot 2026-06-18 at 21 37 52" src="https://github.com/user-attachments/assets/7abe67d9-c85c-484b-8105-7d6737224b9d" /> <img width="776" height="670" alt="Screenshot 2026-06-18 at 21 36 35" src="https://github.com/user-attachments/assets/cb257632-fcfc-492f-be85-b9bc5c86904d" /> ## Breaking changes None ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [x] I added or updated tests for the new behavior (when applicable). - [x] `go build ./...` and the test suite pass locally. - [x] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:45 +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#5882
No description provided.