mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6434] [MERGED] feat(sub): add Happ client integration, routing presets, and app management #6268
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#6268
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/6434
Author: @Pejman-Yousefi-Official
Created: 9/7/2026
Status: ✅ Merged
Merged: 9/10/2026
Merged by: @MHSanaei
Base:
main← Head:feat/happ-customization📝 Commits (3)
72b7189feat(sub): add Happ client integration, routing presets, and app management15ac222Merge branch 'main' into feat/happ-customization6544be8fix(sub): keep Happ header overrides behind the auto-detect opt-in📊 Changes
35 files changed (+3460 additions, -51 deletions)
View changed files
📝
docs/public/openapi.json(+186 -0)📝
frontend/public/openapi.json(+186 -0)📝
frontend/src/generated/examples.ts(+46 -0)📝
frontend/src/generated/schemas.ts(+186 -0)📝
frontend/src/generated/types.ts(+46 -0)📝
frontend/src/generated/zod.ts(+46 -0)📝
frontend/src/models/setting.ts(+23 -0)➕
frontend/src/pages/settings/HappSettingsContent.tsx(+637 -0)📝
frontend/src/pages/settings/SubscriptionGeneralTab.tsx(+7 -34)➕
frontend/src/pages/settings/happPresets.ts(+118 -0)📝
frontend/src/schemas/setting.ts(+23 -0)➕
frontend/src/test/happ-presets.test.ts(+85 -0)➕
frontend/src/test/happ-settings-tun-mode.test.tsx(+72 -0)📝
internal/sub/controller.go(+16 -2)📝
internal/sub/endpoint_test.go(+26 -0)➕
internal/sub/happ.go(+141 -0)➕
internal/sub/happ_test.go(+227 -0)📝
internal/sub/remote_routing.go(+3 -0)📝
internal/sub/service.go(+1 -2)📝
internal/sub/sub.go(+26 -0)...and 15 more files
📄 Description
Summary
Adds comprehensive integration and customization for the Happ VPN client according to official Happ developer specifications, including bug fixes for existing settings, routing presets with a visual rule generator, app management headers, and server subtitles.
Why
subEnableRouting) or hiding server settings (subHideSettings) were toggled off, no headers were emitted. Happ's specification requires explicitRouting-Enable: 0andHide-Settings: 0headers to clear cached state on the client.happ://routing/offdeeplink was rejected bynormalizeHappRoutingas invalid JSON.#Title?serverDescription=...) had their?and=characters percent-escaped by standard URL encoding, breaking Happ's subtitle regex.ProviderID,New-Urlfor zero-downtime migration,Fallback-Url).Sub-Info-Text,Sub-Info-Color, buttons) and expiration alerts (Sub-Expire,Notification-Subs-Expire).No-Limit-Enabled,Subscription-Always-Hwid-Enable(HWID binding).system,gvisor), TUN core types (singbox,tun2proxy,default,xray), route exclusions, and Apple APNs bypass.Type of change
Areas affected
How was this tested?
internal/sub/happ_test.goverifying header injection,happ://routing/offpreservation, preset deeplink builders, and subtitle fragment escaping.frontend/src/test/happ-presets.test.tsverifying all presets, Base64 UTF-8 encoding, and parser helpers (7/7 tests passed).i18n-dead-keys.test.tsensuring all 13 locale files ininternal/web/translation/are fully synchronized with zero dead or orphan keys.npm run typecheck(0 errors) andoxlint src tools(0 errors across 536 files).internal/web/dist/.Screenshots / recordings
(Optional: You can take a screenshot of Settings -> Subscription -> Happ tab and drag & drop it here)
Breaking changes
None. All new fields default to safe/empty values, and existing non-Happ clients are completely unaffected.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.