mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6650] [MERGED] feat(sub): add Incy app-management parameters #6398
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#6398
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/6650
Author: @DIMFLIX
Created: 9/25/2026
Status: ✅ Merged
Merged: 9/26/2026
Merged by: @MHSanaei
Base:
main← Head:feat/incy-app-params📝 Commits (3)
767d49dfeat(sub): add Incy app-management parameters819be19Merge origin/main into pr/6650fb8175afix(sub): keep Incy per-app list entries separate on the wire📊 Changes
30 files changed (+2994 additions, -37 deletions)
View changed files
📝
docs/public/openapi.json(+226 -0)📝
frontend/public/openapi.json(+226 -0)📝
frontend/src/generated/examples.ts(+56 -0)📝
frontend/src/generated/schemas.ts(+226 -0)📝
frontend/src/generated/types.ts(+56 -0)📝
frontend/src/generated/zod.ts(+56 -0)📝
frontend/src/models/setting.ts(+29 -0)➕
frontend/src/pages/settings/IncySettingsContent.tsx(+488 -0)📝
frontend/src/pages/settings/SubscriptionGeneralTab.tsx(+7 -24)📝
frontend/src/schemas/setting.ts(+28 -0)➕
frontend/src/test/incy-settings-content.test.tsx(+84 -0)📝
internal/sub/controller.go(+8 -0)➕
internal/sub/incy.go(+180 -0)➕
internal/sub/incy_test.go(+208 -0)📝
internal/sub/sub.go(+31 -0)📝
internal/web/entity/entity.go(+31 -0)📝
internal/web/service/setting.go(+144 -0)📝
internal/web/translation/ar-EG.json(+70 -1)📝
internal/web/translation/en-US.json(+70 -1)📝
internal/web/translation/es-ES.json(+70 -1)...and 10 more files
📄 Description
The panel already pushes a set of Happ headers, but INCY documents its own lowercase header names and its own value domains, so a Happ-shaped payload gets ignored by the client (per-app mode is bypass|proxy, not on|bypass, and per-app-proxy-enable has no Happ counterpart at all). Add a sibling Incy path that emits exactly the documented headers.
Covered, per https://docs.incy.cc/en/app-management/:
Each string setting is tri-state: an empty value omits the header, so an untouched panel never overrides the subscriber's own choice in the app. Values are validated against the documented domains and dropped when they do not match, and non-ASCII text is base64-wrapped the way the docs require for Cyrillic. INCY identifies itself as INCY//, which gates the headers behind the same auto-detect switch the Happ path uses.
Headers the panel already emits for every client (Profile-Title, Support-Url, Profile-Web-Page-Url, Announce, Profile-Update-Interval, Subscription-Userinfo) and Incy's routing line are left as they are.
The Premium API (theme, defaultPingProtocol, fallbackHosts, ...) is a separate encrypted endpoint and stays out of scope here.
Summary
Adds a dedicated set of subscription parameters for the INCY client, mirroring what the panel already does for Happ. 28 settings turn 27 documented response headers on and off from Settings → Subscription → Incy, gated behind the same auto-detection switch and applied only to clients whose User-Agent is INCY//.
Why
The panel already pushes a set of Happ headers, but INCY documents its own names and its own value domains, so a Happ-shaped payload is silently ignored by the client. The clearest case is per-app split tunnelling: Happ uses Per-App-Proxy-Mode: on|bypass, while INCY documents per-app-proxy-mode: bypass|proxy plus a separate per-app-proxy-enable: 1|0. Reusing the Happ path would have shipped headers the client never reads.
INCY additionally documents a whole group of parameters the panel had no way to send at all: TCP fragmentation, UDP noise packets, DoH pre-resolution, the banner block, hide-url, hide-check, sort-order, support-email and premium-url.
Reference: https://docs.incy.cc/en/app-management/
Type of change
Areas affected
How was this tested?
Unit tests
Local suite
Manual, against a live panel
Panel on Go 1.27 + a VLESS/Reality inbound, subscription served from the sub server, all Incy settings populated (including Cyrillic in the description and banner) and curl -D- against the subscription URL:
Two notes for the reviewer, both hit while testing:
Breaking changes
None. All new settings default to an empty/unset state, which means no header is sent — an existing installation that never opens the new tab behaves exactly as before. The INCY client treats an absent header as "leave the subscriber's own choice alone", which is the intended default.
No database migration is needed: settings are stored as key/value rows and read back reflectively over the json struct tags.
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.